1 // File : SALOMEDSImpl_AttributeDrawable.hxx
2 // Author : Sergey RUIN
5 #ifndef _SALOMEDSImpl_AttributeDrawable_HeaderFile
6 #define _SALOMEDSImpl_AttributeDrawable_HeaderFile
8 #include <Standard_DefineHandle.hxx>
9 #include <TDF_Attribute.hxx>
10 #include <TCollection_AsciiString.hxx>
11 #include <Standard_GUID.hxx>
12 #include <TDF_Label.hxx>
13 #include "SALOMEDSImpl_GenericAttribute.hxx"
15 class Handle(TDF_Attribute);
16 class Handle(TDF_RelocationTable);
19 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeDrawable, SALOMEDSImpl_GenericAttribute )
22 class SALOMEDSImpl_AttributeDrawable : public SALOMEDSImpl_GenericAttribute
25 Standard_Integer myValue;
28 Standard_EXPORT virtual TCollection_AsciiString Save() { return (myValue == 0)?(char*)"0":(char*)"1"; }
29 Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { (theValue == "0")?myValue=0:myValue=1; }
31 Standard_EXPORT static const Standard_GUID& GetID() ;
32 Standard_EXPORT static Handle_SALOMEDSImpl_AttributeDrawable Set(const TDF_Label& label,const Standard_Integer value) ;
34 Standard_EXPORT void SetDrawable(const Standard_Integer theValue);
35 Standard_EXPORT Standard_Integer IsDrawable() const { return myValue; }
36 Standard_EXPORT SALOMEDSImpl_AttributeDrawable();
37 Standard_EXPORT const Standard_GUID& ID() const;
38 Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
39 Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
40 Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
41 Standard_EXPORT ~SALOMEDSImpl_AttributeDrawable() {}
44 DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeDrawable )