Salome HOME
1f409df515990f9d11c96056e52362c29ae0a988
[modules/geom.git] / src / CurveCreator / CurveCreator_ShapeFilter.hxx
1 // Copyright (C) 2013-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // File:        CurveCreator_ShapeFilter.hxx
21 // Author:      Ilya Shchekin
22
23
24 #ifndef _CurveCreator_ShapeFilter_HeaderFile
25 #define _CurveCreator_ShapeFilter_HeaderFile
26
27 #include <Standard.hxx>
28 #include <Standard_Type.hxx>
29 #include <Basics_OCCTVersion.hxx>
30 #include <Standard_DefineHandle.hxx>
31 #include <SelectMgr_Filter.hxx>
32 #include <TopAbs_ShapeEnum.hxx> 
33 #include <TopTools_MapOfShape.hxx>
34
35 class SelectMgr_EntityOwner;
36 class TopoDS_Shape;
37
38
39 class CurveCreator_ShapeFilter : public SelectMgr_Filter
40 {
41                                 
42 public:
43
44   
45   Standard_EXPORT CurveCreator_ShapeFilter();
46
47   Standard_EXPORT ~CurveCreator_ShapeFilter();
48   
49   Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aType) const Standard_OVERRIDE;
50   
51   Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& EO) const Standard_OVERRIDE;
52   
53   Standard_EXPORT void AddShape (const TopoDS_Shape& aShape);
54   
55   Standard_EXPORT void RemoveShape (const TopoDS_Shape& aShape);
56
57   Standard_EXPORT void ClearShapes ();
58
59
60 private:
61
62   TopTools_MapOfShape myShapes;
63
64 public:
65
66   DEFINE_STANDARD_RTTIEXT(CurveCreator_ShapeFilter,SelectMgr_Filter)
67
68 };
69
70 DEFINE_STANDARD_HANDLE(CurveCreator_ShapeFilter, SelectMgr_Filter)
71
72 #endif 
73