File indexing completed on 2026-09-27 09:19:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _XCAFDoc_Note_HeaderFile
0015 #define _XCAFDoc_Note_HeaderFile
0016
0017 #include <Standard.hxx>
0018 #include <TCollection_ExtendedString.hxx>
0019 #include <TDF_DerivedAttribute.hxx>
0020 #include <TDF_Label.hxx>
0021 #include <NCollection_Sequence.hxx>
0022 #include <XCAFNoteObjects_NoteObject.hxx>
0023
0024 class TDF_RelocationTable;
0025
0026
0027
0028
0029 class XCAFDoc_Note : public TDF_Attribute
0030 {
0031 public:
0032 DEFINE_STANDARD_RTTIEXT(XCAFDoc_Note, TDF_Attribute)
0033
0034
0035 Standard_EXPORT static bool IsMine(const TDF_Label& theLabel);
0036
0037
0038 Standard_EXPORT static occ::handle<XCAFDoc_Note> Get(const TDF_Label& theLabel);
0039
0040
0041
0042
0043
0044 Standard_EXPORT void Set(const TCollection_ExtendedString& theUserName,
0045 const TCollection_ExtendedString& theTimeStamp);
0046
0047
0048 const TCollection_ExtendedString& UserName() const { return myUserName; }
0049
0050
0051 const TCollection_ExtendedString& TimeStamp() const { return myTimeStamp; }
0052
0053
0054 Standard_EXPORT bool IsOrphan() const;
0055
0056
0057 Standard_EXPORT occ::handle<XCAFNoteObjects_NoteObject> GetObject() const;
0058
0059
0060 Standard_EXPORT void SetObject(const occ::handle<XCAFNoteObjects_NoteObject>& theObject);
0061
0062 public:
0063
0064 Standard_EXPORT void Restore(const occ::handle<TDF_Attribute>& theAttrFrom) override;
0065 Standard_EXPORT void Paste(const occ::handle<TDF_Attribute>& theAttrInto,
0066 const occ::handle<TDF_RelocationTable>& theRT) const override;
0067 Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const override;
0068
0069
0070 Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0071
0072 protected:
0073
0074 Standard_EXPORT XCAFDoc_Note();
0075
0076 private:
0077 TCollection_ExtendedString myUserName;
0078 TCollection_ExtendedString myTimeStamp;
0079 };
0080
0081 #endif