1 // File: ModelAPI_FeatureValidator.h
3 // Author: Vitaly SMETANNIKOV
5 #ifndef Model_FeatureValidator_H
6 #define Model_FeatureValidator_H
9 #include <ModelAPI_Feature.h>
10 #include <ModelAPI_FeatureValidator.h>
16 class Model_FeatureValidator : public ModelAPI_FeatureValidator
18 // not obligatory attributes, not checked for initialization
19 std::map<std::string, std::set<std::string> > myNotObligatory;
21 /// Returns true if feature and/or attributes are valid
22 /// \param theFeature the validated feature
23 MODEL_EXPORT virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
24 const std::list<std::string>& theArguments) const;
26 // sets not obligatory attributes, not checked for initialization
27 virtual void registerNotObligatory(std::string theFeature, std::string theAttribute);
29 /// Returns true if the attribute in feature is not obligatory for the feature execution
30 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);