Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _SMESH_NumberFilter_HeaderFile
00027 #define _SMESH_NumberFilter_HeaderFile
00028
00029 #include "SMESH_Type.h"
00030
00031 #include "SUIT_SelectionFilter.h"
00032
00033 #include <TopAbs_ShapeEnum.hxx>
00034 #include <TColStd_MapOfInteger.hxx>
00035
00036 #include <SALOMEconfig.h>
00037 #include CORBA_SERVER_HEADER(GEOM_Gen)
00038
00039 #include <string>
00040
00041 class SUIT_DataOwner;
00042
00056 class SMESHFILTERSSELECTION_EXPORT SMESH_NumberFilter : public SUIT_SelectionFilter
00057 {
00058 public:
00059 SMESH_NumberFilter (const char* theKind,
00060 const TopAbs_ShapeEnum theSubShapeType,
00061 const int theNumber,
00062 const TopAbs_ShapeEnum theShapeType = TopAbs_SHAPE,
00063 GEOM::GEOM_Object_ptr theMainObj = GEOM::GEOM_Object::_nil(),
00064 const bool theIsClosedOnly = false );
00065
00066 SMESH_NumberFilter (const char* theKind,
00067 const TopAbs_ShapeEnum theSubShapeType,
00068 const int theNumber,
00069 const TColStd_MapOfInteger& theShapeTypes,
00070 GEOM::GEOM_Object_ptr theMainObj = GEOM::GEOM_Object::_nil(),
00071 const bool theIsClosedOnly = false );
00072
00073 virtual ~SMESH_NumberFilter();
00074
00075 virtual bool isOk (const SUIT_DataOwner*) const;
00076
00077 void SetSubShapeType (const TopAbs_ShapeEnum);
00078 void SetNumber (const int);
00079 void SetClosedOnly (const bool);
00080 void SetShapeType (const TopAbs_ShapeEnum);
00081 void SetShapeTypes (const TColStd_MapOfInteger&);
00082 void SetMainShape (GEOM::GEOM_Object_ptr);
00083
00084 private:
00085 GEOM::GEOM_Object_ptr getGeom (const SUIT_DataOwner*, const bool extractReference = true ) const;
00086
00087 private:
00088 std::string myKind;
00089 TopAbs_ShapeEnum mySubShapeType;
00090 int myNumber;
00091 bool myIsClosedOnly;
00092 TColStd_MapOfInteger myShapeTypes;
00093 GEOM::GEOM_Object_var myMainObj;
00094 };
00095
00096 #endif