Salome HOME
Incorrect dumping of parts with user-defined names (issue #1804)
[modules/shaper.git] / src / Config / Config_DataModelReader.h
old mode 100644 (file)
new mode 100755 (executable)
index b5d9b58..a66ad0f
@@ -36,7 +36,7 @@ class Config_DataModelReader : public Config_XMLReader
   CONFIG_EXPORT std::string rootType() const { return myRootTypes; }
 
   /// Returns number of folders under root 
-  CONFIG_EXPORT int rootFoldersNumber() const { return int(myRootFolderNames.size()); }
+  CONFIG_EXPORT size_t rootFoldersNumber() const { return myRootFolderNames.size(); }
 
   /// Returns name of the folder by its Id
   /// \param theId id of the folder
@@ -58,6 +58,9 @@ class Config_DataModelReader : public Config_XMLReader
   /// \param theId id of the folder
   CONFIG_EXPORT bool rootShowEmpty(int theId) const { return myRootFolderShowEmpty[theId]; }
 
+  /// Returns list of features attached to folder with name theFolderName in sub-document
+  /// \param theFolderName a name of the folder
+  CONFIG_EXPORT std::string rootFolderFeatures(const std::string& theFolderName) const;
 
 
   // SUB folders propertiues ********************
@@ -65,7 +68,7 @@ class Config_DataModelReader : public Config_XMLReader
   CONFIG_EXPORT std::string subType() const { return mySubTypes; }
 
   /// Returns number of folders under sub document 
-  CONFIG_EXPORT int subFoldersNumber() const { return int(mySubFolderNames.size()); }
+  CONFIG_EXPORT size_t subFoldersNumber() const { return mySubFolderNames.size(); }
 
   /// Returns name of the folder by its Id
   /// \param theId id of the folder
@@ -87,6 +90,11 @@ class Config_DataModelReader : public Config_XMLReader
   /// \param theType type of objects in folder
   CONFIG_EXPORT int subFolderId(std::string theType) const;
 
+  /// Returns list of features attached to folder with name theFolderName in sub-document
+  /// \param theFolderName a name of the folder
+  CONFIG_EXPORT std::string subFolderFeatures(const std::string& theFolderName) const;
+
+
   /// Returns true if the sub-document data tree has to be attached to Part Result node
   /// Otherwise it has to be connected to Part feature node
   CONFIG_EXPORT bool isAttachToResult() const { return myIsResultLink; }
@@ -102,6 +110,7 @@ private:
   std::vector<std::string> myRootFolderNames;
   std::vector<std::string> myRootFolderTypes;
   std::vector<std::string> myRootFolderIcons;
+  std::vector<std::string> myRootFeaturesList;
   std::vector<bool> myRootFolderShowEmpty;
 
   std::string myRootTypes;
@@ -110,6 +119,7 @@ private:
   std::vector<std::string> mySubFolderNames;
   std::vector<std::string> mySubFolderTypes;
   std::vector<std::string> mySubFolderIcons;
+  std::vector<std::string> mySubFeaturesList;
   std::vector<bool> mySubFolderShowEmpty;
 
   bool myIsResultLink;