X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_AttributeValidator.h;h=142c91c233689bb32a729ca6e232263c3b8b2a9f;hb=f5c7bb3100ed321392da42f61c2ab505833ec61a;hp=b40c145e2b9519dba1b9df5426eaac375da0bad0;hpb=3ce4e2cad0e6802282a5a1d10c49c041e8a9f287;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_AttributeValidator.h b/src/ModelAPI/ModelAPI_AttributeValidator.h index b40c145e2..142c91c23 100644 --- a/src/ModelAPI/ModelAPI_AttributeValidator.h +++ b/src/ModelAPI/ModelAPI_AttributeValidator.h @@ -1,21 +1,31 @@ +// 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 - -class ModelAPI_AttributeValidator: public ModelAPI_Validator +/** + * Generic validator for any attribute of a feature. + */ +class ModelAPI_AttributeValidator : public ModelAPI_Validator { public: - virtual bool isValid(const FeaturePtr& theFeature, + //! \returns true if attribute is valid + //! \param theAttribute the checked attribute + //! \param theArguments arguments of the attribute + //! \param theError the error string message if validation fails + virtual bool isValid(const AttributePtr& theAttribute, const std::list& theArguments, - const ObjectPtr& theObject) const = 0; + std::string& theError) const = 0; + + MODELAPI_EXPORT ~ModelAPI_AttributeValidator(); }; #endif