1 -- Created on: 1997-03-06
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class TypeFilter from AIS inherits Filter from SelectMgr
25 ---Purpose: Selects Interactive Objects through their types. The
26 -- filter questions each Interactive Object in local context
27 -- to determine whether it has an non-null owner, and if
28 -- so, whether it is of the desired type. If the object
29 -- returns true in each case, it is kept. If not, it is rejected.
30 -- By default, the interactive object has a None type
31 -- and a signature of 0. A filter for type specifies a
32 -- choice of type out of a range at any level enumerated
33 -- for type or kind. The choice could be for kind of
34 -- interactive object, of dimension, of unit, or type of axis,
35 -- plane or attribute.
36 -- If you want to give a particular type and signature to
37 -- your Interactive Object, you must redefine two virtual
38 -- methods: Type and Signature.
39 -- This filter is used in both Neutral Point and open local contexts.
40 -- In the Collector viewer, you can only locate
41 -- Interactive Objects which answer positively to the
42 -- positioned filters when a local context is open.
44 -- When you close a local context, all temporary
45 -- interactive objects are deleted, all selection modes
46 -- concerning the context are cancelled, and all content
47 -- filters are emptied.
50 KindOfInteractive from AIS,
51 EntityOwner from SelectMgr
54 Create(aGivenKind : KindOfInteractive from AIS)
55 returns mutable TypeFilter from AIS;
56 ---Purpose: Initializes filter for type, aGivenKind.
57 IsOk (me;anobj : EntityOwner from SelectMgr)
58 returns Boolean from Standard is redefined virtual;
59 ---Purpose: Returns False if the transient is not an Interactive
60 -- Object, or if the type of the Interactive Object is not
61 -- the same as that stored in the filter.
64 myKind : KindOfInteractive from AIS is protected;