X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParametersPlugin%2FParametersPlugin_Validators.h;h=cc40d522b379cf5b8aeb677197bb063fe9a7ebfb;hb=a0dd2d01c33873491ab947f44789d39006f605cf;hp=cc1812abc711f87bad0424fdef8590ea2b8d5ce0;hpb=d8858e810a0b5e1d09a93fcaa665b439c4264873;p=modules%2Fshaper.git diff --git a/src/ParametersPlugin/ParametersPlugin_Validators.h b/src/ParametersPlugin/ParametersPlugin_Validators.h index cc1812abc..cc40d522b 100644 --- a/src/ParametersPlugin/ParametersPlugin_Validators.h +++ b/src/ParametersPlugin/ParametersPlugin_Validators.h @@ -1,9 +1,21 @@ -/* - * Parameters_VariableValidator.h - * - * Created on: Apr 9, 2015 - * Author: sbh - */ +// Copyright (C) 2014-2022 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 PARAMETERSPLUGIN_VARIABLEVALIDATOR_H_ #define PARAMETERSPLUGIN_VARIABLEVALIDATOR_H_ @@ -34,11 +46,9 @@ class ParametersPlugin_VariableValidator : public ModelAPI_AttributeValidator */ PARAMETERSPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute, const std::list& theArguments, - std::string& theError) const; + Events_InfoMessage& theError) const; protected: - /// Returns true if theString is a valid variable name. - PARAMETERSPLUGIN_EXPORT bool isVariable(const std::string& theString) const; /// Returns true if theString is unique parameter name in the document of theAttribute. PARAMETERSPLUGIN_EXPORT bool isUnique(const AttributePtr& theAttribute, const std::string& theString) const; @@ -63,7 +73,7 @@ class ParametersPlugin_ExpressionValidator: public ModelAPI_AttributeValidator */ PARAMETERSPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute, const std::list& theArguments, - std::string& theError) const; + Events_InfoMessage& theError) const; };