Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / Model / Model_FeatureValidator.h
index 901f48ef7fbbf5f656c4d36c6aba2cf25fe0c6d6..86f287c99460cf08dfe963efb05b60f8fad6cd69 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        ModelAPI_FeatureValidator.h
 // Created:     8 Jul 2014
 // Author:      Vitaly SMETANNIKOV
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_FeatureValidator.h>
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
+#include <set>
+#include <map>
 
 class Model_FeatureValidator : public ModelAPI_FeatureValidator
 {
+  // not obligatory attributes, not checked for initialization
+  std::map<std::string, std::set<std::string> > myNotObligatory;
  public:
   /// Returns true if feature and/or attributes are valid
   /// \param theFeature the validated feature
-  MODEL_EXPORT virtual bool isValid(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
+  MODEL_EXPORT virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
     const std::list<std::string>& theArguments) const;
+
+  // sets not obligatory attributes, not checked for initialization
+  virtual void registerNotObligatory(std::string theFeature, std::string theAttribute);
+
+  /// Returns true if the attribute in feature is not obligatory for the feature execution
+  virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
 #endif