0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / AIS / AIS_TypeFilter.cdl
1 -- Created on: 1997-03-06
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 class TypeFilter from AIS  inherits Filter from SelectMgr
18
19         ---Purpose: Selects Interactive Objects through their types. The
20         -- filter questions each Interactive Object in local context
21         -- to determine whether it has an non-null owner, and if
22         -- so, whether it is of the desired type. If the object
23         -- returns true in each case, it is kept. If not, it is rejected.
24         -- By default, the   interactive object has a None   type
25         -- and a signature of 0. A filter for type specifies a
26         -- choice of type out of a range at any level enumerated
27         -- for type or kind. The choice could be for kind of
28         -- interactive object, of dimension, of unit, or type of axis,
29         -- plane or attribute.
30         -- If you want to give a particular type and signature to
31         -- your Interactive Object, you must redefine two virtual
32         -- methods:   Type and Signature.
33         -- This filter is used in both Neutral Point and open local contexts.
34         -- In the Collector viewer, you can only locate
35         -- Interactive Objects which answer positively to the
36         -- positioned filters when a local context is open.
37         -- Warning
38         -- When you close a local context, all temporary
39         -- interactive objects are deleted, all selection modes
40         -- concerning the context are cancelled, and all content
41         -- filters are emptied.
42
43 uses
44     KindOfInteractive from AIS,
45     EntityOwner from SelectMgr
46
47 is
48     Create(aGivenKind      : KindOfInteractive from AIS)
49     returns TypeFilter from AIS;
50         ---Purpose: Initializes filter for type, aGivenKind.
51     IsOk (me;anobj : EntityOwner from SelectMgr)
52     returns Boolean from Standard is redefined virtual;
53         ---Purpose: Returns False if the transient is not an Interactive
54         -- Object, or if the type of the Interactive Object is not
55         -- the same as that stored in the filter.
56         
57 fields
58     myKind : KindOfInteractive from AIS is protected;
59
60 end TypeFilter;