0032742: Coding - get rid of unused headers [Adaptor2d to Approx]
[occt.git] / src / AIS / AIS_TypeFilter.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-03-06
2// Created by: Robert COUBLANC
3// Copyright (c) 1997-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 _AIS_TypeFilter_HeaderFile
18#define _AIS_TypeFilter_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <AIS_KindOfInteractive.hxx>
24#include <SelectMgr_Filter.hxx>
42cf5bc1 25class SelectMgr_EntityOwner;
26
27
28class AIS_TypeFilter;
29DEFINE_STANDARD_HANDLE(AIS_TypeFilter, SelectMgr_Filter)
30
31//! Selects Interactive Objects through their types. The
32//! filter questions each Interactive Object in local context
33//! to determine whether it has an non-null owner, and if
34//! so, whether it is of the desired type. If the object
35//! returns true in each case, it is kept. If not, it is rejected.
36//! By default, the interactive object has a None type
37//! and a signature of 0. A filter for type specifies a
38//! choice of type out of a range at any level enumerated
39//! for type or kind. The choice could be for kind of
40//! interactive object, of dimension, of unit, or type of axis,
41//! plane or attribute.
42//! If you want to give a particular type and signature to
43//! your Interactive Object, you must redefine two virtual
44//! methods: Type and Signature.
45//! This filter is used in both Neutral Point and open local contexts.
46//! In the Collector viewer, you can only locate
47//! Interactive Objects which answer positively to the
48//! positioned filters when a local context is open.
49//! Warning
50//! When you close a local context, all temporary
51//! interactive objects are deleted, all selection modes
52//! concerning the context are cancelled, and all content
53//! filters are emptied.
54class AIS_TypeFilter : public SelectMgr_Filter
55{
56
57public:
58
59
60 //! Initializes filter for type, aGivenKind.
61 Standard_EXPORT AIS_TypeFilter(const AIS_KindOfInteractive aGivenKind);
62
63 //! Returns False if the transient is not an Interactive
64 //! Object, or if the type of the Interactive Object is not
65 //! the same as that stored in the filter.
66 Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
67
68
69
70
92efcf78 71 DEFINE_STANDARD_RTTIEXT(AIS_TypeFilter,SelectMgr_Filter)
42cf5bc1 72
73protected:
74
75
76 AIS_KindOfInteractive myKind;
77
78
79private:
80
81
82
83
84};
85
86
87
88
89
90
91
92#endif // _AIS_TypeFilter_HeaderFile