SHAPER  9.12.0
ModelAPI_FiltersFactory Class Referenceabstract

Manages registering of filters. More...

Inheritance diagram for ModelAPI_FiltersFactory:
Inheritance graph

Public Member Functions

virtual void registerFilter (const std::string &theID, ModelAPI_Filter *theFilter)=0
 Register an instance of a filter. More...
 
virtual bool isValid (FeaturePtr theFiltersFeature, ResultPtr theResult, GeomShapePtr theShape)=0
 Returns true if all filters of the Filters feature are ok for the Shape (taking into account the Reversed states). More...
 
virtual std::list< std::pair< ResultPtr, GeomShapePtr > > select (const FiltersFeaturePtr &theFilterFeature, const GeomAPI_Shape::ShapeType theShapeType)=0
 Returns list of all shapes and subshapes in the study, satisfying criteria of all filters of theFilterFeature. More...
 
virtual std::list< FilterPtr > filters (GeomAPI_Shape::ShapeType theType)=0
 Returns the filters that support the given shape type. More...
 
virtual FilterPtr filter (std::string theID)=0
 Returns a filter by ID. More...
 
virtual std::string id (FilterPtr theFilter)=0
 Returns a filter ID by the filter pointer. More...
 

Protected Member Functions

 ModelAPI_FiltersFactory ()
 Get instance from Session. More...
 

Detailed Description

Manages registering of filters.

Constructor & Destructor Documentation

◆ ModelAPI_FiltersFactory()

ModelAPI_FiltersFactory::ModelAPI_FiltersFactory ( )
inlineprotected

Get instance from Session.

Member Function Documentation

◆ registerFilter()

virtual void ModelAPI_FiltersFactory::registerFilter ( const std::string &  theID,
ModelAPI_Filter theFilter 
)
pure virtual

Register an instance of a filter.

Parameters
theIDunique identifier of the filter, not necessary equal to the name of filter
theFilterthe filter's instance

Implemented in Model_FiltersFactory.

◆ isValid()

virtual bool ModelAPI_FiltersFactory::isValid ( FeaturePtr  theFiltersFeature,
ResultPtr  theResult,
GeomShapePtr  theShape 
)
pure virtual

Returns true if all filters of the Filters feature are ok for the Shape (taking into account the Reversed states).

Parameters
theFiltersFeaturefeature that contains all information about the filters
theResultparent result of the shape to check
theShapethe checked shape

Implemented in Model_FiltersFactory.

◆ select()

virtual std::list< std::pair<ResultPtr, GeomShapePtr> > ModelAPI_FiltersFactory::select ( const FiltersFeaturePtr &  theFilterFeature,
const GeomAPI_Shape::ShapeType  theShapeType 
)
pure virtual

Returns list of all shapes and subshapes in the study, satisfying criteria of all filters of theFilterFeature.

Parameters
theFiltersFeaturefeature that contains all information about the filters
theShapeTypethe type of sub-shapes to find

Implemented in Model_FiltersFactory.

◆ filters()

virtual std::list<FilterPtr> ModelAPI_FiltersFactory::filters ( GeomAPI_Shape::ShapeType  theType)
pure virtual

Returns the filters that support the given shape type.

Implemented in Model_FiltersFactory.

◆ filter()

virtual FilterPtr ModelAPI_FiltersFactory::filter ( std::string  theID)
pure virtual

Returns a filter by ID.

Implemented in Model_FiltersFactory.

◆ id()

virtual std::string ModelAPI_FiltersFactory::id ( FilterPtr  theFilter)
pure virtual

Returns a filter ID by the filter pointer.

Implemented in Model_FiltersFactory.