1 // File : SALOMEDS_PythonObjectAttribute.ixx
2 // Created : Tue Oct 8 10:13:30 2002
3 // Author : Michael Ponikarov
6 // Copyright : Open CASCADE
9 #include "SALOMEDS_PythonObjectAttribute.jxx"
11 #ifndef _Standard_TypeMismatch_HeaderFile
12 #include <Standard_TypeMismatch.hxx>
15 SALOMEDS_PythonObjectAttribute::~SALOMEDS_PythonObjectAttribute() {}
19 Standard_EXPORT Handle_Standard_Type& SALOMEDS_PythonObjectAttribute_Type_()
22 static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
23 if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
24 static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
25 if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
26 static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
27 if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
30 static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
31 static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_PythonObjectAttribute",
32 sizeof(SALOMEDS_PythonObjectAttribute),
34 (Standard_Address)_Ancestors,
35 (Standard_Address)NULL);
42 // allow safe downcasting
44 const Handle(SALOMEDS_PythonObjectAttribute) Handle(SALOMEDS_PythonObjectAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
46 Handle(SALOMEDS_PythonObjectAttribute) _anOtherObject;
48 if (!AnObject.IsNull()) {
49 if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_PythonObjectAttribute))) {
50 _anOtherObject = Handle(SALOMEDS_PythonObjectAttribute)((Handle(SALOMEDS_PythonObjectAttribute)&)AnObject);
54 return _anOtherObject ;
56 const Handle(Standard_Type)& SALOMEDS_PythonObjectAttribute::DynamicType() const
58 return STANDARD_TYPE(SALOMEDS_PythonObjectAttribute) ;
60 Standard_Boolean SALOMEDS_PythonObjectAttribute::IsKind(const Handle(Standard_Type)& AType) const
62 return (STANDARD_TYPE(SALOMEDS_PythonObjectAttribute) == AType || TDF_Attribute::IsKind(AType));
64 Handle_SALOMEDS_PythonObjectAttribute::~Handle_SALOMEDS_PythonObjectAttribute() {}