X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_AttributeValidator.h;h=1cf46a54cde7b10ccb2e8feb1586ee165d223138;hb=5303dd1fa6ad4411e38f8d36103c72109957e05c;hp=15b8514ec9302c3fa6337af06c7fda16eadbe0d1;hpb=8dc74f82810d5f597b78633b457efb0ef4f89f9f;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_AttributeValidator.h b/src/ModelAPI/ModelAPI_AttributeValidator.h index 15b8514ec..1cf46a54c 100644 --- a/src/ModelAPI/ModelAPI_AttributeValidator.h +++ b/src/ModelAPI/ModelAPI_AttributeValidator.h @@ -1,19 +1,30 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModelAPI_AttributeValidator.h -// Created: 5 Aug 2014 -// Author: Vitaly SMETANNIKOV +// Created: 4 Sep 2014 +// Author: Mikhail PONIKAROV #ifndef ModelAPI_AttributeValidator_H #define ModelAPI_AttributeValidator_H -#include -#include +#include +#include #include +/** + * Generic validator for any attribute of a feature. + */ class ModelAPI_AttributeValidator : public ModelAPI_Validator { - public: - virtual bool isValid(const FeaturePtr& theFeature, const std::list& theArguments, - const ObjectPtr& theObject) const = 0; +public: + //! returns true if attribute is valid + //! \param theAttribute the checked attribute + //! \param theArguments arguments of the attribute + virtual bool isValid(const AttributePtr& theAttribute, + const std::list& theArguments, + std::string& theError) const = 0; + + MODELAPI_EXPORT ~ModelAPI_AttributeValidator(); }; #endif