}
}
}
+ addDefaultValidators(theResult);
}
void Model_ValidatorsFactory::validators(const std::string& theFeatureID,
}
return NULL;
}
+
+void Model_ValidatorsFactory::addDefaultValidators(std::list<ModelAPI_Validator*>& theValidators) const
+{
+ std::string anId = "Model_FeatureValidator";
+ std::map<std::string, ModelAPI_Validator*>::const_iterator it = myIDs.find(anId);
+ if(it == myIDs.end())
+ return;
+ theValidators.push_back(it->second);
+}
// const boost::shared_ptr<ModelAPI_Feature>& theFeature, const std::string& theAttrID) const;
protected:
+ void addDefaultValidators(std::list<ModelAPI_Validator*>& theValidators) const;
/// Get instance from PluginManager
Model_ValidatorsFactory();
<feature id="SketchLine" title="Line" tooltip="Create a new line" icon=":icons/line.png">
<point_selector id="StartPoint" title="Start point" tooltip="Start point of the line" previous_feature_param="EndPoint"/>
<point_selector id="EndPoint" title="End point" tooltip="End point of the line"/>
- <validator id="Model_FeatureValidator" />
</feature>
<feature id="SketchCircle" title="Circle" tooltip="Create a new circle" icon=":icons/circle.png">
<point_selector id="CircleCenter" title="Center" tooltip="Center of the circle"/>