blob: 2a1d55ea5877b5cdca4b228d918dc45f78d5240c (
plain)
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
110
111
112
|
-- File: AIS_ExclusionFilter.cdl
-- Created: Fri Nov 28 11:04:30 1997
-- Author: Robert COUBLANC
-- <rob@robox.paris1.matra-dtv.fr>
---Copyright: Matra Datavision 1997
class ExclusionFilter from AIS inherits Filter from SelectMgr
---Purpose: 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.
uses
EntityOwner from SelectMgr,
KindOfInteractive from AIS,
ListOfInteger from TColStd,
DataMapOfIntegerListOfInteger from TColStd
is
Create(ExclusionFlagOn:Boolean from Standard = Standard_True)
returns mutable ExclusionFilter from AIS;
---Purpose: Constructs an empty exclusion filter object defined by
-- the flag setting ExclusionFlagOn.
-- By default, the flag is set to true.
Create(TypeToExclude : KindOfInteractive from AIS;
ExclusionFlagOn : Boolean from Standard = Standard_True)
returns mutable ExclusionFilter from AIS;
---Purpose: All the AIS objects of <TypeToExclude>
-- Will be rejected by the IsOk Method.
Create(TypeToExclude : KindOfInteractive from AIS;
SignatureInType :Integer from Standard ;
ExclusionFlagOn : Boolean from Standard = Standard_True)
returns mutable ExclusionFilter from AIS;
---Purpose: 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.
IsOk(me; anObj : EntityOwner from SelectMgr)
returns Boolean from Standard
is redefined virtual;
---Category: Load Filter...
Add(me:mutable;TypeToExclude : KindOfInteractive from AIS)
returns Boolean from Standard;
---Purpose: Adds the type TypeToExclude to the list of types.
Add(me:mutable;
TypeToExclude : KindOfInteractive from AIS;
SignatureInType : Integer from Standard)
returns Boolean from Standard;
Remove(me:mutable;
TypeToExclude:KindOfInteractive from AIS)
returns Boolean from Standard;
Remove(me:mutable;
TypeToExclude:KindOfInteractive from AIS;
SignatureInType : Integer from Standard)
returns Boolean from Standard;
Clear(me:mutable);
---Category: Information about Filter...
IsExclusionFlagOn(me) returns Boolean from Standard;
---C++: inline
SetExclusionFlag(me:mutable; Status : Boolean from Standard);
---C++: inline
IsStored(me;aType:KindOfInteractive from AIS) returns Boolean from Standard;
ListOfStoredTypes( me; TheList: in out ListOfInteger from TColStd);
ListOfSignature(me;
aType : KindOfInteractive from AIS;
TheStoredList : in out ListOfInteger from TColStd);
IsSignatureIn(me;aType:KindOfInteractive from AIS;aSignature:Integer from Standard)
returns Boolean from Standard is static private;
fields
myIsExclusionFlagOn : Boolean from Standard;
myStoredTypes : DataMapOfIntegerListOfInteger from TColStd;
end ExclusionFilter;
|