-private:
- std::string myID; ///< identifier of the document in the application
- Handle_TDocStd_Document myDoc; ///< OCAF document
- /// number of transactions after the last "save" call, used for "IsModified" method
- int myTransactionsAfterSave;
- /// number of nested transactions performed (or -1 if not nested)
- int myNestedNum;
- /// All objects managed by this document (not only in history of OB)
- std::map<std::string, std::vector<ObjectPtr> > myObjs;
-
- ///< set of identifiers of sub-documents of this document
- std::set<std::string> mySubs;
- /// transaction indexes (related to myTransactionsAfterSave) which were empty in this doc
- std::map<int, bool> myIsEmptyTr;
+ private:
+ std::string myID; ///< identifier of the document in the application
+ std::string myKind; ///< kind of the document in the application
+ Handle_TDocStd_Document myDoc; ///< OCAF document
+
+ /// counter value of transaction on the last "save" call, used for "IsModified" method
+ int myTransactionSave;
+ /// number of nested transactions performed (list becasue may be nested inside of nested)
+ /// the list is empty if not nested transaction is performed
+ std::list<int> myNestedNum;
+
+ /// Information related to the every user-transaction
+ struct Transaction {
+ int myOCAFNum; ///< number of OCAF transactions related to each "this" transaction, may be 0
+ std::string myId; ///< user-identifier string of transaction
+ /// default constructor with default Id
+ Transaction(): myOCAFNum(0), myId("") {}
+ };
+
+ /// transaction indexes (related to myTransactionsAfterSave) and info about the real transactions
+ /// in myDocument connected to this operation (may be zero for empty transaction)
+ std::list<Transaction> myTransactions;
+ /// list of info about transactions undone (first is oldest undone)
+ std::list<Transaction> myRedos;
+ /// All features managed by this document (not only in history of OB)
+ /// For optimization mapped by labels
+ NCollection_DataMap<TDF_Label, FeaturePtr> myObjs;
+ /// Optimization for finding the shape-label by topological naming names
+ std::map<std::string, TDF_Label> myNamingNames;
+ /// If it is true, features are not executed on update (on abort, undo, redo)
+ bool myExecuteFeatures;