Back to index

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