Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git]
/
src
/
Model
/
Model_Document.h
diff --git
a/src/Model/Model_Document.h
b/src/Model/Model_Document.h
index 01171bf68bbb565b2471b6e35342028cbe0d6fb7..340ecd4ccf9d662be95224b9c883686c01a1ac99 100644
(file)
--- a/
src/Model/Model_Document.h
+++ b/
src/Model/Model_Document.h
@@
-11,11
+11,17
@@
#include <ModelAPI_Result.h>
#include <TDocStd_Document.hxx>
#include <ModelAPI_Result.h>
#include <TDocStd_Document.hxx>
+#include <NCollection_DataMap.hxx>
+#include <TDF_Label.hxx>
#include <map>
#include <set>
class Handle_Model_Document;
#include <map>
#include <set>
class Handle_Model_Document;
+// for TDF_Label map usage
+static Standard_Integer HashCode(const TDF_Label& theLab,const Standard_Integer theUpper);
+static Standard_Boolean IsEqual(const TDF_Label& theLab1,const TDF_Label& theLab2);
+
/**\class Model_Document
* \ingroup DataModel
* \brief Document for internal data structure of any object storage.
/**\class Model_Document
* \ingroup DataModel
* \brief Document for internal data structure of any object storage.
@@
-108,8
+114,8
@@
public:
protected:
protected:
- //! Returns (creates if needed) the
group
label
- TDF_Label
groupLabel(const std::string theGroup
);
+ //! Returns (creates if needed) the
features
label
+ TDF_Label
featuresLabel(
);
//! Initializes feature with a unique name in this group (unique name is generated as
//! feature type + "_" + index
//! Initializes feature with a unique name in this group (unique name is generated as
//! feature type + "_" + index
@@
-145,8
+151,9
@@
private:
int myTransactionsAfterSave;
/// number of nested transactions performed (or -1 if not nested)
int myNestedNum;
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;
+ /// All features managed by this document (not only in history of OB)
+ /// For optimization mapped by labels
+ NCollection_DataMap<TDF_Label, FeaturePtr> myObjs;
///< set of identifiers of sub-documents of this document
std::set<std::string> mySubs;
///< set of identifiers of sub-documents of this document
std::set<std::string> mySubs;