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 _CDF_Application_HeaderFile
0018 #define _CDF_Application_HeaderFile
0019
0020 #include <TCollection_ExtendedString.hxx>
0021 #include <PCDM_ReaderStatus.hxx>
0022 #include <CDF_TypeOfActivation.hxx>
0023 #include <CDF_MetaDataDriver.hxx>
0024 #include <CDM_Application.hxx>
0025 #include <CDM_CanCloseStatus.hxx>
0026 #include <Standard_IStream.hxx>
0027 #include <NCollection_IndexedDataMap.hxx>
0028
0029 class Standard_GUID;
0030 class CDM_Document;
0031 class PCDM_Reader;
0032 class CDM_MetaData;
0033 class PCDM_RetrievalDriver;
0034 class PCDM_StorageDriver;
0035 class CDF_Directory;
0036 class CDF_Application;
0037 DEFINE_STANDARD_HANDLE(CDF_Application, CDM_Application)
0038
0039
0040 class CDF_Application : public CDM_Application
0041 {
0042
0043 public:
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 Standard_EXPORT static Handle(CDF_Application) Load (const Standard_GUID& aGUID);
0058
0059
0060
0061
0062
0063
0064 Standard_EXPORT virtual void NewDocument(const TCollection_ExtendedString& theFormat, Handle(CDM_Document)& theDoc);
0065
0066
0067
0068
0069 Standard_EXPORT virtual void InitDocument(const Handle(CDM_Document)& theDoc) const;
0070
0071
0072
0073 Standard_EXPORT void Open (const Handle(CDM_Document)& aDocument);
0074
0075 Standard_EXPORT CDM_CanCloseStatus CanClose (const Handle(CDM_Document)& aDocument);
0076
0077
0078
0079 Standard_EXPORT void Close (const Handle(CDM_Document)& aDocument);
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099 Standard_EXPORT Handle(CDM_Document) Retrieve
0100 (const TCollection_ExtendedString& aFolder,
0101 const TCollection_ExtendedString& aName,
0102 const Standard_Boolean UseStorageConfiguration = Standard_True,
0103 const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
0104 const Message_ProgressRange& theRange = Message_ProgressRange());
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120 Standard_EXPORT Handle(CDM_Document) Retrieve
0121 (const TCollection_ExtendedString& aFolder,
0122 const TCollection_ExtendedString& aName,
0123 const TCollection_ExtendedString& aVersion,
0124 const Standard_Boolean UseStorageConfiguration = Standard_True,
0125 const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
0126 const Message_ProgressRange& theRange = Message_ProgressRange());
0127
0128 Standard_EXPORT PCDM_ReaderStatus CanRetrieve (const TCollection_ExtendedString& theFolder,
0129 const TCollection_ExtendedString& theName,
0130 const bool theAppendMode);
0131
0132 Standard_EXPORT PCDM_ReaderStatus CanRetrieve (const TCollection_ExtendedString& theFolder,
0133 const TCollection_ExtendedString& theName,
0134 const TCollection_ExtendedString& theVersion,
0135 const bool theAppendMode);
0136
0137
0138 PCDM_ReaderStatus GetRetrieveStatus() const { return myRetrievableStatus; }
0139
0140
0141
0142 Standard_EXPORT void Read
0143 (Standard_IStream& theIStream,
0144 Handle(CDM_Document)& theDocument,
0145 const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
0146 const Message_ProgressRange& theRange = Message_ProgressRange());
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160 Standard_EXPORT virtual Handle(PCDM_Reader) ReaderFromFormat (const TCollection_ExtendedString& aFormat);
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174 Standard_EXPORT virtual Handle(PCDM_StorageDriver) WriterFromFormat (const TCollection_ExtendedString& aFormat);
0175
0176
0177
0178
0179 Standard_EXPORT Standard_Boolean Format (const TCollection_ExtendedString& aFileName,
0180 TCollection_ExtendedString& theFormat);
0181
0182 Standard_EXPORT Standard_ExtString DefaultFolder();
0183
0184 Standard_EXPORT Standard_Boolean SetDefaultFolder (const Standard_ExtString aFolder);
0185
0186
0187 Standard_EXPORT Handle(CDF_MetaDataDriver) MetaDataDriver() const;
0188
0189 DEFINE_STANDARD_RTTIEXT(CDF_Application,CDM_Application)
0190
0191 Handle(CDF_MetaDataDriver) myMetaDataDriver;
0192 Handle(CDF_Directory) myDirectory;
0193 private:
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209 Standard_EXPORT virtual void Activate (const Handle(CDM_Document)& aDocument,
0210 const CDF_TypeOfActivation aTypeOfActivation);
0211
0212 Standard_EXPORT Handle(CDM_Document) Retrieve
0213 (const Handle(CDM_MetaData)& aMetaData,
0214 const Standard_Boolean UseStorageConfiguration,
0215 const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
0216 const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0217
0218 Standard_EXPORT Handle(CDM_Document) Retrieve
0219 (const Handle(CDM_MetaData)& aMetaData,
0220 const Standard_Boolean UseStorageConfiguration,
0221 const Standard_Boolean IsComponent,
0222 const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
0223 const Message_ProgressRange& theRange = Message_ProgressRange());
0224
0225 Standard_EXPORT Standard_Integer DocumentVersion (const Handle(CDM_MetaData)& theMetaData) Standard_OVERRIDE;
0226
0227 Standard_EXPORT CDF_TypeOfActivation TypeOfActivation (const Handle(CDM_MetaData)& aMetaData);
0228
0229 Standard_EXPORT PCDM_ReaderStatus CanRetrieve (const Handle(CDM_MetaData)& aMetaData, const bool theAppendMode);
0230
0231 protected:
0232
0233 Standard_EXPORT CDF_Application();
0234
0235 PCDM_ReaderStatus myRetrievableStatus;
0236 NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_RetrievalDriver)> myReaders;
0237 NCollection_IndexedDataMap<TCollection_ExtendedString, Handle(PCDM_StorageDriver)> myWriters;
0238
0239 private:
0240 TCollection_ExtendedString myDefaultFolder;
0241 };
0242
0243 #endif