File: AIS_ExclusionFilter.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (109 lines) | stat: -rw-r--r-- 3,815 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _AIS_ExclusionFilter_HeaderFile
#define _AIS_ExclusionFilter_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_AIS_ExclusionFilter.hxx>

#include <Standard_Boolean.hxx>
#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
#include <SelectMgr_Filter.hxx>
#include <AIS_KindOfInteractive.hxx>
#include <Standard_Integer.hxx>
#include <Handle_SelectMgr_EntityOwner.hxx>
class SelectMgr_EntityOwner;
class TColStd_ListOfInteger;


//! A framework to reject or to accept only objects of
//! given types and/or signatures.
//! Objects are stored, and the stored objects - along
//! with the flag settings - are used to define the filter.
//! Objects to be filtered are compared with the stored
//! objects added to the filter, and are accepted or
//! rejected according to the exclusion flag setting.
//! -   Exclusion flag on
//! -   the function IsOk answers true for all objects,
//! except those of the types and signatures stored
//! in the filter framework
//! -   Exclusion flag off
//! -   the funciton IsOk answers true for all objects
//! which have the same type and signature as the stored ones.
class AIS_ExclusionFilter : public SelectMgr_Filter
{

public:

  
  //! Constructs an empty exclusion filter object defined by
  //! the flag setting ExclusionFlagOn.
  //! By default, the flag is set to true.
  Standard_EXPORT AIS_ExclusionFilter(const Standard_Boolean ExclusionFlagOn = Standard_True);
  
  //! All the AIS objects of <TypeToExclude>
  //! Will be rejected by the IsOk Method.
  Standard_EXPORT AIS_ExclusionFilter(const AIS_KindOfInteractive TypeToExclude, const Standard_Boolean ExclusionFlagOn = Standard_True);
  
  //! Constructs an exclusion filter object defined by the
  //! enumeration value TypeToExclude, the signature
  //! SignatureInType, and the flag setting ExclusionFlagOn.
  //! By default, the flag is set to true.
  Standard_EXPORT AIS_ExclusionFilter(const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType, const Standard_Boolean ExclusionFlagOn = Standard_True);
  
  Standard_EXPORT virtual   Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anObj)  const;
  
  //! Adds the type TypeToExclude to the list of types.
  Standard_EXPORT   Standard_Boolean Add (const AIS_KindOfInteractive TypeToExclude) ;
  
  Standard_EXPORT   Standard_Boolean Add (const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType) ;
  
  Standard_EXPORT   Standard_Boolean Remove (const AIS_KindOfInteractive TypeToExclude) ;
  
  Standard_EXPORT   Standard_Boolean Remove (const AIS_KindOfInteractive TypeToExclude, const Standard_Integer SignatureInType) ;
  
  Standard_EXPORT   void Clear() ;
  
      Standard_Boolean IsExclusionFlagOn()  const;
  
      void SetExclusionFlag (const Standard_Boolean Status) ;
  
  Standard_EXPORT   Standard_Boolean IsStored (const AIS_KindOfInteractive aType)  const;
  
  Standard_EXPORT   void ListOfStoredTypes (TColStd_ListOfInteger& TheList)  const;
  
  Standard_EXPORT   void ListOfSignature (const AIS_KindOfInteractive aType, TColStd_ListOfInteger& TheStoredList)  const;




  DEFINE_STANDARD_RTTI(AIS_ExclusionFilter)

protected:




private: 

  
  Standard_EXPORT   Standard_Boolean IsSignatureIn (const AIS_KindOfInteractive aType, const Standard_Integer aSignature)  const;

  Standard_Boolean myIsExclusionFlagOn;
  TColStd_DataMapOfIntegerListOfInteger myStoredTypes;


};


#include <AIS_ExclusionFilter.lxx>





#endif // _AIS_ExclusionFilter_HeaderFile