1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_FeatureValidator.h
5 // Author: Vitaly SMETANNIKOV
7 #ifndef ModelAPI_FeatureValidator_H
8 #define ModelAPI_FeatureValidator_H
11 #include "ModelAPI_Validator.h"
13 /**\class ModelAPI_FeatureValidator
15 * \brief The geneneric validator for the whole feature.
17 * Can be redefined for some specific feature, but by default for each feature this validator is
18 * used: it checks each argument of the feature and if one of it is not valid (and obligatory),
19 * the hole feature is invalid.
21 class ModelAPI_FeatureValidator : public ModelAPI_Validator
24 /// Returns true if feature and/or attributes are valid
25 /// \param theFeature the validated feature
26 /// \param theArguments list of string, feature attribute names: dependent attributes
27 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
28 const std::list<std::string>& theArguments) const = 0;
30 /// Returns true if the attribute in feature is not obligatory for the feature execution
31 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute) = 0;