1 -- Created on: 1995-09-05
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1995-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 SelectFlag from IFSelect inherits SelectExtract
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
23 -- WorkSession from IFSelect defines flag "Incorrect"
24 -- Objects which control application running define some others
26 uses AsciiString from TCollection, InterfaceModel, Graph, EntityIterator
30 Create (flagname : CString) returns mutable SelectFlag;
31 ---Purpose : Creates a Select Flag, to query a flag designated by its name
33 FlagName (me) returns CString;
34 ---Purpose : Returns the name of the flag
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)
40 -- An entity is selected if its flag is True on Direct mode,
41 -- False on Reversed mode
43 -- If flag does not exist for the given name, returns an empty
44 -- result, whatever the Direct/Reversed sense
46 Sort (me; rank : Integer; ent : Transient; model : InterfaceModel)
48 ---Purpose : Returns always False because RootResult has done the work
51 ExtractLabel (me) returns AsciiString from TCollection;
52 ---Purpose : Returns a text defining the criterium, includes the flag name
56 thename : AsciiString from TCollection;