OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    TDocStd_Document Class Reference

    The contents of a TDocStd_Application, a document is a container for a data framework composed of labels and attributes. As such, TDocStd_Document is the entry point into the data framework. To gain access to the data, you create a document as follows: occ::handle<TDocStd_Document> MyDF = new TDocStd_Document The document also allows you to manage: More...

    #include <TDocStd_Document.hxx>

    Inheritance diagram for TDocStd_Document:

    Public Member Functions

     TDocStd_Document (const TCollection_ExtendedString &astorageformat)
     Constructs a document object defined by the string astorageformat. If a document is created outside of an application using this constructor, it must be managed by a Handle. Otherwise memory problems could appear: call of TDocStd_Owner::GetDocument creates a occ::handle<TDocStd_Document>, so, releasing it will produce a crash.
    bool IsSaved () const
     the document is saved in a file.
    bool IsChanged () const
     returns True if document differs from the state of last saving. this method have to be called only working in the transaction mode
    void SetSaved ()
     This method have to be called to show document that it has been saved.
    void SetSavedTime (const int theTime)
     Say to document what it is not saved. Use value, returned earlier by GetSavedTime().
    int GetSavedTime () const
     Returns value of <mySavedTime> to be used later in SetSavedTime().
    TCollection_ExtendedString GetName () const
     raise if <me> is not saved.
    TCollection_ExtendedString GetPath () const
     returns the OS path of the file, in which one <me> is saved. Raise an exception if <me> is not saved.
    void SetData (const occ::handle< TDF_Data > &datadata)
    occ::handle< TDF_DataGetData () const
    TDF_Label Main () const
     Returns the main label in this data framework. By definition, this is the label with the entry 0:1.
    bool IsEmpty () const
     Returns True if the main label has no attributes.
    bool IsValid () const
     Returns False if the document has been modified but not recomputed.
    void SetModified (const TDF_Label &L)
     Notify the label as modified, the Document becomes UnValid. returns True if <L> has been notified as modified.
    void PurgeModified ()
     Remove all modifications. After this call The document becomesagain Valid.
    const NCollection_Map< TDF_Label > & GetModified () const
     Returns the labels which have been modified in this document.
    void NewCommand ()
     Launches a new command. This command may be undone.
    bool HasOpenCommand () const
     returns True if a Command transaction is open in the current .
    void 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.
    bool 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.
    void AbortCommand ()
     Abort the Command transaction. Does nothing If there is no Command transaction open.
    int GetUndoLimit () const
     The current limit on the number of undos.
    void SetUndoLimit (const int L)
     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.
    void ClearUndos ()
     Remove all stored Undos and Redos.
    void ClearRedos ()
     Remove all stored Redos.
    int GetAvailableUndos () const
     Returns the number of undos stored in this document. If this figure is greater than 0, the method Undo can be used.
    bool 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.
    int GetAvailableRedos () const
     Returns the number of redos stored in this document. If this figure is greater than 0, the method Redo can be used.
    bool 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.
    const NCollection_List< occ::handle< TDF_Delta > > & GetUndos () const
    const NCollection_List< occ::handle< TDF_Delta > > & GetRedos () const
    void RemoveFirstUndo ()
     Removes the first undo in the list of document undos. It is used in the application when the undo limit is exceed.
    bool InitDeltaCompaction ()
     Initializes the procedure of delta compaction Returns false if there is no delta to compact Marks the last delta as a "from" delta.
    bool PerformDeltaCompaction ()
     Performs the procedure of delta compaction Makes all deltas starting from "from" delta till the last one to be one delta.
    void UpdateReferences (const TCollection_AsciiString &aDocEntry)
     Set modifications on labels impacted by external references to the entry. The document becomes invalid and must be recomputed.
    void Recompute ()
     Recompute if the document was not valid and propagate the recorded modification.
    void Update (const occ::handle< CDM_Document > &aToDocument, const int aReferenceIdentifier, void *const aModifContext) override
     This method Update will be called to signal the end of the modified references list. The document should be recomputed and UpdateFromDocuments should be called. Update should returns True in case of success, false otherwise. In case of Failure, additional information can be given in ErrorString.
    TCollection_ExtendedString StorageFormat () const override
     The Storage Format is the key which is used to determine in the application resources the storage driver plugin, the file extension and other data used to store the document.
    void SetEmptyLabelsSavingMode (const bool isAllowed)
     Sets saving mode for empty labels. If true, empty labels will be saved.
    bool EmptyLabelsSavingMode () const
     Returns saving mode for empty labels.
    virtual void ChangeStorageFormat (const TCollection_ExtendedString &newStorageFormat)
     methods for the nested transaction mode
    void SetNestedTransactionMode (const bool isAllowed=true)
     Sets nested transaction mode if isAllowed == true.
    bool IsNestedTransactionMode () const
     Returns true if mode is set.
    void SetModificationMode (const bool theTransactionOnly)
     if theTransactionOnly is True changes is denied outside transactions
    bool ModificationMode () const
     returns True if changes allowed only inside transactions
    virtual void BeforeClose ()
     Prepares document for closing.
    TDocStd_FormatVersion StorageFormatVersion () const
     Returns version of the format to be used to store the document.
    void ChangeStorageFormatVersion (const TDocStd_FormatVersion theVersion)
     Sets version of the format to be used to store the document.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    Public Member Functions inherited from CDM_Document
    virtual bool Update (TCollection_ExtendedString &ErrorString)
     This method Update will be called to signal the end of the modified references list. The document should be recomputed and UpdateFromDocuments should be called. Update should returns True in case of success, false otherwise. In case of Failure, additional information can be given in ErrorString.
    virtual void Extensions (NCollection_Sequence< TCollection_ExtendedString > &Extensions) const
     by default empties the extensions.
    virtual bool GetAlternativeDocument (const TCollection_ExtendedString &aFormat, occ::handle< CDM_Document > &anAlternativeDocument)
     This method can be redefined to extract another document in a different format. For example, to extract a Shape from an applicative document.
    int CreateReference (const occ::handle< CDM_Document > &anOtherDocument)
     Creates a reference from this document to {anOtherDocument}. Returns a reference identifier. This reference identifier is unique in the document and will not be used for the next references, even after the storing of the document. If there is already a reference between the two documents, the reference is not created, but its reference identifier is returned.
    void RemoveReference (const int aReferenceIdentifier)
     Removes the reference between the From Document and the To Document identified by a reference identifier.
    void RemoveAllReferences ()
     Removes all references having this document for From Document.
    occ::handle< CDM_DocumentDocument (const int aReferenceIdentifier) const
     Returns the To Document of the reference identified by aReferenceIdentifier. If the ToDocument is stored and has not yet been retrieved, this method will retrieve it.
    bool IsInSession (const int aReferenceIdentifier) const
     returns True if the To Document of the reference identified by aReferenceIdentifier is in session, False if it corresponds to a not yet retrieved document.
    bool IsStored (const int aReferenceIdentifier) const
     returns True if the To Document of the reference identified by aReferenceIdentifier has already been stored, False otherwise.
    TCollection_ExtendedString Name (const int aReferenceIdentifier) const
     returns the name of the metadata of the To Document of the reference identified by aReferenceIdentifier.
    void UpdateFromDocuments (void *const aModifContext) const
     call virtual method Update on all referencing documents. This method keeps the list of the documents to process. It may be the starting of an update cycle. If not, the reentrant calls made by Update method (without argument) will append the referencing documents to the list and call the Update method (with arguments). Only the first call to UpdateFromDocuments generate call to Update().
    int ToReferencesNumber () const
     returns the number of references having this document as From Document.
    int FromReferencesNumber () const
     returns the number of references having this document as To Document.
    bool ShallowReferences (const occ::handle< CDM_Document > &aDocument) const
     returns True is this document references aDocument;
    bool DeepReferences (const occ::handle< CDM_Document > &aDocument) const
     returns True is this document references aDocument;
    int CopyReference (const occ::handle< CDM_Document > &aFromDocument, const int aReferenceIdentifier)
     Copies a reference to this document. This method avoid retrieval of referenced document. The arguments are the original document and a valid reference identifier Returns the local identifier.
    bool IsReadOnly () const
     indicates that this document cannot be modified.
    bool IsReadOnly (const int aReferenceIdentifier) const
     indicates that the referenced document cannot be modified,
    void SetIsReadOnly ()
    void UnsetIsReadOnly ()
    void Modify ()
     Indicates that this document has been modified. This method increments the modification counter.
    int Modifications () const
     returns the current modification counter.
    void UnModify ()
    bool IsUpToDate (const int aReferenceIdentifier) const
     returns true if the modification counter found in the given reference is equal to the actual modification counter of the To Document. This method is able to deal with a reference to a not retrieved document.
    void SetIsUpToDate (const int aReferenceIdentifier)
     Resets the modification counter in the given reference to the actual modification counter of its To Document. This method should be called after the application has updated this document.
    void SetComment (const TCollection_ExtendedString &aComment)
     associates a comment with this document.
    void AddComment (const TCollection_ExtendedString &aComment)
     appends a comment into comments of this document.
    void SetComments (const NCollection_Sequence< TCollection_ExtendedString > &aComments)
     associates a comments with this document.
    void Comments (NCollection_Sequence< TCollection_ExtendedString > &aComments) const
     returns the associated comments through <aComments>. Returns empty sequence if no comments are associated.
    const char16_t * Comment () const
     Returns the first of associated comments. By default the comment is an empty string.
    bool IsStored () const
    int StorageVersion () const
     returns the value of the modification counter at the time of storage. By default returns 0.
    void SetMetaData (const occ::handle< CDM_MetaData > &aMetaData)
     associates database information to a document which has been stored. The name of the document is now the name which has beenused to store the data.
    void UnsetIsStored ()
    occ::handle< CDM_MetaDataMetaData () const
    TCollection_ExtendedString Folder () const
    void SetRequestedFolder (const TCollection_ExtendedString &aFolder)
     defines the folder in which the object should be stored.
    TCollection_ExtendedString RequestedFolder () const
    bool HasRequestedFolder () const
    void SetRequestedName (const TCollection_ExtendedString &aName)
     defines the name under which the object should be stored.
    TCollection_ExtendedString RequestedName ()
     Determines under which the document is going to be store. By default the name of the document will be used. If the document has no name its presentation will be used.
    void SetRequestedPreviousVersion (const TCollection_ExtendedString &aPreviousVersion)
    void UnsetRequestedPreviousVersion ()
    bool HasRequestedPreviousVersion () const
    TCollection_ExtendedString RequestedPreviousVersion () const
    void SetRequestedComment (const TCollection_ExtendedString &aComment)
     defines the Comment with which the object should be stored.
    TCollection_ExtendedString RequestedComment () const
    void LoadResources ()
     read (or rereads) the following resource.
    bool FindFileExtension ()
    TCollection_ExtendedString FileExtension ()
     gets the Desktop.Domain.Application.FileFormat.FileExtension resource.
    bool FindDescription ()
    TCollection_ExtendedString Description ()
     gets the FileFormat.Description resource.
    bool IsModified () const
     returns true if the version is greater than the storage version
    Standard_OStreamPrint (Standard_OStream &anOStream) const
    Standard_OStreamoperator<< (Standard_OStream &anOStream)
    bool IsOpened () const
    void Open (const occ::handle< CDM_Application > &anApplication)
    CDM_CanCloseStatus CanClose () const
    void Close ()
    const occ::handle< CDM_Application > & Application () const
    virtual bool CanCloseReference (const occ::handle< CDM_Document > &aDocument, const int aReferenceIdentifier) const
     A referenced document may indicate through this virtual method that it does not allow the closing of aDocument which it references through the reference aReferenceIdentifier. By default returns true.
    virtual void CloseReference (const occ::handle< CDM_Document > &aDocument, const int aReferenceIdentifier)
     A referenced document may update its internal data structure when {aDocument} which it references through the reference {aReferenceIdentifier} is being closed. By default this method does nothing.
    bool IsOpened (const int aReferenceIdentifier) const
     returns true if the document corresponding to the given reference has been retrieved and opened. Otherwise returns false. This method does not retrieve the referenced document
    void CreateReference (const occ::handle< CDM_MetaData > &aMetaData, const int aReferenceIdentifier, const occ::handle< CDM_Application > &anApplication, const int aToDocumentVersion, const bool UseStorageConfiguration)
    int CreateReference (const occ::handle< CDM_MetaData > &aMetaData, const occ::handle< CDM_Application > &anApplication, const int aDocumentVersion, const bool UseStorageConfiguration)
    int ReferenceCounter () const
    virtual void Update ()
     the following method should be used instead:
    occ::handle< CDM_ReferenceReference (const int aReferenceIdentifier) const
    void SetModifications (const int Modifications)
    void SetReferenceCounter (const int aReferenceCounter)
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transientoperator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool IsKind (const opencascade::handle< Standard_Type > &theType) const
     Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    bool IsKind (const char *const theTypeName) const
     Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    Standard_TransientThis () const
     Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Static Public Member Functions

    static occ::handle< TDocStd_DocumentGet (const TDF_Label &L)
     Will Abort any execution, clear fields returns the document which contains <L>. raises an exception if the document is not found.
    static TDocStd_FormatVersion CurrentStorageFormatVersion ()
     Returns current storage format version of the document.
    static constexpr const char * get_type_name ()
     Returns a type descriptor about this object.
    static const opencascade::handle< Standard_Type > & get_type_descriptor ()
     Returns type descriptor of Standard_Transient class.

    Protected Member Functions

    virtual bool CommitTransaction ()
     Returns true done.
    virtual void AbortTransaction ()
    virtual void OpenTransaction ()
     methods for protection of changes outside transactions
    Protected Member Functions inherited from CDM_Document
     CDM_Document ()
     ~CDM_Document () override

    Protected Attributes

    TCollection_ExtendedString myStorageFormat
    NCollection_List< occ::handle< TDF_Delta > > myUndos
    NCollection_List< occ::handle< TDF_Delta > > myRedos
    Protected Attributes inherited from CDM_Document
    bool myResourcesAreLoaded

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.

    Detailed Description

    The contents of a TDocStd_Application, a document is a container for a data framework composed of labels and attributes. As such, TDocStd_Document is the entry point into the data framework. To gain access to the data, you create a document as follows: occ::handle<TDocStd_Document> MyDF = new TDocStd_Document The document also allows you to manage:

    • modifications, providing Undo and Redo functions.
    • command transactions. Warning: The only data saved is the framework (TDF_Data)

    Constructor & Destructor Documentation

    ◆ TDocStd_Document()

    TDocStd_Document::TDocStd_Document ( const TCollection_ExtendedString & astorageformat)

    Constructs a document object defined by the string astorageformat. If a document is created outside of an application using this constructor, it must be managed by a Handle. Otherwise memory problems could appear: call of TDocStd_Owner::GetDocument creates a occ::handle<TDocStd_Document>, so, releasing it will produce a crash.

    Member Function Documentation

    ◆ AbortCommand()

    void TDocStd_Document::AbortCommand ( )

    Abort the Command transaction. Does nothing If there is no Command transaction open.

    ◆ AbortTransaction()

    virtual void TDocStd_Document::AbortTransaction ( )
    protectedvirtual

    ◆ BeforeClose()

    virtual void TDocStd_Document::BeforeClose ( )
    virtual

    Prepares document for closing.

    ◆ ChangeStorageFormat()

    virtual void TDocStd_Document::ChangeStorageFormat ( const TCollection_ExtendedString & newStorageFormat)
    virtual

    methods for the nested transaction mode

    ◆ ChangeStorageFormatVersion()

    void TDocStd_Document::ChangeStorageFormatVersion ( const TDocStd_FormatVersion theVersion)

    Sets version of the format to be used to store the document.

    ◆ ClearRedos()

    void TDocStd_Document::ClearRedos ( )

    Remove all stored Redos.

    ◆ ClearUndos()

    void TDocStd_Document::ClearUndos ( )

    Remove all stored Undos and Redos.

    ◆ CommitCommand()

    bool TDocStd_Document::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.

    ◆ CommitTransaction()

    virtual bool TDocStd_Document::CommitTransaction ( )
    protectedvirtual

    Returns true done.

    ◆ CurrentStorageFormatVersion()

    TDocStd_FormatVersion TDocStd_Document::CurrentStorageFormatVersion ( )
    static

    Returns current storage format version of the document.

    ◆ DumpJson()

    void TDocStd_Document::DumpJson ( Standard_OStream & theOStream,
    int theDepth = -1 ) const

    Dumps the content of me into the stream.

    ◆ EmptyLabelsSavingMode()

    bool TDocStd_Document::EmptyLabelsSavingMode ( ) const

    Returns saving mode for empty labels.

    ◆ Get()

    occ::handle< TDocStd_Document > TDocStd_Document::Get ( const TDF_Label & L)
    static

    Will Abort any execution, clear fields returns the document which contains <L>. raises an exception if the document is not found.

    ◆ GetAvailableRedos()

    int TDocStd_Document::GetAvailableRedos ( ) const

    Returns the number of redos stored in this document. If this figure is greater than 0, the method Redo can be used.

    ◆ GetAvailableUndos()

    int TDocStd_Document::GetAvailableUndos ( ) const

    Returns the number of undos stored in this document. If this figure is greater than 0, the method Undo can be used.

    ◆ GetData()

    occ::handle< TDF_Data > TDocStd_Document::GetData ( ) const

    ◆ GetModified()

    const NCollection_Map< TDF_Label > & TDocStd_Document::GetModified ( ) const

    Returns the labels which have been modified in this document.

    ◆ GetName()

    TCollection_ExtendedString TDocStd_Document::GetName ( ) const

    raise if <me> is not saved.

    ◆ GetPath()

    TCollection_ExtendedString TDocStd_Document::GetPath ( ) const

    returns the OS path of the file, in which one <me> is saved. Raise an exception if <me> is not saved.

    ◆ GetRedos()

    const NCollection_List< occ::handle< TDF_Delta > > & TDocStd_Document::GetRedos ( ) const

    ◆ GetSavedTime()

    int TDocStd_Document::GetSavedTime ( ) const

    Returns value of <mySavedTime> to be used later in SetSavedTime().

    ◆ GetUndoLimit()

    int TDocStd_Document::GetUndoLimit ( ) const

    The current limit on the number of undos.

    ◆ GetUndos()

    const NCollection_List< occ::handle< TDF_Delta > > & TDocStd_Document::GetUndos ( ) const

    ◆ HasOpenCommand()

    bool TDocStd_Document::HasOpenCommand ( ) const

    returns True if a Command transaction is open in the current .

    ◆ InitDeltaCompaction()

    bool TDocStd_Document::InitDeltaCompaction ( )

    Initializes the procedure of delta compaction Returns false if there is no delta to compact Marks the last delta as a "from" delta.

    ◆ IsChanged()

    bool TDocStd_Document::IsChanged ( ) const

    returns True if document differs from the state of last saving. this method have to be called only working in the transaction mode

    ◆ IsEmpty()

    bool TDocStd_Document::IsEmpty ( ) const

    Returns True if the main label has no attributes.

    ◆ IsNestedTransactionMode()

    bool TDocStd_Document::IsNestedTransactionMode ( ) const

    Returns true if mode is set.

    ◆ IsSaved()

    bool TDocStd_Document::IsSaved ( ) const

    the document is saved in a file.

    ◆ IsValid()

    bool TDocStd_Document::IsValid ( ) const

    Returns False if the document has been modified but not recomputed.

    ◆ Main()

    TDF_Label TDocStd_Document::Main ( ) const

    Returns the main label in this data framework. By definition, this is the label with the entry 0:1.

    ◆ ModificationMode()

    bool TDocStd_Document::ModificationMode ( ) const

    returns True if changes allowed only inside transactions

    ◆ NewCommand()

    void TDocStd_Document::NewCommand ( )

    Launches a new command. This command may be undone.

    ◆ OpenCommand()

    void TDocStd_Document::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.

    ◆ OpenTransaction()

    virtual void TDocStd_Document::OpenTransaction ( )
    protectedvirtual

    methods for protection of changes outside transactions

    ◆ PerformDeltaCompaction()

    bool TDocStd_Document::PerformDeltaCompaction ( )

    Performs the procedure of delta compaction Makes all deltas starting from "from" delta till the last one to be one delta.

    ◆ PurgeModified()

    void TDocStd_Document::PurgeModified ( )

    Remove all modifications. After this call The document becomesagain Valid.

    ◆ Recompute()

    void TDocStd_Document::Recompute ( )

    Recompute if the document was not valid and propagate the recorded modification.

    ◆ Redo()

    bool TDocStd_Document::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.

    ◆ RemoveFirstUndo()

    void TDocStd_Document::RemoveFirstUndo ( )

    Removes the first undo in the list of document undos. It is used in the application when the undo limit is exceed.

    ◆ SetData()

    void TDocStd_Document::SetData ( const occ::handle< TDF_Data > & data)

    ◆ SetEmptyLabelsSavingMode()

    void TDocStd_Document::SetEmptyLabelsSavingMode ( const bool isAllowed)

    Sets saving mode for empty labels. If true, empty labels will be saved.

    ◆ SetModificationMode()

    void TDocStd_Document::SetModificationMode ( const bool theTransactionOnly)

    if theTransactionOnly is True changes is denied outside transactions

    ◆ SetModified()

    void TDocStd_Document::SetModified ( const TDF_Label & L)

    Notify the label as modified, the Document becomes UnValid. returns True if <L> has been notified as modified.

    ◆ SetNestedTransactionMode()

    void TDocStd_Document::SetNestedTransactionMode ( const bool isAllowed = true)

    Sets nested transaction mode if isAllowed == true.

    ◆ SetSaved()

    void TDocStd_Document::SetSaved ( )

    This method have to be called to show document that it has been saved.

    ◆ SetSavedTime()

    void TDocStd_Document::SetSavedTime ( const int theTime)

    Say to document what it is not saved. Use value, returned earlier by GetSavedTime().

    ◆ SetUndoLimit()

    void TDocStd_Document::SetUndoLimit ( const int L)

    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.

    ◆ StorageFormat()

    TCollection_ExtendedString TDocStd_Document::StorageFormat ( ) const
    overridevirtual

    The Storage Format is the key which is used to determine in the application resources the storage driver plugin, the file extension and other data used to store the document.

    Implements CDM_Document.

    ◆ StorageFormatVersion()

    TDocStd_FormatVersion TDocStd_Document::StorageFormatVersion ( ) const

    Returns version of the format to be used to store the document.

    ◆ Undo()

    bool TDocStd_Document::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.

    ◆ Update()

    void TDocStd_Document::Update ( const occ::handle< CDM_Document > & aToDocument,
    const int aReferenceIdentifier,
    void *const aModifContext )
    overridevirtual

    This method Update will be called to signal the end of the modified references list. The document should be recomputed and UpdateFromDocuments should be called. Update should returns True in case of success, false otherwise. In case of Failure, additional information can be given in ErrorString.

    Update the document by propagation

    Update the document from internal stored modifications. If you want to undoing this operation, please call NewCommand before.

    to change format (advanced programming)

    Reimplemented from CDM_Document.

    ◆ UpdateReferences()

    void TDocStd_Document::UpdateReferences ( const TCollection_AsciiString & aDocEntry)

    Set modifications on labels impacted by external references to the entry. The document becomes invalid and must be recomputed.

    Field Documentation

    ◆ myRedos

    NCollection_List<occ::handle<TDF_Delta> > TDocStd_Document::myRedos
    protected

    ◆ myStorageFormat

    TCollection_ExtendedString TDocStd_Document::myStorageFormat
    protected

    ◆ myUndos

    NCollection_List<occ::handle<TDF_Delta> > TDocStd_Document::myUndos
    protected

    The documentation for this class was generated from the following file: