7fd59977 |
1 | -- File: AIS_ExclusionFilter.cdl |
2 | -- Created: Fri Nov 28 11:04:30 1997 |
3 | -- Author: Robert COUBLANC |
4 | -- <rob@robox.paris1.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 1997 |
6 | |
7 | |
8 | class ExclusionFilter from AIS inherits Filter from SelectMgr |
9 | |
10 | ---Purpose: A framework to reject or to accept only objects of |
11 | -- given types and/or signatures. |
12 | -- Objects are stored, and the stored objects - along |
13 | -- with the flag settings - are used to define the filter. |
14 | -- Objects to be filtered are compared with the stored |
15 | -- objects added to the filter, and are accepted or |
16 | -- rejected according to the exclusion flag setting. |
17 | -- - Exclusion flag on |
18 | -- - the function IsOk answers true for all objects, |
19 | -- except those of the types and signatures stored |
20 | -- in the filter framework |
21 | -- - Exclusion flag off |
22 | -- - the funciton IsOk answers true for all objects |
23 | -- which have the same type and signature as the stored ones. |
24 | |
25 | uses |
26 | |
27 | EntityOwner from SelectMgr, |
28 | KindOfInteractive from AIS, |
29 | ListOfInteger from TColStd, |
30 | DataMapOfIntegerListOfInteger from TColStd |
31 | is |
32 | |
33 | Create(ExclusionFlagOn:Boolean from Standard = Standard_True) |
34 | returns mutable ExclusionFilter from AIS; |
35 | ---Purpose: Constructs an empty exclusion filter object defined by |
36 | -- the flag setting ExclusionFlagOn. |
37 | -- By default, the flag is set to true. |
38 | |
39 | Create(TypeToExclude : KindOfInteractive from AIS; |
40 | ExclusionFlagOn : Boolean from Standard = Standard_True) |
41 | returns mutable ExclusionFilter from AIS; |
42 | ---Purpose: All the AIS objects of <TypeToExclude> |
43 | -- Will be rejected by the IsOk Method. |
44 | |
45 | |
46 | Create(TypeToExclude : KindOfInteractive from AIS; |
47 | SignatureInType :Integer from Standard ; |
48 | ExclusionFlagOn : Boolean from Standard = Standard_True) |
49 | returns mutable ExclusionFilter from AIS; |
50 | ---Purpose: Constructs an exclusion filter object defined by the |
51 | -- enumeration value TypeToExclude, the signature |
52 | -- SignatureInType, and the flag setting ExclusionFlagOn. |
53 | -- By default, the flag is set to true. |
54 | |
55 | |
56 | IsOk(me; anObj : EntityOwner from SelectMgr) |
57 | returns Boolean from Standard |
58 | is redefined virtual; |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | ---Category: Load Filter... |
65 | |
66 | Add(me:mutable;TypeToExclude : KindOfInteractive from AIS) |
67 | returns Boolean from Standard; |
68 | ---Purpose: Adds the type TypeToExclude to the list of types. |
69 | |
70 | Add(me:mutable; |
71 | TypeToExclude : KindOfInteractive from AIS; |
72 | SignatureInType : Integer from Standard) |
73 | returns Boolean from Standard; |
74 | |
75 | Remove(me:mutable; |
76 | TypeToExclude:KindOfInteractive from AIS) |
77 | returns Boolean from Standard; |
78 | |
79 | Remove(me:mutable; |
80 | TypeToExclude:KindOfInteractive from AIS; |
81 | SignatureInType : Integer from Standard) |
82 | returns Boolean from Standard; |
83 | |
84 | Clear(me:mutable); |
85 | |
86 | ---Category: Information about Filter... |
87 | |
88 | |
89 | |
90 | IsExclusionFlagOn(me) returns Boolean from Standard; |
91 | ---C++: inline |
92 | |
93 | SetExclusionFlag(me:mutable; Status : Boolean from Standard); |
94 | ---C++: inline |
95 | |
96 | |
97 | IsStored(me;aType:KindOfInteractive from AIS) returns Boolean from Standard; |
98 | |
99 | ListOfStoredTypes( me; TheList: in out ListOfInteger from TColStd); |
100 | |
101 | ListOfSignature(me; |
102 | aType : KindOfInteractive from AIS; |
103 | TheStoredList : in out ListOfInteger from TColStd); |
104 | |
105 | |
106 | IsSignatureIn(me;aType:KindOfInteractive from AIS;aSignature:Integer from Standard) |
107 | returns Boolean from Standard is static private; |
108 | |
109 | fields |
110 | myIsExclusionFlagOn : Boolean from Standard; |
111 | myStoredTypes : DataMapOfIntegerListOfInteger from TColStd; |
112 | end ExclusionFilter; |