Back to index

salome-gui  6.5.0
SALOME_TypeFilter.ixx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  SALOME SALOMEGUI : implementation of desktop and GUI kernel
00024 //  File   : SALOME_TypeFilter.ixx
00025 //  Module : SALOME
00026 //
00027 #include "SALOME_TypeFilter.jxx"
00028 
00029 #ifndef _Standard_TypeMismatch_HeaderFile
00030 #include <Standard_TypeMismatch.hxx>
00031 #endif
00032 
00033 SALOME_TypeFilter::~SALOME_TypeFilter() {}
00034  
00035 
00036 
00037 Standard_EXPORT Handle_Standard_Type& SALOME_TypeFilter_Type_()
00038 {
00039 
00040     static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_Filter);
00041   if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_Filter);
00042   static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
00043   if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
00044   static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
00045   if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
00046  
00047 
00048   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
00049   static Handle_Standard_Type _aType = new Standard_Type("SALOME_TypeFilter",
00050                                                          sizeof(SALOME_TypeFilter),
00051                                                          1,
00052                                                          (Standard_Address)_Ancestors,
00053                                                          (Standard_Address)NULL);
00054 
00055   return _aType;
00056 }
00057 
00058 
00059 // DownCast method
00060 //   allow safe downcasting
00061 //
00062 const Handle(SALOME_TypeFilter) Handle(SALOME_TypeFilter)::DownCast(const Handle(Standard_Transient)& AnObject) 
00063 {
00064   Handle(SALOME_TypeFilter) _anOtherObject;
00065 
00066   if (!AnObject.IsNull()) {
00067      if (AnObject->IsKind(STANDARD_TYPE(SALOME_TypeFilter))) {
00068        _anOtherObject = Handle(SALOME_TypeFilter)((Handle(SALOME_TypeFilter)&)AnObject);
00069      }
00070   }
00071 
00072   return _anOtherObject ;
00073 }
00074 const Handle(Standard_Type)& SALOME_TypeFilter::DynamicType() const 
00075 { 
00076   return STANDARD_TYPE(SALOME_TypeFilter) ; 
00077 }
00078 Standard_Boolean SALOME_TypeFilter::IsKind(const Handle(Standard_Type)& AType) const 
00079 { 
00080   return (STANDARD_TYPE(SALOME_TypeFilter) == AType || SALOME_Filter::IsKind(AType)); 
00081 }
00082 Handle_SALOME_TypeFilter::~Handle_SALOME_TypeFilter() {}
00083