Salome HOME
sources v1.2
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_StudyPropertiesAttribute.ixx
1 //  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : SALOMEDS_StudyPropertiesAttribute.ixx
8 //  Author : Yves FRICAUD
9 //  Module : SALOME
10 //  $Header$
11
12 #include <SALOMEDS_StudyPropertiesAttribute.jxx>
13
14 #ifndef _Standard_TypeMismatch_HeaderFile
15 #include <Standard_TypeMismatch.hxx>
16 #endif
17
18 SALOMEDS_StudyPropertiesAttribute::~SALOMEDS_StudyPropertiesAttribute() {}
19  
20
21
22 Standard_EXPORT Handle_Standard_Type& SALOMEDS_StudyPropertiesAttribute_Type_()
23 {
24
25     static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
26   if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
27   static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
28   if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
29   static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
30   if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
31  
32
33   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
34   static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_StudyPropertiesAttribute",
35                                                          sizeof(SALOMEDS_StudyPropertiesAttribute),
36                                                          1,
37                                                          (Standard_Address)_Ancestors,
38                                                          (Standard_Address)NULL);
39
40   return _aType;
41 }
42
43
44 // DownCast method
45 //   allow safe downcasting
46 //
47 const Handle(SALOMEDS_StudyPropertiesAttribute) Handle(SALOMEDS_StudyPropertiesAttribute)::DownCast(const Handle(Standard_Transient)& AnObject) 
48 {
49   Handle(SALOMEDS_StudyPropertiesAttribute) _anOtherObject;
50
51   if (!AnObject.IsNull()) {
52      if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute))) {
53        _anOtherObject = Handle(SALOMEDS_StudyPropertiesAttribute)((Handle(SALOMEDS_StudyPropertiesAttribute)&)AnObject);
54      }
55   }
56
57   return _anOtherObject ;
58 }
59 const Handle(Standard_Type)& SALOMEDS_StudyPropertiesAttribute::DynamicType() const 
60
61   return STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute) ; 
62 }
63 Standard_Boolean SALOMEDS_StudyPropertiesAttribute::IsKind(const Handle(Standard_Type)& AType) const 
64
65   return (STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute) == AType || TDF_Attribute::IsKind(AType)); 
66 }
67 Handle_SALOMEDS_StudyPropertiesAttribute::~Handle_SALOMEDS_StudyPropertiesAttribute() {}
68