Version: 9.16.0
SMESH_NumberFilter.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// File : SMESH_NumberFilter.hxx
24// Module : SMESH
25//
26#ifndef _SMESH_NumberFilter_HeaderFile
27#define _SMESH_NumberFilter_HeaderFile
28
29#include "SMESH_Type.h"
30
31#include "SUIT_SelectionFilter.h"
32
33#include <TopAbs_ShapeEnum.hxx>
34#include <TColStd_MapOfInteger.hxx>
35
36#include <SALOMEconfig.h>
37#include CORBA_SERVER_HEADER(GEOM_Gen)
38
39#include <string>
40
41class SUIT_DataOwner;
42
57{
58 public:
59 SMESH_NumberFilter (const char* theKind,
60 const TopAbs_ShapeEnum theSubShapeType,
61 const int theNumber,
62 const TopAbs_ShapeEnum theShapeType = TopAbs_SHAPE,
63 GEOM::GEOM_Object_ptr theMainObj = GEOM::GEOM_Object::_nil(),
64 const bool theIsClosedOnly = false );
65
66 SMESH_NumberFilter (const char* theKind,
67 const TopAbs_ShapeEnum theSubShapeType,
68 const int theNumber,
69 const TColStd_MapOfInteger& theShapeTypes,
70 GEOM::GEOM_Object_ptr theMainObj = GEOM::GEOM_Object::_nil(),
71 const bool theIsClosedOnly = false );
72
73 virtual ~SMESH_NumberFilter();
74
75 virtual bool isOk (const SUIT_DataOwner*) const;
76
77 void SetSubShapeType (const TopAbs_ShapeEnum);
78 void SetNumber (const int);
79 void SetClosedOnly (const bool);
80 void SetShapeType (const TopAbs_ShapeEnum);
81 void SetShapeTypes (const TColStd_MapOfInteger&);
82 void SetMainShape (GEOM::GEOM_Object_ptr);
83
84 private:
85 GEOM::GEOM_Object_ptr getGeom (const SUIT_DataOwner*, const bool extractReference = true ) const;
86
87 private:
88 std::string myKind;
89 TopAbs_ShapeEnum mySubShapeType;
92 TColStd_MapOfInteger myShapeTypes;
93 GEOM::GEOM_Object_var myMainObj;
94};
95
96#endif
#define SMESHFILTERSSELECTION_EXPORT
Definition: SMESH_Type.h:39
Class : SMESH_NumberFilter Description : Filter for geom or smesh objects.
Definition: SMESH_NumberFilter.hxx:57
TColStd_MapOfInteger myShapeTypes
Definition: SMESH_NumberFilter.hxx:92
void SetShapeTypes(const TColStd_MapOfInteger &)
std::string myKind
Definition: SMESH_NumberFilter.hxx:88
TopAbs_ShapeEnum mySubShapeType
Definition: SMESH_NumberFilter.hxx:89
GEOM::GEOM_Object_var myMainObj
Definition: SMESH_NumberFilter.hxx:93
bool myIsClosedOnly
Definition: SMESH_NumberFilter.hxx:91
int myNumber
Definition: SMESH_NumberFilter.hxx:90