Salome HOME
19fc22d0ee98dc547b5cd3f7f6b466a0d877d177
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_AttributeStudyProperties.hxx
1 //  File   : SALOMEDSImpl_AttributeStudyProperties.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef _SALOMEDSImpl_AttributeStudyProperties_HeaderFile
6 #define _SALOMEDSImpl_AttributeStudyProperties_HeaderFile
7
8 #include <Standard_DefineHandle.hxx>
9 #include <Standard.hxx>
10 #include <TDF_Attribute.hxx>
11 #include <TDF_Label.hxx>
12 #include <TCollection_AsciiString.hxx>
13 #include "SALOMEDSImpl_GenericAttribute.hxx"
14
15 class Standard_GUID;
16 class Handle(TDF_Attribute);
17 class Handle(TDF_RelocationTable);
18
19
20 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeStudyProperties, SALOMEDSImpl_GenericAttribute )
21
22 #include <TColStd_HSequenceOfExtendedString.hxx>
23 #include <TColStd_HSequenceOfInteger.hxx>
24
25 class SALOMEDSImpl_AttributeStudyProperties : public SALOMEDSImpl_GenericAttribute
26 {
27 public:
28 Standard_EXPORT SALOMEDSImpl_AttributeStudyProperties();
29 Standard_EXPORT ~SALOMEDSImpl_AttributeStudyProperties() {}
30
31 Standard_EXPORT static const Standard_GUID& GetID();
32 Standard_EXPORT        const Standard_GUID&    ID() const;
33
34 Standard_EXPORT static  Handle_SALOMEDSImpl_AttributeStudyProperties Set(const TDF_Label& label);
35
36 Standard_EXPORT void Init();
37
38 Standard_EXPORT virtual TCollection_AsciiString Save();
39 Standard_EXPORT virtual void Load(const TCollection_AsciiString&);
40
41 Standard_EXPORT   void SetModification(const TCollection_ExtendedString& theUserName,
42                                        const Standard_Integer            theMinute,
43                                        const Standard_Integer            theHour,
44                                        const Standard_Integer            theDay,
45                                        const Standard_Integer            theMonth,
46                                        const Standard_Integer            theYear);
47 Standard_EXPORT   void GetModifications(Handle(TColStd_HSequenceOfExtendedString)& theUserNames,
48                                         Handle(TColStd_HSequenceOfInteger)&        theMinutes,
49                                         Handle(TColStd_HSequenceOfInteger)&        theHours,
50                                         Handle(TColStd_HSequenceOfInteger)&        theDays,
51                                         Handle(TColStd_HSequenceOfInteger)&        theMonths,
52                                         Handle(TColStd_HSequenceOfInteger)&        theYears) const;
53
54 Standard_EXPORT   TCollection_ExtendedString GetCreatorName() const;
55 Standard_EXPORT   Standard_Boolean GetCreationDate(Standard_Integer&           theMinute,
56                                                    Standard_Integer&           theHour,
57                                                    Standard_Integer&           theDay,
58                                                    Standard_Integer&           theMonth,
59                                                    Standard_Integer&           theYear) const;
60
61 Standard_EXPORT   void ChangeCreatorName(const TCollection_ExtendedString& theUserName);
62
63 Standard_EXPORT   void SetCreationMode(const Standard_Integer theMode);
64 Standard_EXPORT   Standard_Integer GetCreationMode() const;
65
66 Standard_EXPORT   void SetModified(const Standard_Integer theModified);
67 Standard_EXPORT   Standard_Boolean IsModified() const;
68 Standard_EXPORT   Standard_Integer GetModified() const;
69
70 Standard_EXPORT   void SetLocked(const Standard_Boolean theLocked);
71 Standard_EXPORT   Standard_Boolean IsLocked() const;
72 Standard_EXPORT   Standard_Boolean IsLockChanged(const Standard_Boolean theErase);
73
74 Standard_EXPORT   void Restore(const Handle(TDF_Attribute)& with);
75 Standard_EXPORT   Handle_TDF_Attribute NewEmpty() const;
76 Standard_EXPORT   void Paste(const Handle(TDF_Attribute)& into,
77                              const Handle(TDF_RelocationTable)& RT) const;
78
79 private:
80
81 Handle_TColStd_HSequenceOfExtendedString myUserName;
82 Handle_TColStd_HSequenceOfInteger myMinute;
83 Handle_TColStd_HSequenceOfInteger myHour;
84 Handle_TColStd_HSequenceOfInteger myDay;
85 Handle_TColStd_HSequenceOfInteger myMonth;
86 Handle_TColStd_HSequenceOfInteger myYear;
87 Standard_Integer myMode;
88 Standard_Integer myModified;
89 Standard_Boolean myLocked;
90 Standard_Boolean myLockChanged;
91
92 public:
93   DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeStudyProperties )
94
95 };
96
97 #endif