Salome HOME
Fix: gcc issue: default parameter value for a reference from a constructor
[modules/shaper.git] / src / ModelAPI / ModelAPI_FeatureValidator.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_FeatureValidator.h
4 // Created:     8 Jul 2014
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef ModelAPI_FeatureValidator_H
8 #define ModelAPI_FeatureValidator_H
9
10 #include "ModelAPI.h"
11 #include "ModelAPI_Validator.h"
12
13 /**\class ModelAPI_FeatureValidator
14  * \ingroup DataModel
15  * \brief The geneneric validator for the whole feature.
16  *
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.
20  */
21 class MODELAPI_EXPORT ModelAPI_FeatureValidator : public ModelAPI_Validator
22 {
23  public:
24   /// Default constructor
25   ModelAPI_FeatureValidator();
26   /// Virtual destructor
27   virtual ~ModelAPI_FeatureValidator();
28
29   /// Returns true if feature and/or attributes are valid
30   /// \param theFeature the validated feature
31   /// \param theArguments list of string, feature attribute names: dependent attributes
32   virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                        const std::list<std::string>& theArguments,
34                        std::string& theError) const = 0;
35
36   /// Returns true if the attribute in feature is not obligatory for the feature execution
37   virtual bool isNotObligatory(std::string theFeature, std::string theAttribute) = 0;
38 };
39
40 #endif