1 // File : SMESH_NumberFilter.hxx
4 #ifndef _SMESH_NumberFilter_HeaderFile
5 #define _SMESH_NumberFilter_HeaderFile
7 #include "SUIT_SelectionFilter.h"
9 #include <TopAbs_ShapeEnum.hxx>
10 #include <TColStd_MapOfInteger.hxx>
12 #include <SALOMEconfig.h>
13 #include CORBA_SERVER_HEADER(GEOM_Gen)
18 * Class : SMESH_NumberFilter
19 * Description : Filter for geom or smesh objects.
20 * Filter geom objects by number of subshapes of the given type
21 * Parameters of constructor:
22 * * theSubShapeType - Type of subshape
23 * * theNumber - Number of subshapes. Object is selected if it contains theNumber of
24 * theSubShapeType sub-shapes
25 * * theShapeType - This map specifies types of object to be selected
26 * * theMainObject - Sub-shapes of this object is selected only
27 * * theIsClosedOnly - Closed shapes is selected if this parameter is true
29 class SMESH_NumberFilter : public SUIT_SelectionFilter
32 SMESH_NumberFilter (const char* theKind,
33 const TopAbs_ShapeEnum theSubShapeType,
35 const TopAbs_ShapeEnum theShapeType = TopAbs_SHAPE,
36 GEOM::GEOM_Object_ptr theMainObj = GEOM::GEOM_Object::_nil(),
37 const bool theIsClosedOnly = false );
39 SMESH_NumberFilter (const char* theKind,
40 const TopAbs_ShapeEnum theSubShapeType,
42 const TColStd_MapOfInteger& theShapeTypes,
43 GEOM::GEOM_Object_ptr theMainObj = GEOM::GEOM_Object::_nil(),
44 const bool theIsClosedOnly = false );
46 virtual ~SMESH_NumberFilter();
48 virtual bool isOk (const SUIT_DataOwner*) const;
50 void SetSubShapeType (const TopAbs_ShapeEnum);
51 void SetNumber (const int);
52 void SetClosedOnly (const bool);
53 void SetShapeType (const TopAbs_ShapeEnum);
54 void SetShapeTypes (const TColStd_MapOfInteger&);
55 void SetMainShape (GEOM::GEOM_Object_ptr);
58 GEOM::GEOM_Object_ptr getGeom (const SUIT_DataOwner*) const;
62 TopAbs_ShapeEnum mySubShapeType;
65 TColStd_MapOfInteger myShapeTypes;
66 GEOM::GEOM_Object_var myMainObj;