1 // File : SALOMEDSImpl_AttributeOpened.cxx
2 // Author : Sergey RUIN
6 #include "SALOMEDSImpl_AttributeOpened.hxx"
7 #include <Standard_GUID.hxx>
11 IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeOpened, SALOMEDSImpl_GenericAttribute )
12 IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeOpened, SALOMEDSImpl_GenericAttribute )
14 //=======================================================================
17 //=======================================================================
19 const Standard_GUID& SALOMEDSImpl_AttributeOpened::GetID ()
21 static Standard_GUID SALOMEDSImpl_AttributeOpenedID ("12837186-8F52-11d6-A8A3-0001021E8C7F");
22 return SALOMEDSImpl_AttributeOpenedID;
27 //=======================================================================
30 //=======================================================================
32 Handle(SALOMEDSImpl_AttributeOpened) SALOMEDSImpl_AttributeOpened::Set (const TDF_Label& L,
33 const Standard_Integer value)
35 Handle(SALOMEDSImpl_AttributeOpened) A;
36 if (!L.FindAttribute(SALOMEDSImpl_AttributeOpened::GetID(),A)) {
37 A = new SALOMEDSImpl_AttributeOpened();
46 //=======================================================================
47 //function : constructor
49 //=======================================================================
50 SALOMEDSImpl_AttributeOpened::SALOMEDSImpl_AttributeOpened()
51 :SALOMEDSImpl_GenericAttribute("AttributeOpened")
56 //=======================================================================
57 //function : SetOpened
59 //=======================================================================
60 void SALOMEDSImpl_AttributeOpened::SetOpened(const Standard_Integer theValue)
64 (theValue!=0)?myValue=1:myValue=0;
67 //=======================================================================
70 //=======================================================================
72 const Standard_GUID& SALOMEDSImpl_AttributeOpened::ID () const { return GetID(); }
75 //=======================================================================
78 //=======================================================================
80 Handle(TDF_Attribute) SALOMEDSImpl_AttributeOpened::NewEmpty () const
82 return new SALOMEDSImpl_AttributeOpened();
85 //=======================================================================
88 //=======================================================================
90 void SALOMEDSImpl_AttributeOpened::Restore(const Handle(TDF_Attribute)& with)
92 myValue = Handle(SALOMEDSImpl_AttributeOpened)::DownCast (with)->IsOpened ();
95 //=======================================================================
98 //=======================================================================
100 void SALOMEDSImpl_AttributeOpened::Paste (const Handle(TDF_Attribute)& into,
101 const Handle(TDF_RelocationTable)& RT) const
103 Handle(SALOMEDSImpl_AttributeOpened)::DownCast (into)->SetOpened (myValue);