CDF
OCCT package CDF: CDF_Application, CDF_Directory, CDF_FWOSDriver, CDF_MetaDataDriver, and 7 more bound classes.
CDF_Application
Static methods(2)
- get_type_name(): string
Instance methods(15)
- NewDocument(theFormat: TCollection_ExtendedString): { theDoc: CDM_Document; [Symbol.dispose](): void }
Constructs an new empty document. This document will have the specified format. If
InitDocument()is redefined for a specific application, the new document is handled by the applicative session.Parameters (1)theFormat
ReturnsA result object with fields:
theDoc: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- InitDocument(theDoc: CDM_Document): void
Initialize a document for the applicative session. This virtual function is called by NewDocument and should be redefined for each specific application.
Parameters (1)theDoc
- Open(aDocument: CDM_Document): void
puts the document in the current session directory and calls the virtual method Activate on it.
Parameters (1)aDocument
- CanClose(aDocument: CDM_Document): CDM_CanCloseStatusParameters (1)
aDocument
- Close(aDocument: CDM_Document): void
removes the document of the current session directory and closes the document;
Parameters (1)aDocument
- CanRetrieve(theFolder: TCollection_ExtendedString, theName: TCollection_ExtendedString, theAppendMode: boolean): PCDM_ReaderStatusParameters (3)
theFoldertheNametheAppendMode
- CanRetrieve(theFolder: TCollection_ExtendedString, theName: TCollection_ExtendedString, theVersion: TCollection_ExtendedString, theAppendMode: boolean): PCDM_ReaderStatusParameters (4)
theFoldertheNametheVersiontheAppendMode
Checks status after Retrieve.
Returns instance of read driver for specified format.
Default implementation uses plugin mechanism to load reader dynamically. For this to work, application resources should define GUID of the plugin as value of [Format].RetrievalPlugin, and "Plugin" resource should define name of plugin library to be loaded as value of [GUID].Location.Pluginlibrary should provide method PLUGINFACTORY returning instance of the reader for the same GUID (seePlugin_Macro.hxx).
In case if reader is not available, will raise Standard_NoSuchObject or other exception if raised by plugin loader.Parameters (1)aFormat
Returns instance of storage driver for specified format.
Default implementation uses plugin mechanism to load driver dynamically. For this to work, application resources should define GUID of the plugin as value of [Format].StoragePlugin, and "Plugin" resource should define name of plugin library to be loaded as value of [GUID].Location.Pluginlibrary should provide method PLUGINFACTORY returning instance of the reader for the same GUID (seePlugin_Macro.hxx).
In case if driver is not available, will raise Standard_NoSuchObject or other exception if raised by plugin loader.Parameters (1)aFormat
- Format(aFileName: TCollection_ExtendedString, theFormat: TCollection_ExtendedString): boolean
try to retrieve a Format directly in the file or in application resource by using extension. returns True if found
Parameters (2)aFileNametheFormat—Mutated in place; read the updated value from this argument after the call.
- DefaultFolder(): string
- SetDefaultFolder(aFolder: string): booleanParameters (1)
aFolder
returns MetaDatdDriver of this application
Properties(1)
CDF_Directory
A directory is a collection of documents. There is only one instance of a given document in a directory. put.
Constructors(1)
Creates an empty directory.
Static methods(2)
- get_type_name(): string
Instance methods(7)
- Add(aDocument: CDM_Document): void
adds a document into the directory.
Parameters (1)aDocument
- Remove(aDocument: CDM_Document): void
removes the document.
Parameters (1)aDocument
- Contains(aDocument: CDM_Document): boolean
Returns true if the document aDocument is in the directory.
Parameters (1)aDocument
- Last(): CDM_Document
returns the last document (if any) which has been added in the directory.
- Length(): number
returns the number of documents of the directory.
- IsEmpty(): boolean
returns true if the directory is empty.
CDF_FWOSDriver
Constructors(1)
- constructor(theLookUpTable: NCollection_DataMap_TCollection_ExtendedString_handle_CDM_MetaData): CDF_FWOSDriver
Initializes the MetaDatadriver connected to specified look-up table. Note that the created driver will keep reference to the table, thus it must have life time longer than this object.
Parameters (1)theLookUpTable
Static methods(2)
- get_type_name(): string
Instance methods(8)
- Find(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString, aVersion: TCollection_ExtendedString): boolean
indicate whether a file exists corresponding to the folder and the name
Parameters (3)aFolderaNameaVersion
- Find(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString): boolean
indicate whether a file exists corresponding to the folder and the name
Parameters (2)aFolderaName
- HasReadPermission(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString, aVersion: TCollection_ExtendedString): booleanParameters (3)
aFolderaNameaVersion
- FindFolder(aFolder: TCollection_ExtendedString): booleanParameters (1)
aFolder
- BuildFileName(aDocument: CDM_Document): TCollection_ExtendedStringParameters (1)
aDocument
- SetName(aDocument: CDM_Document, aName: TCollection_ExtendedString): TCollection_ExtendedString
this method is useful if the name of an object depends on the metadatadriver. For example a Driver based on the operating system can choose to add the extension of file to create to the object.
Parameters (2)aDocumentaName
CDF_MetaDataDriver
this class list the method that must be available for a specific DBMS
Static methods(2)
- get_type_name(): string
Instance methods(16)
- HasVersionCapability(): boolean
returns true if the MetaDataDriver can manage different versions of a Data. By default, returns false.
- CreateDependsOn(aFirstData: CDM_MetaData, aSecondData: CDM_MetaData): void
Creates a "Depends On" relation between two Datas. By default does nothing.
Parameters (2)aFirstDataaSecondData
- CreateReference(aFrom: CDM_MetaData, aTo: CDM_MetaData, aReferenceIdentifier: number, aToDocumentVersion: number): voidParameters (4)
aFromaToaReferenceIdentifieraToDocumentVersion
- HasVersion(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString): boolean
by default return true.
Parameters (2)aFolderaName
- BuildFileName(aDocument: CDM_Document): TCollection_ExtendedStringParameters (1)
aDocument
- SetName(aDocument: CDM_Document, aName: TCollection_ExtendedString): TCollection_ExtendedString
this method is useful if the name of an object depends on the metadatadriver. For example a Driver based on the operating system can choose to add the extension of file to create to the object.
Parameters (2)aDocumentaName
- Find(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString, aVersion: TCollection_ExtendedString): boolean
should indicate whether meta-data exist in the DBMS corresponding to the Data. aVersion may be NULL;
Parameters (3)aFolderaNameaVersion
- Find(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString): boolean
calls Find with an empty version
Parameters (2)aFolderaName
- HasReadPermission(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString, aVersion: TCollection_ExtendedString): booleanParameters (3)
aFolderaNameaVersion
- MetaData(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString, aVersion: TCollection_ExtendedString): CDM_MetaData
should return the MetaData stored in the DBMS with the meta-data corresponding to the Data. If the MetaDataDriver has version management capabilities the version has to be set in the returned MetaData. aVersion may be NULL MetaData is called by GetMetaData If the version is set to NULL, MetaData should return the last version of the metadata
Parameters (3)aFolderaNameaVersion
- MetaData(aFolder: TCollection_ExtendedString, aName: TCollection_ExtendedString): CDM_MetaData
calls MetaData with an empty version
Parameters (2)aFolderaName
- LastVersion(aMetaData: CDM_MetaData): CDM_MetaData
by default returns aMetaDATA should return the MetaData stored in the DBMS with the meta-data corresponding to the path. If the MetaDataDriver has version management capabilities the version has to be set in the returned MetaData. MetaData is called by GetMetaData If the version is not included in the path, MetaData should return the last version of the metadata is deferred;
Parameters (1)aMetaData
- CreateMetaData(aDocument: CDM_Document, aFileName: TCollection_ExtendedString): CDM_MetaData
should create meta-data corresponding to aData and maintaining a meta-link between these meta-data and aFileName CreateMetaData is called by CreateData If the metadata-driver has version capabilities, version must be set in the returned Data.
Parameters (2)aDocumentaFileName
- FindFolder(aFolder: TCollection_ExtendedString): booleanParameters (1)
aFolder
CDF_MetaDataDriverFactory
Static methods(2)
- get_type_name(): string
Instance methods(2)
CDF_Store
Constructors(1)
- constructor(aDocument: CDM_Document): CDF_Store
creates a store list from the document of the current selection.
Parameters (1)aDocument
Instance methods(25)
returns the folder in which the current document will be stored.
returns the name under which the current document will be stored
- IsStored(): boolean
returns true if the current document is already stored
- IsModified(): boolean
- CurrentIsConsistent(): boolean
- IsConsistent(): boolean
- HasAPreviousVersion(): boolean
- IsMainDocument(): boolean
returns true if the currentdocument is the main one, ie the document of the current selection.
- SetFolder(aFolder: TCollection_ExtendedString): boolean
defines the folder in which the document should be stored. returns true if the Folder exists, false otherwise.
Parameters (1)aFolder
- SetFolder_2(aFolder: string): boolean
defines the folder in which the document should be stored. returns true if the Folder exists, false otherwise.
Parameters (1)aFolder
defines the name under which the document should be stored.
Parameters (1)aName
- SetName_1(aName: string): CDF_StoreSetNameStatus
defines the name under which the document should be stored.
Parameters (1)aName
- SetComment(aComment: string): voidParameters (1)
aComment
defines the name under which the document should be stored. uses for example after modification of the folder.
- SetPreviousVersion(aPreviousVersion: string): booleanParameters (1)
aPreviousVersion
- Realize(theRange?: Message_ProgressRange): voidParameters (1)
theRange
- Path(): string
returns the complete path of the created meta-data.
returns the path of the previous store is the object is already stored, otherwise an empty string;
returns the description of the format of the main object.
- SetCurrent(aPresentation: string): voidParameters (1)
aPresentation
- SetMain(): void
the two following methods can be used just after Realize or Import - method to know if these methods worked correctly, and if not why.
- AssociatedStatusText(): string
CDF_StoreList
Constructors(1)
- constructor(aDocument: CDM_Document): CDF_StoreListParameters (1)
aDocument
Static methods(2)
- get_type_name(): string
Instance methods(7)
- IsConsistent(): boolean
- Store(aStatusAssociatedText: TCollection_ExtendedString, theRange: Message_ProgressRange): { returnValue: PCDM_StoreStatus; aMetaData: CDM_MetaData; [Symbol.dispose](): void }
stores each object of the storelist in the reverse order of which they had been added.
Parameters (2)aStatusAssociatedText—Mutated in place; read the updated value from this argument after the call.theRange
ReturnsA result object with fields:
returnValue: the C++ return valueaMetaData: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- Init(): void
- More(): boolean
- Next(): void