1 -- Created on: 1997-11-28
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class ExclusionFilter from AIS inherits Filter from SelectMgr
19 ---Purpose: A framework to reject or to accept only objects of
20 -- given types and/or signatures.
21 -- Objects are stored, and the stored objects - along
22 -- with the flag settings - are used to define the filter.
23 -- Objects to be filtered are compared with the stored
24 -- objects added to the filter, and are accepted or
25 -- rejected according to the exclusion flag setting.
26 -- - Exclusion flag on
27 -- - the function IsOk answers true for all objects,
28 -- except those of the types and signatures stored
29 -- in the filter framework
30 -- - Exclusion flag off
31 -- - the funciton IsOk answers true for all objects
32 -- which have the same type and signature as the stored ones.
36 EntityOwner from SelectMgr,
37 KindOfInteractive from AIS,
38 ListOfInteger from TColStd,
39 DataMapOfIntegerListOfInteger from TColStd
42 Create(ExclusionFlagOn:Boolean from Standard = Standard_True)
43 returns ExclusionFilter from AIS;
44 ---Purpose: Constructs an empty exclusion filter object defined by
45 -- the flag setting ExclusionFlagOn.
46 -- By default, the flag is set to true.
48 Create(TypeToExclude : KindOfInteractive from AIS;
49 ExclusionFlagOn : Boolean from Standard = Standard_True)
50 returns ExclusionFilter from AIS;
51 ---Purpose: All the AIS objects of <TypeToExclude>
52 -- Will be rejected by the IsOk Method.
55 Create(TypeToExclude : KindOfInteractive from AIS;
56 SignatureInType :Integer from Standard ;
57 ExclusionFlagOn : Boolean from Standard = Standard_True)
58 returns ExclusionFilter from AIS;
59 ---Purpose: Constructs an exclusion filter object defined by the
60 -- enumeration value TypeToExclude, the signature
61 -- SignatureInType, and the flag setting ExclusionFlagOn.
62 -- By default, the flag is set to true.
65 IsOk(me; anObj : EntityOwner from SelectMgr)
66 returns Boolean from Standard
73 ---Category: Load Filter...
75 Add(me:mutable;TypeToExclude : KindOfInteractive from AIS)
76 returns Boolean from Standard;
77 ---Purpose: Adds the type TypeToExclude to the list of types.
80 TypeToExclude : KindOfInteractive from AIS;
81 SignatureInType : Integer from Standard)
82 returns Boolean from Standard;
85 TypeToExclude:KindOfInteractive from AIS)
86 returns Boolean from Standard;
89 TypeToExclude:KindOfInteractive from AIS;
90 SignatureInType : Integer from Standard)
91 returns Boolean from Standard;
95 ---Category: Information about Filter...
99 IsExclusionFlagOn(me) returns Boolean from Standard;
102 SetExclusionFlag(me:mutable; Status : Boolean from Standard);
106 IsStored(me;aType:KindOfInteractive from AIS) returns Boolean from Standard;
108 ListOfStoredTypes( me; TheList: in out ListOfInteger from TColStd);
111 aType : KindOfInteractive from AIS;
112 TheStoredList : in out ListOfInteger from TColStd);
115 IsSignatureIn(me;aType:KindOfInteractive from AIS;aSignature:Integer from Standard)
116 returns Boolean from Standard is static private;
119 myIsExclusionFlagOn : Boolean from Standard;
120 myStoredTypes : DataMapOfIntegerListOfInteger from TColStd;