#include <ModelAPI_AttributeValidator.h>
#include <Events_Error.h>
-const static std::string kDefaultId = "Model_FeatureValidator";
-
void Model_ValidatorsFactory::registerValidator(const std::string& theID,
ModelAPI_Validator* theValidator)
{
Model_ValidatorsFactory::Model_ValidatorsFactory()
: ModelAPI_ValidatorsFactory()
{
+ const static std::string kDefaultId = "Model_FeatureValidator";
registerValidator(kDefaultId, new Model_FeatureValidator);
}
void Model_ValidatorsFactory::addDefaultValidators(std::list<ModelAPI_Validator*>& theValidators) const
{
+ const static std::string kDefaultId = "Model_FeatureValidator";
std::map<std::string, ModelAPI_Validator*>::const_iterator it = myIDs.find(kDefaultId);
if(it == myIDs.end())
return;
bool Model_ValidatorsFactory::validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature) const
{
+ const static std::string kDefaultId = "Model_FeatureValidator";
// check feature validators first
std::map<std::string, AttrValidators>::const_iterator aFeature =
myFeatures.find(theFeature->getKind());
void Model_ValidatorsFactory::registerNotObligatory(std::string theFeature, std::string theAttribute)
{
+ const static std::string kDefaultId = "Model_FeatureValidator";
std::map<std::string, ModelAPI_Validator*>::const_iterator it = myIDs.find(kDefaultId);
if (it != myIDs.end()) {
Model_FeatureValidator* aValidator = dynamic_cast<Model_FeatureValidator*>(it->second);