1 -- Created on: 1992-11-18
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1992-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 SelectRange from IFSelect inherits SelectExtract
19 ---Purpose : A SelectRange keeps or rejects a sub-set of the input set,
20 -- that is the Entities of which rank in the iteration list
21 -- is in a given range (for instance form 2nd to 6th, etc...)
23 uses AsciiString from TCollection, InterfaceModel, IntParam
29 Create returns SelectRange;
30 ---Purpose : Creates a SelectRange. Default is Take all the input list
32 SetRange (me : mutable; rankfrom, rankto : IntParam)
34 ---Purpose : Sets a Range for numbers, with a lower and a upper limits
35 -- Error if rankto is lower then rankfrom
37 SetOne (me : mutable; rank : IntParam);
38 ---Purpose : Sets a unique number (only one Entity will be sorted as True)
40 SetFrom (me : mutable; rankfrom : IntParam);
41 ---Purpose : Sets a Lower limit but no upper limit
43 SetUntil (me : mutable; rankto : IntParam);
44 ---Purpose : Sets an Upper limit but no lower limit (equivalent to lower 1)
46 HasLower (me) returns Boolean;
47 ---Purpose : Returns True if a Lower limit is defined
49 Lower (me) returns IntParam;
50 ---Purpose : Returns Lower limit (if there is; else, value is senseless)
52 LowerValue (me) returns Integer;
53 ---Purpose : Returns Value of Lower Limit (0 if none is defined)
55 HasUpper (me) returns Boolean;
56 ---Purpose : Returns True if a Lower limit is defined
58 Upper (me) returns IntParam;
59 ---Purpose : Returns Upper limit (if there is; else, value is senseless)
61 UpperValue (me) returns Integer;
62 ---Purpose : Returns Value of Upper Limit (0 if none is defined)
65 Sort (me; rank : Integer; ent : Transient; model : InterfaceModel)
67 ---Purpose : Returns True for an Entity of which occurence number in the
68 -- iteration is inside the selected Range (considers <rank>)
70 ExtractLabel (me) returns AsciiString from TCollection;
71 ---Purpose : Returns a text defining the criterium : following cases,
72 -- " From .. Until .." or "From .." or "Until .." or "Rank no .."