1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_FeatureValidator.h
5 // Author: Vitaly SMETANNIKOV
7 #ifndef Model_FeatureValidator_H
8 #define Model_FeatureValidator_H
11 #include <ModelAPI_Feature.h>
12 #include <ModelAPI_FeatureValidator.h>
18 class Model_FeatureValidator : public ModelAPI_FeatureValidator
20 // not obligatory attributes, not checked for initialization
21 std::map<std::string, std::set<std::string> > myNotObligatory;
23 /// Returns true if feature and/or attributes are valid
24 /// \param theFeature the validated feature
25 MODEL_EXPORT virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
26 const std::list<std::string>& theArguments) const;
28 // sets not obligatory attributes, not checked for initialization
29 virtual void registerNotObligatory(std::string theFeature, std::string theAttribute);
31 /// Returns true if the attribute in feature is not obligatory for the feature execution
32 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);