SHAPER
9.12.0
|
The geneneric validator for the whole feature. More...
Public Member Functions | |
ModelAPI_FeatureValidator () | |
Default constructor. More... | |
virtual | ~ModelAPI_FeatureValidator () |
Virtual destructor. More... | |
virtual bool | isValid (const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const =0 |
Returns true if feature and/or attributes are valid. More... | |
virtual bool | isNotObligatory (std::string theFeature, std::string theAttribute) |
Returns true if the attribute in feature is not obligatory for the feature execution. More... | |
The geneneric validator for the whole feature.
Can be redefined for some specific feature, but by default for each feature this validator is used: it checks each argument of the feature and if one of it is not valid (and obligatory), the hole feature is invalid.
ModelAPI_FeatureValidator::ModelAPI_FeatureValidator | ( | ) |
Default constructor.
|
virtual |
Virtual destructor.
|
pure virtual |
Returns true if feature and/or attributes are valid.
theFeature | the validated feature |
theArguments | list of string, feature attribute names: dependent attributes |
theError | the error string message if validation fails |
Implemented in SketchPlugin_CurveFittingValidator, SketchPlugin_SolverErrorValidator, Model_FeatureValidator, GeomValidators_ZeroOffset, GeomValidators_NotSelfIntersected, GeomValidators_MinObjectsSelected, GeomValidators_Different, FeaturesPlugin_ValidatorBooleanCommonArguments, FeaturesPlugin_ValidatorBooleanFuseArguments, FeaturesPlugin_ValidatorBooleanArguments, FeaturesPlugin_ValidatorUnionArguments, FeaturesPlugin_ValidatorRemoveSubShapesResult, FeaturesPlugin_ValidatorExtrusionDir, FeaturesPlugin_ValidatorBaseForGenerationSketchOrSketchObjects, FeaturesPlugin_ValidatorLoftSameTypeShape, FeaturesPlugin_ValidatorPipeLocationsNumber, BuildPlugin_ValidatorBaseForSolids, BuildPlugin_ValidatorBaseForFace, BuildPlugin_ValidatorBaseForWire, and CollectionPlugin_FieldValidator.
|
virtual |
Returns true if the attribute in feature is not obligatory for the feature execution.
Returns false by default.
Reimplemented in SketchPlugin_SolverErrorValidator, Model_FeatureValidator, GeomValidators_ZeroOffset, GeomValidators_NotSelfIntersected, GeomValidators_Different, FeaturesPlugin_ValidatorBooleanCommonArguments, FeaturesPlugin_ValidatorBooleanFuseArguments, and FeaturesPlugin_ValidatorBooleanArguments.