OCC Main Page | ApplicationFramework | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

# ApplicationFramework
TKLCAF
TDocStd

# TDocStd_MultiTransactionManager Class Reference

Class for synchronization of transactions within multiple documents.
Each transaction of this class involvess one transaction in each modified document.
.

`#include <TDocStd_MultiTransactionManager.hxx>`

## Public Member Functions
Standard_EXPORT | TDocStd_MultiTransactionManager ()
| Constructor .
Standard_EXPORT void | SetUndoLimit (const Standard_Integer theLimit)
| Sets undo limit for the manager and all documents. .
Standard_Integer | GetUndoLimit () const
| Returns undo limit for the manager. .
Standard_EXPORT void | 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)). .
Standard_EXPORT void | 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)). .
const TDocStd_SequenceOfApplicationDelta & | GetAvailableUndos () const
| Returns available manager undos. .
const TDocStd_SequenceOfApplicationDelta & | GetAvailableRedos () const
| Returns available manager redos. .
Standard_EXPORT void | 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. .
Standard_EXPORT void | AbortCommand ()
| Unsets the flag of started manager transaction and aborts transaction in each document. .
Standard_EXPORT Standard_Boolean | 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. .
Standard_EXPORT Standard_Boolean | CommitCommand (const TCollection_ExtendedString &theName)
| Makes the same steps as the previous function but defines the name for transaction. Returns True if new data has been added to myUndos. .
Standard_Boolean | HasOpenCommand () const
| Returns true if a transaction is opened. .
Standard_EXPORT void | RemoveLastUndo ()
| Removes undo information from the list of undos of the manager and all documents which have been modified during the transaction. .
Standard_EXPORT void | DumpTransaction (Standard_OStream &theOS) const
| Dumps transactions in undos and redos .
Standard_EXPORT void | AddDocument (const Handle(TDocStd_Document)&theDoc)
| Adds the document to the transaction manager and checks if it has been already added .
Standard_EXPORT void | RemoveDocument (const Handle(TDocStd_Document)&theDoc)
| Removes the document from the transaction manager. .
const TDocStd_SequenceOfDocument & | Documents () const
| Returns the added documents to the transaction manager. .
Standard_EXPORT void | SetNestedTransactionMode (const Standard_Boolean isAllowed=Standard_True)
| 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. .
Standard_Boolean | IsNestedTransactionMode () const
| Returns Standard_True if NestedTransaction mode is set. //! Methods for protection of changes outside transactions .
Standard_EXPORT void | SetModificationMode (const Standard_Boolean theTransactionOnly)
| If theTransactionOnly is True, denies all changes outside transactions. .
Standard_Boolean | ModificationMode () const
| Returns True if changes are allowed only inside transactions. .
Standard_EXPORT void | ClearUndos ()
| Clears undos in the manager and in documents. .
Standard_EXPORT void | ClearRedos ()
| Clears redos in the manager and in documents. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const
## Private Attributes
TDocStd_SequenceOfDocument | myDocuments
TDocStd_SequenceOfApplicationDelta | myUndos
TDocStd_SequenceOfApplicationDelta | myRedos
Standard_Integer | myUndoLimit
Standard_Boolean | myOpenTransaction
Standard_Boolean | myIsNestedTransactionMode
Standard_Boolean | myOnlyTransactionModification

## Constructor & Destructor Documentation

Standard_EXPORT TDocStd_MultiTransactionManager::TDocStd_MultiTransactionManager | ( |  | ) |

## Member Function Documentation

Standard_EXPORT void TDocStd_MultiTransactionManager::AbortCommand | ( |  | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::AddDocument | ( | const Handle(TDocStd_Document)& | theDoc | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::ClearRedos | ( |  | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::ClearUndos | ( |  | ) |

Standard_EXPORT Standard_Boolean TDocStd_MultiTransactionManager::CommitCommand | ( | const TCollection_ExtendedString & | theName | ) |

Standard_EXPORT Standard_Boolean TDocStd_MultiTransactionManager::CommitCommand | ( |  | ) |

const TDocStd_SequenceOfDocument & TDocStd_MultiTransactionManager::Documents | ( |  | ) | const`[inline]`

Standard_EXPORT void TDocStd_MultiTransactionManager::DumpTransaction | ( | Standard_OStream & | theOS | ) | const

const TDocStd_SequenceOfApplicationDelta & TDocStd_MultiTransactionManager::GetAvailableRedos | ( |  | ) | const`[inline]`

const TDocStd_SequenceOfApplicationDelta & TDocStd_MultiTransactionManager::GetAvailableUndos | ( |  | ) | const`[inline]`

Standard_Integer TDocStd_MultiTransactionManager::GetUndoLimit | ( |  | ) | const`[inline]`

Standard_EXPORT const TDocStd_MultiTransactionManager::Handle | ( | Standard_Type |  | ) | const

Standard_Boolean TDocStd_MultiTransactionManager::HasOpenCommand | ( |  | ) | const`[inline]`

Standard_Boolean TDocStd_MultiTransactionManager::IsNestedTransactionMode | ( |  | ) | const`[inline]`

Standard_Boolean TDocStd_MultiTransactionManager::ModificationMode | ( |  | ) | const`[inline]`

Standard_EXPORT void TDocStd_MultiTransactionManager::OpenCommand | ( |  | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::Redo | ( |  | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::RemoveDocument | ( | const Handle(TDocStd_Document)& | theDoc | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::RemoveLastUndo | ( |  | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::SetModificationMode | ( | const Standard_Boolean | theTransactionOnly | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::SetNestedTransactionMode | ( | const Standard_Boolean | isAllowed = `Standard_True` | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::SetUndoLimit | ( | const Standard_Integer | theLimit | ) |

Standard_EXPORT void TDocStd_MultiTransactionManager::Undo | ( |  | ) |

## Field Documentation

TDocStd_SequenceOfDocument TDocStd_MultiTransactionManager::myDocuments`[private]`

Standard_Boolean TDocStd_MultiTransactionManager::myIsNestedTransactionMode`[private]`

Standard_Boolean TDocStd_MultiTransactionManager::myOnlyTransactionModification`[private]`

Standard_Boolean TDocStd_MultiTransactionManager::myOpenTransaction`[private]`

TDocStd_SequenceOfApplicationDelta TDocStd_MultiTransactionManager::myRedos`[private]`

Standard_Integer TDocStd_MultiTransactionManager::myUndoLimit`[private]`

TDocStd_SequenceOfApplicationDelta TDocStd_MultiTransactionManager::myUndos`[private]`

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

- TDocStd_MultiTransactionManager.hxx
- TDocStd_MultiTransactionManager.lxx