Back to index

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