Salome HOME
Basing on the issue #1757 make extrusion-cut that
[modules/shaper.git] / src / Model / Model_Validator.h
index 473f8e4024d3cee29e330e3b2c46e56a44d111eb..7dcf2ff98c2470ec64311439b3ab4d3a0f9cf5df 100644 (file)
@@ -14,7 +14,8 @@
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
 //
 
 #ifndef Model_Validator_H_
@@ -55,6 +56,9 @@ class Model_ValidatorsFactory : public ModelAPI_ValidatorsFactory
   // (switchId (ID of the attribute) and case Ids (possible values of the switch attribute))
   std::map<std::string, std::map<std::string,
           std::map<std::string, std::set<std::string> > > > myCases;
+  /// Stores main attribute for each feature
+  std::map<std::string, std::string> myMainArgument;
+  std::map<std::string, std::set<std::string> > myGeometricalSelection;
 
  public:
   /// Registers the instance of the validator by the ID
@@ -114,6 +118,18 @@ class Model_ValidatorsFactory : public ModelAPI_ValidatorsFactory
   /// Returns true if the attribute must be checked (the case is selected)
   virtual bool isCase(FeaturePtr theFeature, std::string theAttribute);
 
+  /// Register the attribute as a main argument of the feature
+  virtual void registerMainArgument(std::string theFeature, std::string theAttribute);
+
+  /// Returns true is the attribute is a main argument of the feature
+  virtual bool isMainArgument(std::string theFeature, std::string theAttribute);
+
+  /// Register the selection attribute as geometrical selection
+  virtual void registerGeometricalSelection(std::string theFeature, std::string theAttribute);
+
+  /// Returns true if the attribute is a geometrical selection
+  virtual bool isGeometricalSelection(std::string theFeature, std::string theAttribute);
+
 
 protected:
   /// Adds the defualt validators that are usefull for all features.