|
SHAPER 9.16.0
|
The geneneric validator for the whole feature. More...
#include <ModelAPI_FeatureValidator.h>

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 CollectionPlugin_FieldValidator, BuildPlugin_ValidatorBaseForWire, BuildPlugin_ValidatorBaseForFace, BuildPlugin_ValidatorBaseForSolids, FeaturesPlugin_ValidatorPipeLocationsNumber, FeaturesPlugin_ValidatorLoftSameTypeShape, FeaturesPlugin_ValidatorBaseForGenerationSketchOrSketchObjects, FeaturesPlugin_ValidatorExtrusionDir, FeaturesPlugin_ValidatorRemoveSubShapesResult, FeaturesPlugin_ValidatorUnionArguments, FeaturesPlugin_ValidatorBooleanArguments, FeaturesPlugin_ValidatorBooleanFuseArguments, FeaturesPlugin_ValidatorBooleanCommonArguments, GeomValidators_Different, GeomValidators_MinObjectsSelected, GeomValidators_NotSelfIntersected, GeomValidators_ZeroOffset, Model_FeatureValidator, SketchPlugin_SolverErrorValidator, and SketchPlugin_CurveFittingValidator.
|
virtual |
Returns true if the attribute in feature is not obligatory for the feature execution.
Returns false by default.
Reimplemented in FeaturesPlugin_ValidatorBooleanArguments, FeaturesPlugin_ValidatorBooleanFuseArguments, FeaturesPlugin_ValidatorBooleanCommonArguments, GeomValidators_Different, GeomValidators_NotSelfIntersected, GeomValidators_ZeroOffset, Model_FeatureValidator, and SketchPlugin_SolverErrorValidator.