OCC.CDF module¶
-
class
CDF_Application
(*args, **kwargs)¶ Bases:
OCC.CDM.CDM_Application
-
CanClose
()¶ Parameters: aDocument (Handle_CDM_Document &) – Return type: CDM_CanCloseStatus
-
CanRetrieve
()¶ Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
- aFolder –
- aName –
- aVersion (TCollection_ExtendedString &) –
Return type: PCDM_ReaderStatus
Return type: PCDM_ReaderStatus
-
Close
()¶ - removes the document of the current session directory and closes the document;
Parameters: aDocument (Handle_CDM_Document &) – Return type: None
-
DefaultExtension
()¶ Return type: Standard_ExtString
-
DefaultFolder
()¶ Return type: Standard_ExtString
-
Format
()¶ - try to retrieve a Format directly in the file or in application resource by using extension. returns True if found;
Parameters: - aFileName (TCollection_ExtendedString &) –
- theFormat (TCollection_ExtendedString &) –
Return type:
-
Formats
()¶ Parameters: Formats (TColStd_SequenceOfExtendedString &) – Return type: void
-
GetHandle
()¶
-
GetRetrieveStatus
()¶ - Checks status after Retrieve
Return type: PCDM_ReaderStatus
-
static
Load
(*args) → OCC.CDF.Handle_CDF_Application¶ - plugs an application. //! Open is used - for opening a Document that has been created in an application - for opening a Document from the database - for opening a Document from a file. The Open methods always add the document in the session directory and calls the virtual Activate method. The document is considered to be opened until Close is used. To be storable, a document must be opened by an application since the application resources are needed to store it.
Parameters: aGUID (Standard_GUID &) – Return type: Handle_CDF_Application
-
Open
()¶ - puts the document in the current session directory and calls the virtual method Activate on it.
Parameters: aDocument (Handle_CDM_Document &) – Return type: None
-
Reader
()¶ Parameters: aFileName (TCollection_ExtendedString &) – Return type: Handle_PCDM_Reader
-
ReaderFromFormat
()¶ Parameters: aFormat (TCollection_ExtendedString &) – Return type: Handle_PCDM_Reader
-
Retrieve
()¶ - This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. The content of {aFolder}, {aName} and {aVersion} depends on the Database Manager system. If the DBMS is only based on the OS, {aFolder} is a directory and {aName} is the name of a file. In this case the use of the syntax with {aVersion} has no sense. For example: //! Handle_CDM_Document theDocument=myApplication->Retrieve(‘/home/cascade’,’box.dsg’); If the DBMS is EUCLID/Design Manager, {aFolder}, {aName} have the form they have in EUCLID/Design Manager. For example: //! Handle_CDM_Document theDocument=myApplication->Retrieve(‘|user|cascade’,’box’); //! Since the version is not specified in this syntax, the latest wil be used. A link is kept with the database through an instance of CDM_MetaData
Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
- UseStorageConfiguration (bool) – default value is Standard_True
Return type: - This method retrieves a document from the database. If the Document references other documents which have been updated, the latest version of these documents will be used if {UseStorageConfiguration} is Standard_True. – If the DBMS is only based on the OS, this syntax should not be used. //! If the DBMS is EUCLID/Design Manager, {aFolder}, {aName} and {aVersion} have the form they have in EUCLID/Design Manager. For example: //! Handle_CDM_Document theDocument=myApplication->Retrieve(‘|user|cascade’,’box’,‘2’); A link is kept with the database through an instance of CDM_MetaData
Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
- aVersion (TCollection_ExtendedString &) –
- UseStorageConfiguration (bool) – default value is Standard_True
Return type:
-
thisown
¶ The membership flag
-
-
CDF_Application_Load
(*args) → OCC.CDF.Handle_CDF_Application¶ - plugs an application. //! Open is used - for opening a Document that has been created in an application - for opening a Document from the database - for opening a Document from a file. The Open methods always add the document in the session directory and calls the virtual Activate method. The document is considered to be opened until Close is used. To be storable, a document must be opened by an application since the application resources are needed to store it.
Parameters: aGUID (Standard_GUID &) – Return type: Handle_CDF_Application
-
class
CDF_Directory
(*args)¶ Bases:
OCC.Standard.Standard_Transient
- Creates an empty directory.
Return type: None -
Add
()¶ - adds a document into the directory.
Parameters: aDocument (Handle_CDM_Document &) – Return type: None
-
Contains
()¶ - Returns true if the document aDocument is in the directory
Parameters: aDocument (Handle_CDM_Document &) – Return type: bool
-
GetHandle
()¶
-
Last
()¶ - returns the last document (if any) which has been added in the directory.
Return type: Handle_CDM_Document
-
thisown
¶ The membership flag
-
class
CDF_DirectoryIterator
(*args)¶ Bases:
object
- creates an Iterator with the directory of the current CDF.
Return type: None Parameters: aDirectory (Handle_CDF_Directory &) – Return type: None -
Document
()¶ - Returns item value of current entry
Return type: Handle_CDM_Document
-
NextDocument
()¶ - Go to the next entry (if there is not, Value will raise an exception)
Return type: None
-
thisown
¶ The membership flag
-
class
CDF_FWOSDriver
(*args)¶ Bases:
OCC.CDF.CDF_MetaDataDriver
- initializes the MetaDatadriver with its specific name.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
CDF_MetaDataDriver
(*args, **kwargs)¶ Bases:
OCC.Standard.Standard_Transient
-
BuildFileName
()¶ Parameters: aDocument (Handle_CDM_Document &) – Return type: TCollection_ExtendedString
-
CreateDependsOn
()¶ - Creates a ‘Depends On’ relation between two Datas. By default does nothing
Parameters: - aFirstData (Handle_CDM_MetaData &) –
- aSecondData (Handle_CDM_MetaData &) –
Return type: void
-
CreateMetaData
()¶ - 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: - aDocument (Handle_CDM_Document &) –
- aFileName (TCollection_ExtendedString &) –
Return type:
-
CreateReference
()¶ Parameters: Return type: void
-
DefaultFolder
()¶ Return type: TCollection_ExtendedString
-
Find
()¶ - should indicate whether meta-data exist in the DBMS corresponding to the Data. aVersion may be NULL;
Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
- aVersion (TCollection_ExtendedString &) –
Return type: - calls Find with an empty version
Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
Return type:
-
GetHandle
()¶
-
HasReadPermission
()¶ Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
- aVersion (TCollection_ExtendedString &) –
Return type:
-
HasVersion
()¶ - by default return Standard_True.
Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
Return type:
-
HasVersionCapability
()¶ - returns true if the MetaDataDriver can manage different versions of a Data. By default, returns Standard_False.
Return type: bool
-
LastVersion
()¶ - 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: aMetaData (Handle_CDM_MetaData &) – Return type: Handle_CDM_MetaData
-
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: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
- aVersion (TCollection_ExtendedString &) –
Return type: - calls MetaData with an empty version
Parameters: - aFolder (TCollection_ExtendedString &) –
- aName (TCollection_ExtendedString &) –
Return type:
-
ReferenceIterator
()¶ Return type: Handle_PCDM_ReferenceIterator
-
SetName
()¶ - this methods is usefull 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: - aDocument (Handle_CDM_Document &) –
- aName (TCollection_ExtendedString &) –
Return type:
-
thisown
¶ The membership flag
-
-
class
CDF_MetaDataDriverFactory
(*args, **kwargs)¶ Bases:
OCC.Standard.Standard_Transient
-
Build
()¶ Return type: Handle_CDF_MetaDataDriver
-
GetHandle
()¶
-
thisown
¶ The membership flag
-
-
class
CDF_Session
(*args)¶ Bases:
OCC.Standard.Standard_Transient
Return type: None -
CurrentApplication
()¶ Return type: Handle_CDF_Application
-
static
CurrentSession
(*args) → OCC.CDF.Handle_CDF_Session¶ - returns the only one instance of Session that has been created.
Return type: Handle_CDF_Session
-
Directory
()¶ - returns the directory of the session;
Return type: Handle_CDF_Directory
-
GetHandle
()¶
-
MetaDataDriver
()¶ Return type: Handle_CDF_MetaDataDriver
-
thisown
¶ The membership flag
-
-
CDF_Session_CurrentSession
(*args) → OCC.CDF.Handle_CDF_Session¶ - returns the only one instance of Session that has been created.
Return type: Handle_CDF_Session
-
class
CDF_Store
(*args)¶ Bases:
object
- creates a store list from the document of the current selection.
Parameters: aDocument (Handle_CDM_Document &) – Return type: None -
AssociatedStatusText
()¶ Return type: Standard_ExtString
-
Check
()¶ - Checks will make the following control. Check must be used before using Create method. Check will not be done twice by Create. //! 1) controls whether there is one document in the current selection. 2) controls whether there is a storage driver for the document. 3) controls whether the applicationdatatype associated with the driver exists as metadata in the metadata manager (Design Manager for example). 4) controls whether there is a storage driver for each subcomponents of the document if there are. If the control fails for a subcomponent, the control stops and name and type of this subcomponent can be get with LastName method 5) controls whether the applicationdatatype associated with the driver of each subcomponent exists as metadata in the metadata manager (Design Manager for example). If the control fails for a subcomponent, the control stops and name and type of this subcomponent can be get with LastName method
Return type: CDF_TryStoreStatus
-
Comment
()¶ Return type: Standard_ExtString
-
Component
()¶ - Returns item value of current entry
Return type: Standard_ExtString
-
Description
()¶ - returns the description of the format of the main object.
Return type: Standard_ExtString
-
Folder
()¶ - returns the folder in which the current document will be stored.
Return type: Standard_ExtString
-
IsMainDocument
()¶ - returns true if the currentdocument is the main one, ie the document of the current selection.
Return type: bool
-
LastName
()¶ - in the case of a subcomponent for which no storage driver exists, returns the name of the subcomponent if there is one.
Return type: Standard_ExtString
-
MetaDataPath
()¶ - returns the path of the previous store is the object is already stored, otherwise an empty string;
Return type: Standard_ExtString
-
Name
()¶ - returns the name under which the current document will be stored
Return type: Standard_ExtString
-
NextComponent
()¶ - Go to the next entry (if there is not, Value will raise an exception)
Return type: None
-
Path
()¶ - returns the complete path of the created meta-data.
Return type: Standard_ExtString
-
PreviousVersion
()¶ Return type: Standard_ExtString
-
RecheckName
()¶ - defines the name under which the document should be stored. uses for example after modification of the folder.
Return type: CDF_StoreSetNameStatus
-
SetFolder
()¶ - defines the folder in which the document should be stored. returns Standard_True if the Folder exists, Standard_False otherwise.
Parameters: aFolder (TCollection_ExtendedString &) – Return type: bool - defines the folder in which the document should be stored. returns Standard_True if the Folder exists, Standard_False otherwise.
Parameters: aFolder (Standard_ExtString) – Return type: bool
-
SetMain
()¶ - the two following methods can be used just after Realize or Import – method to know if thes methods worked correctly, and if not why.
Return type: None
-
SetName
()¶ - defines the name under which the document should be stored.
Parameters: aName (Standard_ExtString) – Return type: CDF_StoreSetNameStatus - defines the name under which the document should be stored.
Parameters: aName (TCollection_ExtendedString &) – Return type: CDF_StoreSetNameStatus
-
StoreStatus
()¶ Return type: PCDM_StoreStatus
-
SubComponentStatus
()¶ Parameters: aPresentation (Standard_ExtString) – Return type: CDF_SubComponentStatus
-
thisown
¶ The membership flag
-
class
CDF_StoreList
(*args)¶ Bases:
OCC.Standard.Standard_Transient
Parameters: aDocument (Handle_CDM_Document &) – Return type: None -
GetHandle
()¶
-
Store
()¶ - stores each object of the storelist in the reverse order of which they had been added.
Parameters: - aMetaData (Handle_CDM_MetaData &) –
- aStatusAssociatedText (TCollection_ExtendedString &) –
Return type: PCDM_StoreStatus
-
Value
()¶ Return type: Handle_CDM_Document
-
thisown
¶ The membership flag
-
-
class
Handle_CDF_Application
(*args)¶ Bases:
OCC.CDM.Handle_CDM_Application
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_CDF_Directory
(*args)¶ Bases:
OCC.Standard.Handle_Standard_Transient
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_CDF_FWOSDriver
(*args)¶ Bases:
OCC.CDF.Handle_CDF_MetaDataDriver
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_CDF_MetaDataDriver
(*args)¶ Bases:
OCC.Standard.Handle_Standard_Transient
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_CDF_MetaDataDriverFactory
(*args)¶ Bases:
OCC.Standard.Handle_Standard_Transient
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_CDF_Session
(*args)¶ Bases:
OCC.Standard.Handle_Standard_Transient
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_CDF_StoreList
(*args)¶ Bases:
OCC.Standard.Handle_Standard_Transient
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases