0032742: Coding - get rid of unused headers [Adaptor2d to Approx]
[occt.git] / src / AIS / AIS_SignatureFilter.hxx
1 // Created on: 1997-03-04
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_SignatureFilter_HeaderFile
18 #define _AIS_SignatureFilter_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <AIS_TypeFilter.hxx>
25 #include <AIS_KindOfInteractive.hxx>
26 class SelectMgr_EntityOwner;
27
28
29 class AIS_SignatureFilter;
30 DEFINE_STANDARD_HANDLE(AIS_SignatureFilter, AIS_TypeFilter)
31
32 //! Selects Interactive Objects through their signatures
33 //! and types. The signature provides an
34 //! additional   characterization of an object's type, and
35 //! takes the form of an index. The filter questions each
36 //! Interactive Object in local context to determine
37 //! whether it has an non-null owner, and if so, whether
38 //! it has the desired signature. If the object returns true
39 //! in each case, it is kept. If not, it is rejected.
40 //! By default, the   interactive object has a None   type
41 //! and a signature of 0. If you want to give a particular
42 //! type and signature to your Interactive Object, you
43 //! must redefine two virtual methods:   Type and Signature.
44 //! This filter is only used in an open local contexts.
45 //! In the Collector viewer, you can only locate
46 //! Interactive Objects which answer positively to the
47 //! positioned filters when a local context is open.
48 //! Warning
49 //! Some signatures have already been used by standard
50 //! objects delivered in AIS. These include:
51 //! -   signature 0 - Shape
52 //! -   signature 1 - Point
53 //! -   signature 2 - Axis
54 //! -   signature 3 - Trihedron
55 //! -   signature 4 - PlaneTrihedron
56 //! -   signature 5 - Line
57 //! -   signature 6 - Circle
58 //! -   signature 7 - Plane
59 class AIS_SignatureFilter : public AIS_TypeFilter
60 {
61
62 public:
63
64   
65   //! Initializes the signature filter, adding the signature
66   //! specification, aGivenSignature, to that for type,
67   //! aGivenKind, in AIS_TypeFilter.
68   Standard_EXPORT AIS_SignatureFilter(const AIS_KindOfInteractive aGivenKind, const Standard_Integer aGivenSignature);
69   
70   //! Returns False if the transient is not an AIS_InteractiveObject.
71   //! Returns False if the signature of InteractiveObject
72   //! is not the same as the stored one in the filter...
73   Standard_EXPORT Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
74
75
76
77
78   DEFINE_STANDARD_RTTIEXT(AIS_SignatureFilter,AIS_TypeFilter)
79
80 protected:
81
82
83
84
85 private:
86
87
88   Standard_Integer mySig;
89
90
91 };
92
93
94
95
96
97
98
99 #endif // _AIS_SignatureFilter_HeaderFile