File indexing completed on 2025-01-18 10:03:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _CDM_MetaData_HeaderFile
0018 #define _CDM_MetaData_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <CDM_DocumentPointer.hxx>
0024 #include <TCollection_ExtendedString.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <CDM_Document.hxx>
0028 #include <CDM_Application.hxx>
0029 #include <Standard_OStream.hxx>
0030 #include <CDM_MetaDataLookUpTable.hxx>
0031
0032
0033 class CDM_MetaData;
0034 DEFINE_STANDARD_HANDLE(CDM_MetaData, Standard_Transient)
0035
0036
0037 class CDM_MetaData : public Standard_Transient
0038 {
0039
0040 public:
0041
0042 Standard_EXPORT static Handle(CDM_MetaData) LookUp (CDM_MetaDataLookUpTable& theLookUpTable,
0043 const TCollection_ExtendedString& aFolder,
0044 const TCollection_ExtendedString& aName,
0045 const TCollection_ExtendedString& aPath,
0046 const TCollection_ExtendedString& aFileName,
0047 const Standard_Boolean ReadOnly);
0048
0049 Standard_EXPORT static Handle(CDM_MetaData) LookUp (CDM_MetaDataLookUpTable& theLookUpTable,
0050 const TCollection_ExtendedString& aFolder,
0051 const TCollection_ExtendedString& aName,
0052 const TCollection_ExtendedString& aPath,
0053 const TCollection_ExtendedString& aVersion,
0054 const TCollection_ExtendedString& aFileName,
0055 const Standard_Boolean ReadOnly);
0056
0057 Standard_EXPORT Standard_Boolean IsRetrieved() const;
0058
0059 Standard_EXPORT Handle(CDM_Document) Document() const;
0060
0061
0062
0063 Standard_EXPORT TCollection_ExtendedString Folder() const;
0064
0065
0066
0067 Standard_EXPORT TCollection_ExtendedString Name() const;
0068
0069
0070
0071 Standard_EXPORT TCollection_ExtendedString Version() const;
0072
0073
0074
0075 Standard_EXPORT Standard_Boolean HasVersion() const;
0076
0077 Standard_EXPORT TCollection_ExtendedString FileName() const;
0078
0079 Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
0080 Standard_OStream& operator << (Standard_OStream& anOStream);
0081
0082 Standard_EXPORT TCollection_ExtendedString Path() const;
0083
0084 Standard_EXPORT void UnsetDocument();
0085
0086 Standard_EXPORT Standard_Boolean IsReadOnly() const;
0087
0088 Standard_EXPORT void SetIsReadOnly();
0089
0090 Standard_EXPORT void UnsetIsReadOnly();
0091
0092
0093 Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0094
0095
0096 friend class CDM_Reference;
0097 friend
0098
0099
0100
0101 Standard_EXPORT void CDM_Document::SetMetaData (const Handle(CDM_MetaData)& aMetaData);
0102 friend
0103 Standard_EXPORT void CDM_Application::SetDocumentVersion (const Handle(CDM_Document)& aDocument, const Handle(CDM_MetaData)& aMetaData) const;
0104
0105
0106 DEFINE_STANDARD_RTTIEXT(CDM_MetaData,Standard_Transient)
0107
0108 private:
0109
0110 CDM_MetaData (const TCollection_ExtendedString& aFolder,
0111 const TCollection_ExtendedString& aName,
0112 const TCollection_ExtendedString& aPath,
0113 const TCollection_ExtendedString& aFileName,
0114 const Standard_Boolean ReadOnly);
0115
0116 CDM_MetaData (const TCollection_ExtendedString& aFolder,
0117 const TCollection_ExtendedString& aName,
0118 const TCollection_ExtendedString& aPath,
0119 const TCollection_ExtendedString& aVersion,
0120 const TCollection_ExtendedString& aFileName,
0121 const Standard_Boolean ReadOnly);
0122
0123 void SetDocument (const Handle(CDM_Document)& aDocument);
0124
0125 Standard_Integer DocumentVersion (const Handle(CDM_Application)& anApplication);
0126
0127 private:
0128
0129 Standard_Boolean myIsRetrieved;
0130 CDM_DocumentPointer myDocument;
0131 TCollection_ExtendedString myFolder;
0132 TCollection_ExtendedString myName;
0133 TCollection_ExtendedString myVersion;
0134 Standard_Boolean myHasVersion;
0135 TCollection_ExtendedString myFileName;
0136 TCollection_ExtendedString myPath;
0137 Standard_Integer myDocumentVersion;
0138 Standard_Boolean myIsReadOnly;
0139
0140
0141 };
0142
0143
0144
0145
0146
0147
0148
0149 #endif