b311480e |
1 | -- Created on: 1995-09-05 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class SelectFlag from IFSelect inherits SelectExtract |
18 | |
19 | ---Purpose : A SelectFlag queries a flag noted in the bitmap of the Graph. |
20 | -- The Flag is designated by its Name. Flag Names are defined |
21 | -- by Work Session and, as necessary, other functional objects |
22 | -- |
23 | -- WorkSession from IFSelect defines flag "Incorrect" |
24 | -- Objects which control application running define some others |
25 | |
26 | uses AsciiString from TCollection, InterfaceModel, Graph, EntityIterator |
27 | |
28 | is |
29 | |
6e33d3ce |
30 | Create (flagname : CString) returns SelectFlag; |
7fd59977 |
31 | ---Purpose : Creates a Select Flag, to query a flag designated by its name |
32 | |
33 | FlagName (me) returns CString; |
34 | ---Purpose : Returns the name of the flag |
35 | |
36 | RootResult (me; G : Graph) returns EntityIterator is redefined; |
37 | ---Purpose : Returns the list of selected entities. It is redefined to |
38 | -- work on the graph itself (not queried by sort) |
39 | -- |
40 | -- An entity is selected if its flag is True on Direct mode, |
41 | -- False on Reversed mode |
42 | -- |
43 | -- If flag does not exist for the given name, returns an empty |
44 | -- result, whatever the Direct/Reversed sense |
45 | |
46 | Sort (me; rank : Integer; ent : Transient; model : InterfaceModel) |
47 | returns Boolean; |
48 | ---Purpose : Returns always False because RootResult has done the work |
49 | |
50 | |
51 | ExtractLabel (me) returns AsciiString from TCollection; |
52 | ---Purpose : Returns a text defining the criterium, includes the flag name |
53 | |
54 | fields |
55 | |
56 | thename : AsciiString from TCollection; |
57 | |
58 | end SelectFlag; |