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