OCC.TDocStd module¶
This package define CAF main classes.* The standard application root class* The standard document wich contains data* The external reference mechanism between documents* Attributes for Document managementStandard documents offer you a ready-to-usedocument containing a TDF-based datastructure. The documents themselves arecontained in a class inheriting fromTDocStd_Application which manages creation,storage and retrieval of documents.You can implement undo and redo in yourdocument, and refer from the data framework ofone document to that of another one. This isdone by means of external link attributes, whichstore the path and the entry of external links. Tosum up, standard documents alone provideaccess to the data framework. They also allowyou to:- Update external links- Manage the saving and opening of data- Manage undo/redo functionality.NoteFor information on the relations between thiscomponent of OCAF and the others, refer to theOCAF User’s Guide.
-
class
Handle_TDocStd_Application
(*args)¶ Bases:
OCC.CDF.Handle_CDF_Application
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_ApplicationDelta
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_CompoundDelta
(*args)¶ Bases:
OCC.TDF.Handle_TDF_Delta
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_DataMapNodeOfLabelIDMapDataMap
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_MapNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_Document
(*args)¶ Bases:
OCC.CDM.Handle_CDM_Document
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_Modified
(*args)¶ Bases:
OCC.TDF.Handle_TDF_Attribute
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_MultiTransactionManager
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_Owner
(*args)¶ Bases:
OCC.TDF.Handle_TDF_Attribute
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_SequenceNodeOfSequenceOfApplicationDelta
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_SeqNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_SequenceNodeOfSequenceOfDocument
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_SeqNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_XLink
(*args)¶ Bases:
OCC.TDF.Handle_TDF_Attribute
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_TDocStd_XLinkRoot
(*args)¶ Bases:
OCC.TDF.Handle_TDF_Attribute
-
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
()¶
-
-
class
TDocStd_Application
(*args, **kwargs)¶ Bases:
OCC.CDF.CDF_Application
-
Close
()¶ - Close the given document. the document is not any more handled by the applicative session.
Parameters: aDoc (Handle_TDocStd_Document &) – Return type: None
-
GetDocument
()¶ - Constructs the new document aDoc. aDoc is identified by the index index which is any integer between 1 and n where n is the number of documents returned by NbDocument. Example Handle_TDocStd_Application anApp; if (!CafTest::Find(A)) return 1; Handle_TDocStd aDoc; Standard_Integer nbdoc = anApp->NbDocuments(); for (Standard_Integer i = 1; i <= nbdoc; i++) { aApp->GetDocument(i,aDoc);
Parameters: - index (int) –
- aDoc (Handle_TDocStd_Document &) –
Return type:
-
GetHandle
()¶
-
InitDocument
()¶ - Initialize the document aDoc for the applicative session. This virtual function is called by NewDocument and is to be redefined for each specific application. Modified flag (different of disk version) ============= to open/save a document =======================
Parameters: aDoc (Handle_TDocStd_Document &) – Return type: void
-
IsDriverLoaded
()¶ - Check if meta data driver was successfully loaded by the application constructor
Return type: bool
-
IsInSession
()¶ - Returns an index for the document found in the path path in this applicative session. If the returned value is 0, the document is not present in the applicative session. This method can be used for the interactive part of an application. For instance, on a call to Open, the document to be opened may already be in memory. IsInSession checks to see if this is the case. Open can be made to depend on the value of the index returned: if IsInSession returns 0, the document is opened; if it returns another value, a message is displayed asking the user if he wants to override the version of the document in memory. Example: Standard_Integer insession = A->IsInSession(aDoc); if (insession > 0) { cout << ‘document ‘ << insession << ‘ is already in session’ << endl; return 0; }
Parameters: path (TCollection_ExtendedString &) – Return type: int
-
NbDocuments
()¶ - returns the number of documents handled by the current applicative session.
Return type: int
-
NewDocument
()¶ - Constructs the empty new document aDoc. This document will have the format format. If InitDocument is redefined for a specific application, the new document is handled by the applicative session.
Parameters: - format (TCollection_ExtendedString &) –
- aDoc (Handle_TDocStd_Document &) –
Return type: void
-
Open
()¶ - Retrieves the document aDoc stored under the name aName in the directory directory. In order not to override a version of aDoc which is already in memory, this method can be made to depend on the value returned by IsInSession.
Parameters: - path (TCollection_ExtendedString &) –
- aDoc (Handle_TDocStd_Document &) –
Return type: PCDM_ReaderStatus
-
ResourcesName
()¶ - Returns the name of the file containing the resources of this application. In a resource file, the application associates the schema name of the document with the storage and retrieval plug-ins that are to be loaded for each document. On retrieval, the application reads the schema name in the heading of the CSF file and loads the plug-in indicated in the resource file. This plug-in instantiates the actual driver for transient-persistent conversion. Your application can bring this process into play by defining a class which inherits CDF_Application and redefines the function which returns the appropriate resources file. At this point, the function Retrieve and the class CDF_Store can be called. This allows you to deal with storage and retrieval of - as well as copying and pasting - documents. To implement a class like this, several virtual functions should be redefined. In particular, you must redefine the abstract function Resources inherited from the superclass CDM_Application.
Return type: char *
-
Save
()¶ - Save aDoc active document. Exceptions: Standard_NotImplemented if the document was not retrieved in the applicative session by using Open.
Parameters: aDoc (Handle_TDocStd_Document &) – Return type: PCDM_StoreStatus - Save the document overwriting the previous file
Parameters: - aDoc (Handle_TDocStd_Document &) –
- theStatusMessage (TCollection_ExtendedString &) –
Return type: PCDM_StoreStatus
-
SaveAs
()¶ - Save the active document in the file <name> in the path <path> ; o verwrites the file if it already exists.
Parameters: - aDoc (Handle_TDocStd_Document &) –
- path (TCollection_ExtendedString &) –
Return type: PCDM_StoreStatus
- Save the active document in the file <name> in the path <path> . overwrite the file if it already exist.
Parameters: - aDoc (Handle_TDocStd_Document &) –
- path (TCollection_ExtendedString &) –
- theStatusMessage (TCollection_ExtendedString &) –
Return type: PCDM_StoreStatus
-
thisown
¶ The membership flag
-
-
class
TDocStd_ApplicationDelta
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
Return type: None -
DumpToString
()¶ TDocStd_ApplicationDelta_DumpToString(TDocStd_ApplicationDelta self) -> std::string
-
GetDocuments
()¶ Return type: TDocStd_SequenceOfDocument
-
GetHandle
()¶
-
GetName
()¶ Return type: TCollection_ExtendedString
-
thisown
¶ The membership flag
-
-
class
TDocStd_CompoundDelta
(*args)¶ Bases:
OCC.TDF.TDF_Delta
- Creates a compound delta. Validates <self> at <aBeginTime>. If applied, it restores the TDF_Data in the state it was at <anEndTime>. Reserved to TDF_Data.
Return type: None -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TDocStd_DataMapIteratorOfLabelIDMapDataMap
(*args)¶ Bases:
OCC.TCollection.TCollection_BasicMapIterator
Return type: None Parameters: aMap (TDocStd_LabelIDMapDataMap &) – Return type: None -
thisown
¶ The membership flag
-
-
class
TDocStd_DataMapNodeOfLabelIDMapDataMap
(*args)¶ Bases:
OCC.TCollection.TCollection_MapNode
Parameters: - K (TDF_Label &) –
- I (TDF_IDMap &) –
- n (TCollection_MapNodePtr &) –
Return type: -
GetHandle
()¶
-
thisown
¶ The membership flag
-
class
TDocStd_Document
(*args)¶ Bases:
OCC.CDM.CDM_Document
- Constructs a document object defined by the string astorageformat.
Parameters: astorageformat (TCollection_ExtendedString &) – Return type: None -
AbortCommand
()¶ - Abort the Command transaction. Does nothing If there is no Command transaction open.
Return type: None
-
BeforeClose
()¶ - Prepares document for closing
Return type: void
-
ChangeStorageFormat
()¶ - methods for the nested transaction mode
Parameters: newStorageFormat (TCollection_ExtendedString &) – Return type: void
-
CommitCommand
()¶ - Commits documents transactions and fills the transaction manager with documents that have been changed during the transaction. If no command transaction is open, nothing is done. Returns True if a new delta has been added to myUndos.
Return type: bool
-
static
Get
(*args) → OCC.TDocStd.Handle_TDocStd_Document¶ - Will Abort any execution, clear fields returns the document which contains <L>. raises an exception if the document is not found.
Parameters: L (TDF_Label &) – Return type: Handle_TDocStd_Document
-
GetAvailableRedos
()¶ - Returns the number of redos stored in this document. If this figure is greater than 0, the method Redo can be used.
Return type: int
-
GetAvailableUndos
()¶ - Returns the number of undos stored in this document. If this figure is greater than 0, the method Undo can be used.
Return type: int
-
GetData
()¶ Return type: Handle_TDF_Data
-
GetHandle
()¶
-
GetModified
()¶ - Returns the labels which have been modified in this document.
Return type: TDF_LabelMap
-
GetName
()¶ - raise if <self> is not saved.
Return type: TCollection_ExtendedString
-
GetPath
()¶ - returns the OS path of the file, in wich one <self> is saved. Raise an exception if <self> is not saved.
Return type: TCollection_ExtendedString
-
GetRedos
()¶ Return type: TDF_DeltaList
-
GetUndos
()¶ Return type: TDF_DeltaList
-
InitDeltaCompaction
()¶ - Initializes the procedure of delta compaction Returns false if there is no delta to compact Marks the last delta as a ‘from’ delta
Return type: bool
-
IsChanged
()¶ - returns True if document differs from the state of last saving. this method have to be called only wroking in the transaction mode
Return type: bool
-
Main
()¶ - Returns the main label in this data framework. By definition, this is the label with the entry 0:1.
Return type: TDF_Label
-
OpenCommand
()¶ - Opens a new command transaction in this document. You can use HasOpenCommand to see whether a command is already open. Exceptions Standard_DomainError if a command is already open in this document.
Return type: None
-
PerformDeltaCompaction
()¶ - Performs the procedure of delta compaction Makes all deltas starting from ‘from’ delta till the last one to be one delta.
Return type: bool
-
PurgeModified
()¶ - Remove all modifications. After this call The document becomesagain Valid.
Return type: None
-
Recompute
()¶ - Recompute if the document was not valid and propagate the reccorded modification.
Return type: None
-
Redo
()¶ - Will REDO one step, returns False if no redo was done (Redos == 0). Otherwise, true is returned, and one step in the list of redoes is done again.
Return type: bool
-
RemoveFirstUndo
()¶ - Removes the first undo in the list of document undos. It is used in the application when the undo limit is exceed.
Return type: None
-
SetModificationMode
()¶ - if theTransactionOnly is True changes is denied outside transactions
Parameters: theTransactionOnly (bool) – Return type: None
-
SetModified
()¶ - Notify the label as modified, the Document becomes UnValid. returns True if <L> has been notified as modified.
Parameters: L (TDF_Label &) – Return type: None
-
SetNestedTransactionMode
()¶ - Sets nested transaction mode if isAllowed == Standard_True
Parameters: isAllowed (bool) – default value is Standard_True Return type: None
-
SetSavedTime
()¶ - Say to document what it is not saved. Use value, returned earlier by GetSavedTime().
Parameters: theTime (int) – Return type: None
-
SetUndoLimit
()¶ - Set the limit on the number of Undo Delta stored 0 will disable Undo on the document A negative value means no limit. Note that by default Undo is disabled. Enabling it will take effect with the next call to NewCommand. Of course this limit is the same for Redo
Parameters: L (int) – Return type: None
-
Undo
()¶ - Will UNDO one step, returns False if no undo was done (Undos == 0). Otherwise, true is returned and one step in the list of undoes is undone.
Return type: bool
-
UpdateReferences
()¶ - Set modifications on labels impacted by external references to the entry. The document becomes invalid and must be recomputed.
Parameters: aDocEntry (TCollection_AsciiString &) – Return type: None
-
thisown
¶ The membership flag
-
TDocStd_Document_Get
(*args) → OCC.TDocStd.Handle_TDocStd_Document¶ - Will Abort any execution, clear fields returns the document which contains <L>. raises an exception if the document is not found.
Parameters: L (TDF_Label &) – Return type: Handle_TDocStd_Document
-
class
TDocStd_LabelIDMapDataMap
(*args)¶ Bases:
OCC.TCollection.TCollection_BasicMap
Parameters: NbBuckets (int) – default value is 1 Return type: None -
Assign
()¶ Parameters: Other (TDocStd_LabelIDMapDataMap &) – Return type: TDocStd_LabelIDMapDataMap
-
ChangeFind1
()¶ Parameters: K (TDF_Label &) – Return type: Standard_Address
-
Find1
()¶ Parameters: K (TDF_Label &) – Return type: Standard_Address
-
Set
()¶ Parameters: Other (TDocStd_LabelIDMapDataMap &) – Return type: TDocStd_LabelIDMapDataMap
-
thisown
¶ The membership flag
-
-
class
TDocStd_Modified
(*args)¶ Bases:
OCC.TDF.TDF_Attribute
Return type: None -
Clear
()¶ - remove all modified labels. becomes empty
Parameters: access (TDF_Label &) – Return type: void Return type: None
-
DumpToString
()¶ TDocStd_Modified_DumpToString(TDocStd_Modified self) -> std::string
-
Get
()¶ - if <IsEmpty> raise an exception.
Parameters: access (TDF_Label &) – Return type: TDF_LabelMap - returns modified label map
Return type: TDF_LabelMap
-
GetHandle
()¶
-
static
GetID
()¶ - Modified methods ================
Return type: Standard_GUID
-
IsEmpty
()¶ - API class methods =================
Parameters: access (TDF_Label &) – Return type: bool Return type: bool
-
thisown
¶ The membership flag
-
-
TDocStd_Modified_GetID
()¶ - Modified methods ================
Return type: Standard_GUID
-
class
TDocStd_MultiTransactionManager
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Constructor
Return type: None -
AbortCommand
()¶ - Unsets the flag of started manager transaction and aborts transaction in each document.
Return type: None
-
AddDocument
()¶ - Adds the document to the transaction manager and checks if it has been already added
Parameters: theDoc (Handle_TDocStd_Document &) – Return type: None
-
CommitCommand
()¶ - Commits transaction in all documents and fills the transaction manager with the documents that have been changed during the transaction. Returns True if new data has been added to myUndos. NOTE: All nested transactions in the documents will be commited.
Return type: bool - Makes the same steps as the previous function but defines the name for transaction. Returns True if new data has been added to myUndos.
Parameters: theName (TCollection_ExtendedString &) – Return type: bool
-
Documents
()¶ - Returns the added documents to the transaction manager.
Return type: TDocStd_SequenceOfDocument
-
DumpTransactionToString
()¶ TDocStd_MultiTransactionManager_DumpTransactionToString(TDocStd_MultiTransactionManager self) -> std::string
-
GetAvailableRedos
()¶ - Returns available manager redos.
Return type: TDocStd_SequenceOfApplicationDelta
-
GetAvailableUndos
()¶ - Returns available manager undos.
Return type: TDocStd_SequenceOfApplicationDelta
-
GetHandle
()¶
-
IsNestedTransactionMode
()¶ - Returns Standard_True if NestedTransaction mode is set. Methods for protection of changes outside transactions
Return type: bool
-
OpenCommand
()¶ - Opens transaction in each document and sets the flag that transaction is opened. If there are already opened transactions in the documents, these transactions will be aborted before openning new ones.
Return type: None
-
Redo
()¶ - Redoes the current transaction of the application. It calls the Redo () method of the document being on top of the manager list of redos (list.First()) and moves the list item to the top of the list of manager undos (list.Prepend(item)).
Return type: None
-
RemoveDocument
()¶ - Removes the document from the transaction manager.
Parameters: theDoc (Handle_TDocStd_Document &) – Return type: None
-
RemoveLastUndo
()¶ - Removes undo information from the list of undos of the manager and all documents which have been modified during the transaction.
Return type: None
-
SetModificationMode
()¶ - If theTransactionOnly is True, denies all changes outside transactions.
Parameters: theTransactionOnly (bool) – Return type: None
-
SetNestedTransactionMode
()¶ - Sets nested transaction mode if isAllowed == Standard_True NOTE: field myIsNestedTransactionMode exists only for synchronization between several documents and has no effect on transactions of multitransaction manager.
Parameters: isAllowed (bool) – default value is Standard_True Return type: None
-
SetUndoLimit
()¶ - Sets undo limit for the manager and all documents.
Parameters: theLimit (int) – Return type: None
-
Undo
()¶ - Undoes the current transaction of the manager. It calls the Undo () method of the document being on top of the manager list of undos (list.First()) and moves the list item to the top of the list of manager redos (list.Prepend(item)).
Return type: None
-
thisown
¶ The membership flag
-
class
TDocStd_Owner
(*args)¶ Bases:
OCC.TDF.TDF_Attribute
Return type: None -
DumpToString
()¶ TDocStd_Owner_DumpToString(TDocStd_Owner self) -> std::string
-
GetDocument
()¶ - Owner methods ===============
Parameters: ofdata (Handle_TDF_Data &) – Return type: Handle_TDocStd_Document Return type: Handle_TDocStd_Document
-
GetHandle
()¶
-
static
GetID
()¶ - class methods =============
Return type: Standard_GUID
-
SetDocument
()¶ Parameters: - indata (Handle_TDF_Data &) –
- doc (Handle_TDocStd_Document &) –
- document (Handle_TDocStd_Document &) –
Return type: void
Return type:
-
thisown
¶ The membership flag
-
-
TDocStd_Owner_GetID
()¶ - class methods =============
Return type: Standard_GUID
-
class
TDocStd_PathParser
(*args)¶ Bases:
object
Parameters: path (TCollection_ExtendedString &) – Return type: None -
Extension
()¶ Return type: TCollection_ExtendedString
-
Name
()¶ Return type: TCollection_ExtendedString
-
Path
()¶ Return type: TCollection_ExtendedString
-
Trek
()¶ Return type: TCollection_ExtendedString
-
thisown
¶ The membership flag
-
-
class
TDocStd_SequenceNodeOfSequenceOfApplicationDelta
(*args)¶ Bases:
OCC.TCollection.TCollection_SeqNode
Parameters: - I (Handle_TDocStd_ApplicationDelta &) –
- n (TCollection_SeqNodePtr &) –
- p (TCollection_SeqNodePtr &) –
Return type: -
GetHandle
()¶
-
Value
()¶ Return type: Handle_TDocStd_ApplicationDelta
-
thisown
¶ The membership flag
-
class
TDocStd_SequenceNodeOfSequenceOfDocument
(*args)¶ Bases:
OCC.TCollection.TCollection_SeqNode
Parameters: - I (Handle_TDocStd_Document &) –
- n (TCollection_SeqNodePtr &) –
- p (TCollection_SeqNodePtr &) –
Return type: -
GetHandle
()¶
-
Value
()¶ Return type: Handle_TDocStd_Document
-
thisown
¶ The membership flag
-
class
TDocStd_SequenceOfApplicationDelta
(*args)¶ Bases:
OCC.TCollection.TCollection_BaseSequence
Return type: None Parameters: Other (TDocStd_SequenceOfApplicationDelta &) – Return type: None -
Append
()¶ Parameters: - T (Handle_TDocStd_ApplicationDelta &) –
- S (TDocStd_SequenceOfApplicationDelta &) –
Return type: Return type:
-
Assign
()¶ Parameters: Other (TDocStd_SequenceOfApplicationDelta &) – Return type: TDocStd_SequenceOfApplicationDelta
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Handle_TDocStd_ApplicationDelta
-
First
()¶ Return type: Handle_TDocStd_ApplicationDelta
-
InsertAfter
()¶ Parameters: - Index (int) –
- T (Handle_TDocStd_ApplicationDelta &) –
- Index –
- S (TDocStd_SequenceOfApplicationDelta &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - Index (int) –
- T (Handle_TDocStd_ApplicationDelta &) –
- Index –
- S (TDocStd_SequenceOfApplicationDelta &) –
Return type: Return type:
-
Last
()¶ Return type: Handle_TDocStd_ApplicationDelta
-
Prepend
()¶ Parameters: - T (Handle_TDocStd_ApplicationDelta &) –
- S (TDocStd_SequenceOfApplicationDelta &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Set
()¶ Parameters: Other (TDocStd_SequenceOfApplicationDelta &) – Return type: TDocStd_SequenceOfApplicationDelta
-
Value
()¶ Parameters: Index (int) – Return type: Handle_TDocStd_ApplicationDelta
-
thisown
¶ The membership flag
-
-
class
TDocStd_SequenceOfDocument
(*args)¶ Bases:
OCC.TCollection.TCollection_BaseSequence
Return type: None Parameters: Other (TDocStd_SequenceOfDocument &) – Return type: None -
Append
()¶ Parameters: - T (Handle_TDocStd_Document &) –
- S (TDocStd_SequenceOfDocument &) –
Return type: Return type:
-
Assign
()¶ Parameters: Other (TDocStd_SequenceOfDocument &) – Return type: TDocStd_SequenceOfDocument
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Handle_TDocStd_Document
-
First
()¶ Return type: Handle_TDocStd_Document
-
InsertAfter
()¶ Parameters: - Index (int) –
- T (Handle_TDocStd_Document &) –
- Index –
- S (TDocStd_SequenceOfDocument &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - Index (int) –
- T (Handle_TDocStd_Document &) –
- Index –
- S (TDocStd_SequenceOfDocument &) –
Return type: Return type:
-
Last
()¶ Return type: Handle_TDocStd_Document
-
Prepend
()¶ Parameters: - T (Handle_TDocStd_Document &) –
- S (TDocStd_SequenceOfDocument &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Set
()¶ Parameters: Other (TDocStd_SequenceOfDocument &) – Return type: TDocStd_SequenceOfDocument
-
Value
()¶ Parameters: Index (int) – Return type: Handle_TDocStd_Document
-
thisown
¶ The membership flag
-
-
class
TDocStd_XLink
(*args)¶ Bases:
OCC.TDF.TDF_Attribute
- Initializes fields.
Return type: None -
DocumentEntry
()¶ - Sets the name aDocEntry for the external document in this external link attribute.
Parameters: aDocEntry (TCollection_AsciiString &) – Return type: None - Returns the contents of the document identified by aDocEntry. aDocEntry provides external data to this external link attribute.
Return type: TCollection_AsciiString
-
DumpToString
()¶ TDocStd_XLink_DumpToString(TDocStd_XLink self) -> std::string
-
GetHandle
()¶
-
static
GetID
()¶ - Returns the GUID for external links.
Return type: Standard_GUID
-
LabelEntry
()¶ - Sets the label entry for this external link attribute with the label aLabel. aLabel pilots the importation of data from the document entry.
Parameters: aLabel (TDF_Label &) – Return type: None - Sets the label entry for this external link attribute as a document identified by aLabEntry.
Parameters: aLabEntry (TCollection_AsciiString &) – Return type: None - Returns the contents of the field <myLabelEntry>.
Return type: TCollection_AsciiString
-
static
Set
(*args) → OCC.TDocStd.Handle_TDocStd_XLink¶ - Sets an empty external reference, at the label aLabel.
Parameters: atLabel (TDF_Label &) – Return type: Handle_TDocStd_XLink
-
Update
()¶ - Updates the data referenced in this external link attribute.
Return type: Handle_TDF_Reference
-
thisown
¶ The membership flag
-
class
TDocStd_XLinkIterator
(*args)¶ Bases:
object
- Returns an empty iterator;
Return type: None - Creates an iterator on Reference of <D>.
Parameters: D (Handle_TDocStd_Document &) – Return type: None -
Initialize
()¶ - Restarts an iteration with <D>.
Parameters: D (Handle_TDocStd_Document &) – Return type: None
-
Value
()¶ - Returns the current item; a null handle if there is none.
Return type: TDocStd_XLinkPtr
-
thisown
¶ The membership flag
-
class
TDocStd_XLinkRoot
(*args, **kwargs)¶ Bases:
OCC.TDF.TDF_Attribute
-
DumpToString
()¶ TDocStd_XLinkRoot_DumpToString(TDocStd_XLinkRoot self) -> std::string
-
GetHandle
()¶
-
static
GetID
()¶ - Returns the ID: 2a96b61d-ec8b-11d0-bee7-080009dc3333
Return type: Standard_GUID
-
static
Insert
()¶ - Inserts <anXLinkPtr> at the beginning of the XLink chain.
Parameters: anXLinkPtr (TDocStd_XLinkPtr &) – Return type: void
-
static
Remove
()¶ - Removes <anXLinkPtr> from the XLink chain, if it exists.
Parameters: anXLinkPtr (TDocStd_XLinkPtr &) – Return type: void
-
static
Set
(*args) → OCC.TDocStd.Handle_TDocStd_XLinkRoot¶ - Sets an empty XLinkRoot to Root or gets the existing one. Only one attribute per TDF_Data.
Parameters: aDF (Handle_TDF_Data &) – Return type: Handle_TDocStd_XLinkRoot
-
thisown
¶ The membership flag
-
-
TDocStd_XLinkRoot_GetID
()¶ - Returns the ID: 2a96b61d-ec8b-11d0-bee7-080009dc3333
Return type: Standard_GUID
-
TDocStd_XLinkRoot_Insert
()¶ - Inserts <anXLinkPtr> at the beginning of the XLink chain.
Parameters: anXLinkPtr (TDocStd_XLinkPtr &) – Return type: void
-
TDocStd_XLinkRoot_Remove
()¶ - Removes <anXLinkPtr> from the XLink chain, if it exists.
Parameters: anXLinkPtr (TDocStd_XLinkPtr &) – Return type: void
-
TDocStd_XLinkRoot_Set
(*args) → OCC.TDocStd.Handle_TDocStd_XLinkRoot¶ - Sets an empty XLinkRoot to Root or gets the existing one. Only one attribute per TDF_Data.
Parameters: aDF (Handle_TDF_Data &) – Return type: Handle_TDocStd_XLinkRoot
-
class
TDocStd_XLinkTool
(*args)¶ Bases:
object
Return type: None -
Copy
()¶ - Copy the content of <fromsource> under <intarget>. Noone link is registred. noone check is done. Example Handle_TDocStd_Document DOC, XDOC; TDF_Label L, XL; TDocStd_XLinkTool xlinktool; xlinktool.Copy(L,XL); Exceptions: Standard_DomainError if the contents of fromsource are not entirely in the scope of this label, in other words, are not self-contained. !!! ==> Warning: If the document manages shapes use the next way: TDocStd_XLinkTool xlinktool; xlinktool.Copy(L,XL); TopTools_DataMapOfShapeShape M; TNaming::ChangeShapes(target,M);
Parameters: - intarget (TDF_Label &) –
- fromsource (TDF_Label &) –
Return type: void
-
CopyWithLink
()¶ - Copies the content of the label <fromsource> to the label <intarget>. The link is registred with an XLink attribute by <intarget> label. if the content of <fromsource> is not self-contained, and/or <intarget> has already an XLink attribute, an exception is raised.
Parameters: - intarget (TDF_Label &) –
- fromsource (TDF_Label &) –
Return type:
-
DataSet
()¶ Return type: Handle_TDF_DataSet
-
RelocationTable
()¶ Return type: Handle_TDF_RelocationTable
-
UpdateLink
()¶ - Update the external reference set at <L>. Example Handle_TDocStd_Document aDoc; if (!OCAFTest::GetDocument(1,aDoc)) return 1; Handle_TDataStd_Reference aRef; TDocStd_XLinkTool xlinktool; if (!OCAFTest::Find(aDoc,2),TDataStd_Reference::GetID(),aRef) return 1; xlinktool.UpdateLink(aRef->Label()); Exceptions Standard_DomainError if <L> has no XLink attribute.
Parameters: L (TDF_Label &) – Return type: None
-
thisown
¶ The membership flag
-
-
TDocStd_XLink_GetID
()¶ - Returns the GUID for external links.
Return type: Standard_GUID
-
TDocStd_XLink_Set
(*args) → OCC.TDocStd.Handle_TDocStd_XLink¶ - Sets an empty external reference, at the label aLabel.
Parameters: atLabel (TDF_Label &) – Return type: Handle_TDocStd_XLink
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases
-
class
tdocstd
¶ Bases:
object
-
static
IDList
()¶ - specific GUID of this package ============================= Appends to <anIDList> the list of the attributes IDs of this package. CAUTION: <anIDList> is NOT cleared before use.
Parameters: anIDList (TDF_IDList &) – Return type: void
-
thisown
¶ The membership flag
-
static
-
tdocstd_IDList
()¶ - specific GUID of this package ============================= Appends to <anIDList> the list of the attributes IDs of this package. CAUTION: <anIDList> is NOT cleared before use.
Parameters: anIDList (TDF_IDList &) – Return type: void