X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Validator.cpp;h=41fa0f7014a03e24137734cbd4bc447925905271;hb=88be48ed1ea478b9d9d6ac2d965092418ef4dae6;hp=fa0235b0d2fd0cf804d9d34326fca00940f041dc;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/Model/Model_Validator.cpp b/src/Model/Model_Validator.cpp index fa0235b0d..41fa0f701 100644 --- a/src/Model/Model_Validator.cpp +++ b/src/Model/Model_Validator.cpp @@ -363,3 +363,17 @@ bool Model_ValidatorsFactory::isCase(FeaturePtr theFeature, std::string theAttri } return anInCase; // if no additional conditions, this attribute is the case to be validated } + +void Model_ValidatorsFactory::registerMainArgument(std::string theFeature, + std::string theAttribute) +{ + std::map::iterator aFound = myMainArgument.find(theFeature); + if (aFound == myMainArgument.end()) + myMainArgument[theFeature] = theAttribute; +} + +bool Model_ValidatorsFactory::isMainArgument(std::string theFeature, std::string theAttribute) +{ + std::map::iterator aFound = myMainArgument.find(theFeature); + return aFound != myMainArgument.end() && aFound->second == theAttribute; +}