X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Validator.cpp;h=73c02b7df3e8afb77f2913abf84044e481d65460;hb=20d35238897e717b51eaba89f9ba3695ebf57e49;hp=41fa0f7014a03e24137734cbd4bc447925905271;hpb=75e77d680594278a2da06c25fb6dbbad178e9fcd;p=modules%2Fshaper.git diff --git a/src/Model/Model_Validator.cpp b/src/Model/Model_Validator.cpp index 41fa0f701..73c02b7df 100644 --- a/src/Model/Model_Validator.cpp +++ b/src/Model/Model_Validator.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2020 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 @@ -12,10 +12,9 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "Model_Validator.h" @@ -377,3 +376,27 @@ bool Model_ValidatorsFactory::isMainArgument(std::string theFeature, std::string std::map::iterator aFound = myMainArgument.find(theFeature); return aFound != myMainArgument.end() && aFound->second == theAttribute; } + +void Model_ValidatorsFactory::registerGeometricalSelection(std::string theFeature, + std::string theAttribute) +{ + std::map >::iterator aFind = + myGeometricalSelection.find(theFeature); + if (aFind == myGeometricalSelection.end()) { + std::set aNewSet; + aNewSet.insert(theAttribute); + myGeometricalSelection[theFeature] = aNewSet; + } + else { + aFind->second.insert(theAttribute); + } +} + +bool Model_ValidatorsFactory::isGeometricalSelection(std::string theFeature, + std::string theAttribute) +{ + std::map >::iterator aFind = + myGeometricalSelection.find(theFeature); + return aFind != myGeometricalSelection.end() + && aFind->second.find(theAttribute) != aFind->second.end(); +}