X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_AttributeValidator.h;h=ec7a62d2e23782018342b29fbf2258e311d1994c;hb=d5c7ad3c50f89a2ddc2de1866ffb7f09397f3be2;hp=15b8514ec9302c3fa6337af06c7fda16eadbe0d1;hpb=cd9217d7e87997ec8bc150a6d8c389e742ca0f84;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_AttributeValidator.h b/src/ModelAPI/ModelAPI_AttributeValidator.h index 15b8514ec..ec7a62d2e 100644 --- a/src/ModelAPI/ModelAPI_AttributeValidator.h +++ b/src/ModelAPI/ModelAPI_AttributeValidator.h @@ -1,19 +1,44 @@ -// File: ModelAPI_AttributeValidator.h -// Created: 5 Aug 2014 -// Author: Vitaly SMETANNIKOV +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #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 + //! \param theError the error string message if validation fails + virtual bool isValid(const AttributePtr& theAttribute, + const std::list& theArguments, + Events_InfoMessage& theError) const = 0; + + MODELAPI_EXPORT ~ModelAPI_AttributeValidator(); }; #endif