0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / StdSelect / StdSelect_ShapeTypeFilter.hxx
1 // Created on: 1996-09-17
2 // Created by: Odile Olivier
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _StdSelect_ShapeTypeFilter_HeaderFile
18 #define _StdSelect_ShapeTypeFilter_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TopAbs_ShapeEnum.hxx>
24 #include <SelectMgr_Filter.hxx>
25 #include <Standard_Boolean.hxx>
26 class SelectMgr_EntityOwner;
27
28
29 class StdSelect_ShapeTypeFilter;
30 DEFINE_STANDARD_HANDLE(StdSelect_ShapeTypeFilter, SelectMgr_Filter)
31
32 //! A filter framework which allows you to define a filter
33 //! for a specific shape type. The types available include:
34 //! -   compound
35 //! -   compsolid
36 //! -   solid
37 //! -   shell
38 //! -   face
39 //! -   wire
40 //! -   edge
41 //! -   vertex.
42 class StdSelect_ShapeTypeFilter : public SelectMgr_Filter
43 {
44
45 public:
46
47   
48   //! Constructs a filter object defined by the shape type aType.
49   Standard_EXPORT StdSelect_ShapeTypeFilter(const TopAbs_ShapeEnum aType);
50   
51   Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
52   
53   //! Returns the type of shape selected by the filter.
54     TopAbs_ShapeEnum Type() const;
55   
56   Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aStandardMode) const Standard_OVERRIDE;
57
58
59
60
61   DEFINE_STANDARD_RTTIEXT(StdSelect_ShapeTypeFilter,SelectMgr_Filter)
62
63 protected:
64
65
66
67
68 private:
69
70
71   TopAbs_ShapeEnum myType;
72
73
74 };
75
76
77 #include <StdSelect_ShapeTypeFilter.lxx>
78
79
80
81
82
83 #endif // _StdSelect_ShapeTypeFilter_HeaderFile