Salome HOME
Define Selection validator interface.
[modules/shaper.git] / src / ModelAPI / ModelAPI_Validator.h
index 4a0243cd009627cb30dce073b43d3a3e47bd0403..4c807763ac2f2cd104415b062846b1fc8e23444f 100644 (file)
@@ -25,12 +25,15 @@ class ModelAPI_Feature;
 class MODELAPI_EXPORT ModelAPI_Validator
 {
 public:
+  // Make virtual destructor in order to make the class polymorphic
+  virtual ~ModelAPI_Validator() {};
+
   /// Returns true if feature and/or attributes are valid
   /// \param theFeature the validated feature
   /// \param theAttr the validated attribute ID, empty string of feature is validated
   /// \param theArguments list of string, feature attribute names: dependent attributes
-  virtual bool validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
-    const std::string theAttr, std::list<std::string> theArguments) const = 0;
+  //virtual bool validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
+  //  const std::string theAttr, std::list<std::string> theArguments) const = 0;
 };
 
 typedef boost::shared_ptr<ModelAPI_Validator> ValidatorPtr;
@@ -66,8 +69,8 @@ public:
 
   /// Returns the result of "validate" method for attribute of validator.
   /// If validator is not exists, returns true: everything is valid by default.
-  virtual bool validate(
-    const boost::shared_ptr<ModelAPI_Feature>& theFeature, const std::string& theAttrID) const = 0;
+  //virtual bool validate(
+  //  const boost::shared_ptr<ModelAPI_Feature>& theFeature, const std::string& theAttrID) const = 0;
 
 protected:
   /// Get instance from PluginManager