1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_AttributeValidator.h
4 // Created: 29 July 2015
5 // Author: Sergey POKHODENKO
7 #ifndef Model_AttributeValidator_H
8 #define Model_AttributeValidator_H
11 #include <ModelAPI_AttributeValidator.h>
13 /**\class Model_AttributeValidator
15 * \brief The geneneric validator for the attribute.
17 * Can be redefined for some specific attributes, but by default for each attribute this validator is
18 * used: it checks the argument and if it contains invalid expression the attribute is invalid.
20 class Model_AttributeValidator : public ModelAPI_AttributeValidator
23 /// \param theAttribute the checked attribute
24 /// \param theArguments arguments of the attribute
25 /// \param theError erros message produced by validator to the user if it fails
26 /// \returns true if attribute is valid
27 MODEL_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
28 const std::list<std::string>& theArguments,
29 Events_InfoMessage& theError) const;
32 #endif // Model_AttributeValidator_H