Back to index

salome-geom  6.5.0
GEOM_AISShape.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 //  GEOM OBJECT : interactive object for Geometry entities visualization
00024 //  File   : GEOM_AISShape.ixx
00025 //  Module : GEOM
00026 //
00027 #include "GEOM_AISShape.jxx"
00028 
00029 #ifndef _Standard_TypeMismatch_HeaderFile
00030 #include <Standard_TypeMismatch.hxx>
00031 #endif
00032 
00033 GEOM_AISShape::~GEOM_AISShape() {}
00034  
00035 
00036 
00037 Standard_EXPORT Handle_Standard_Type& GEOM_AISShape_Type_()
00038 {
00039 
00040   static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_AISShape);
00041   if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_AISShape);
00042   static Handle_Standard_Type aType2 = STANDARD_TYPE(AIS_Shape);
00043   if ( aType2.IsNull()) aType2 = STANDARD_TYPE(AIS_Shape);
00044   static Handle_Standard_Type aType3 = STANDARD_TYPE(AIS_InteractiveObject);
00045   if ( aType3.IsNull()) aType3 = STANDARD_TYPE(AIS_InteractiveObject);
00046   static Handle_Standard_Type aType4 = STANDARD_TYPE(SelectMgr_SelectableObject);
00047   if ( aType4.IsNull()) aType4 = STANDARD_TYPE(SelectMgr_SelectableObject);
00048   static Handle_Standard_Type aType5 = STANDARD_TYPE(PrsMgr_PresentableObject);
00049   if ( aType5.IsNull()) aType5 = STANDARD_TYPE(PrsMgr_PresentableObject);
00050   static Handle_Standard_Type aType6 = STANDARD_TYPE(MMgt_TShared);
00051   if ( aType6.IsNull()) aType6 = STANDARD_TYPE(MMgt_TShared);
00052   static Handle_Standard_Type aType7 = STANDARD_TYPE(Standard_Transient);
00053   if ( aType7.IsNull()) aType7 = STANDARD_TYPE(Standard_Transient);
00054  
00055 
00056   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,aType6,aType7,NULL};
00057   static Handle_Standard_Type _aType = new Standard_Type("GEOM_AISShape",
00058                                                          sizeof(GEOM_AISShape),
00059                                                          1,
00060                                                          (Standard_Address)_Ancestors,
00061                                                          (Standard_Address)NULL);
00062 
00063   return _aType;
00064 }
00065 
00066 
00067 // DownCast method
00068 //   allow safe downcasting
00069 //
00070 const Handle(GEOM_AISShape) Handle(GEOM_AISShape)::DownCast(const Handle(Standard_Transient)& AnObject) 
00071 {
00072   Handle(GEOM_AISShape) _anOtherObject;
00073 
00074   if (!AnObject.IsNull()) {
00075      if (AnObject->IsKind(STANDARD_TYPE(GEOM_AISShape))) {
00076        _anOtherObject = Handle(GEOM_AISShape)((Handle(GEOM_AISShape)&)AnObject);
00077      }
00078   }
00079 
00080   return _anOtherObject ;
00081 }
00082 const Handle(Standard_Type)& GEOM_AISShape::DynamicType() const 
00083 { 
00084   return STANDARD_TYPE(GEOM_AISShape) ; 
00085 }
00086 Standard_Boolean GEOM_AISShape::IsKind(const Handle(Standard_Type)& AType) const 
00087 { 
00088   return (STANDARD_TYPE(GEOM_AISShape) == AType || SALOME_AISShape::IsKind(AType)); 
00089 }
00090 Handle_GEOM_AISShape::~Handle_GEOM_AISShape() {}
00091