Files
OCCT/src/IFSelect/IFSelect_SelectRange.cdl
bugmaster b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00

86 lines
3.3 KiB
Plaintext
Executable File

-- Created on: 1992-11-18
-- Created by: Christian CAILLET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
--
-- The content of this file is subject to the Open CASCADE Technology Public
-- License Version 6.5 (the "License"). You may not use the content of this file
-- except in compliance with the License. Please obtain a copy of the License
-- at http://www.opencascade.org and read it completely before using this file.
--
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
--
-- The Original Code and all software distributed under the License is
-- distributed on an "AS IS" basis, without warranty of any kind, and the
-- Initial Developer hereby disclaims all such warranties, including without
-- limitation, any warranties of merchantability, fitness for a particular
-- purpose or non-infringement. Please see the License for the specific terms
-- and conditions governing the rights and limitations under the License.
class SelectRange from IFSelect inherits SelectExtract
---Purpose : A SelectRange keeps or rejects a sub-set of the input set,
-- that is the Entities of which rank in the iteration list
-- is in a given range (for instance form 2nd to 6th, etc...)
uses AsciiString from TCollection, InterfaceModel, IntParam
raises DomainError
is
Create returns mutable SelectRange;
---Purpose : Creates a SelectRange. Default is Take all the input list
SetRange (me : mutable; rankfrom, rankto : mutable IntParam)
raises DomainError;
---Purpose : Sets a Range for numbers, with a lower and a upper limits
-- Error if rankto is lower then rankfrom
SetOne (me : mutable; rank : mutable IntParam);
---Purpose : Sets a unique number (only one Entity will be sorted as True)
SetFrom (me : mutable; rankfrom : mutable IntParam);
---Purpose : Sets a Lower limit but no upper limit
SetUntil (me : mutable; rankto : mutable IntParam);
---Purpose : Sets an Upper limit but no lower limit (equivalent to lower 1)
HasLower (me) returns Boolean;
---Purpose : Returns True if a Lower limit is defined
Lower (me) returns mutable IntParam;
---Purpose : Returns Lower limit (if there is; else, value is senseless)
LowerValue (me) returns Integer;
---Purpose : Returns Value of Lower Limit (0 if none is defined)
HasUpper (me) returns Boolean;
---Purpose : Returns True if a Lower limit is defined
Upper (me) returns mutable IntParam;
---Purpose : Returns Upper limit (if there is; else, value is senseless)
UpperValue (me) returns Integer;
---Purpose : Returns Value of Upper Limit (0 if none is defined)
Sort (me; rank : Integer; ent : Transient; model : InterfaceModel)
returns Boolean;
---Purpose : Returns True for an Entity of which occurence number in the
-- iteration is inside the selected Range (considers <rank>)
ExtractLabel (me) returns AsciiString from TCollection;
---Purpose : Returns a text defining the criterium : following cases,
-- " From .. Until .." or "From .." or "Until .." or "Rank no .."
fields
thelower : IntParam;
theupper : IntParam;
end SelectRange;