#include <ModelAPI_AttributeValidator.h>
-#include <regex>
#include <memory>
class ParametersPlugin_VariableValidator : public ModelAPI_AttributeValidator
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute
PARAMETERSPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
- const std::list<std::string>& theArguments) const;
+ const std::list<std::string>& theArguments,
+ std::string& theError) const;
- private:
- std::regex myPyVariableRegex;
+ protected:
+ PARAMETERSPLUGIN_EXPORT bool isVariable(const std::string& theString) const;
+ PARAMETERSPLUGIN_EXPORT bool isUnique(const AttributePtr& theAttribute,
+ const std::string& theString) const;
};
class ParametersPlugin_ExpressionValidator: public ModelAPI_AttributeValidator
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute
PARAMETERSPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
- const std::list<std::string>& theArguments) const;
+ const std::list<std::string>& theArguments,
+ std::string& theError) const;
};