SHAPER  9.12.0
FiltersPlugin_ShapeTypeValidator Class Reference

Validates selection of "On geometry" filter to select only the shapes specified by the group type. More...

Inheritance diagram for FiltersPlugin_ShapeTypeValidator:
Inheritance graph

Public Types

enum  TypeOfShape {
  Empty , Vertex , Edge , Line ,
  Circle , Wire , Face , Plane ,
  Shell , Solid , CompSolid , Compound ,
  AnyShape
}
 Type of shape. More...
 

Public Member Functions

virtual bool isValid (const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
 

Static Public Member Functions

static TypeOfShape shapeType (const std::string &theType)
 Convert string to TypeOfShape value. More...
 

Protected Member Functions

bool isValidAttribute (const AttributePtr &theAttribute, const TypeOfShape theShapeType, Events_InfoMessage &theError) const
 Returns true if the attibute's object type satisfies the argument value. More...
 
bool isValidObject (const ObjectPtr &theObject, const TypeOfShape theShapeType, const bool theIsGeometricalSelection, Events_InfoMessage &theError) const
 Returns true if the attibute's object type satisfies the argument value. More...
 
bool isValidShape (const GeomShapePtr theShape, const TypeOfShape theShapeType, const bool theIsGeometricalSelection, Events_InfoMessage &theError) const
 Returns true if the attibute's object type satisfies the argument value. More...
 

Detailed Description

Validates selection of "On geometry" filter to select only the shapes specified by the group type.

Member Enumeration Documentation

◆ TypeOfShape

Type of shape.

Member Function Documentation

◆ isValid()

bool FiltersPlugin_ShapeTypeValidator::isValid ( const AttributePtr &  theAttribute,
const std::list< std::string > &  theArguments,
Events_InfoMessage theError 
) const
virtual
Returns
True if the attribute is valid. It checks whether the shape is a body subshape. Does not allow select construction shapes.
Parameters
[in]theAttributean attribute to check
[in]theArgumentsa filter parameters
[out]theErrorerror message.

Reimplemented from GeomValidators_ShapeType.

◆ shapeType()

GeomValidators_ShapeType::TypeOfShape GeomValidators_ShapeType::shapeType ( const std::string &  theType)
staticinherited

Convert string to TypeOfShape value.

Parameters
theTypea string value

◆ isValidAttribute()

bool GeomValidators_ShapeType::isValidAttribute ( const AttributePtr &  theAttribute,
const TypeOfShape  theShapeType,
Events_InfoMessage theError 
) const
protectedinherited

Returns true if the attibute's object type satisfies the argument value.

Parameters
[in]theAttributea checked attribute
[in]theShapeTypea type of shape
[out]theErrorerror message.

◆ isValidObject()

bool GeomValidators_ShapeType::isValidObject ( const ObjectPtr &  theObject,
const TypeOfShape  theShapeType,
const bool  theIsGeometricalSelection,
Events_InfoMessage theError 
) const
protectedinherited

Returns true if the attibute's object type satisfies the argument value.

Parameters
[in]theObjecta checked object
[in]theShapeTypea shape type
[out]theErrorerror message.

◆ isValidShape()

bool GeomValidators_ShapeType::isValidShape ( const GeomShapePtr  theShape,
const TypeOfShape  theShapeType,
const bool  theIsGeometricalSelection,
Events_InfoMessage theError 
) const
protectedinherited

Returns true if the attibute's object type satisfies the argument value.

Parameters
[in]theShapea checked shape
[in]theShapeTypea shape type
[out]theErrorerror message.