0022165: IGES transaltor does not produce any shape
[occt.git] / src / IFSelect / IFSelect_SelectAnyList.cdl
1 -- File:        IFSelect_SelectAnyList.cdl
2 -- Created:     Wed Dec  9 11:57:08 1992
3 -- Author:      Christian CAILLET
4 --              <cky@topsn3>
5 ---Copyright:    Matra Datavision 1992
6
7
8 deferred class SelectAnyList  from IFSelect  inherits SelectDeduct
9
10
11     ---Purpose : A SelectAnyList kind Selection selects a List of an Entity, as
12     --           well as this Entity contains some. A List contains sub-entities
13     --           as one per Item, or several (for instance if an Entity binds
14     --           couples of sub-entities, each item is one of these couples).
15     --           Remark that only Entities are taken into account (neither
16     --           Reals, nor Strings, etc...)
17     --           
18     --           To define the list on which to work, SelectAnyList has two
19     --           deferred methods : NbItems (which gives the length of the
20     --           list), FillResult (which fills an EntityIterator). They are
21     --           intended to get a List in an Entity of the required Type (and
22     --           consider that list is empty if Entity has not required Type)
23     --           
24     --           In addition, remark that some types of Entity define more than
25     --           one list in each instance : a given sub-class of SelectAnyList
26     --           must be attached to one list
27     --           
28     --           SelectAnyList keeps or rejects a sub-set of the list,
29     --           that is the Items of which rank in the list is in a given
30     --           range (for instance form 2nd to 6th, etc...)
31     --           Range is defined by two Integer values. In order to allow
32     --           external control of them, these values are not directly
33     --           defined as fields, but accessed through IntParams, that is,
34     --           referenced as Transient (Handle) objects
35     --
36     --           Warning : the Input can be any kind of Selection, BUT its
37     --           RootResult must have zero (empty) or one Entity maximum
38
39 uses AsciiString from TCollection, Transient, EntityIterator, Graph, IntParam
40
41 raises OutOfRange, InterfaceError
42
43 is
44
45     KeepInputEntity (me; iter : in out EntityIterator) is deferred;
46     ---Purpose : Keeps Input Entity, as having required type. It works by
47     --           keeping in <iter>, only suitable Entities (SelectType can be
48     --           used). Called by RootResult (which waits for ONE ENTITY MAX)
49
50     NbItems (me; ent : Transient) returns Integer  is deferred;
51     ---Purpose : Returns count of Items in the list in the Entity <ent>
52     --           If <ent> has not required type, returned value must be Zero
53
54
55     SetRange (me : mutable; rankfrom, rankto : mutable IntParam);
56     ---Purpose : Sets a Range for numbers, with a lower and a upper limits
57
58     SetOne  (me : mutable; rank : mutable IntParam);
59     ---Purpose : Sets a unique number (only one Entity will be sorted as True)
60
61     SetFrom (me : mutable; rankfrom : mutable IntParam);
62     ---Purpose : Sets a Lower limit but no upper limit
63
64     SetUntil (me : mutable; rankto : mutable IntParam);
65     ---Purpose : Sets an Upper limit but no lower limit (equivalent to lower 1)
66
67     HasLower (me) returns Boolean;
68     ---Purpose : Returns True if a Lower limit is defined
69
70     Lower (me) returns mutable IntParam;
71     ---Purpose : Returns Lower limit (if there is; else, value is senseless)
72
73     LowerValue (me) returns Integer;
74     ---Purpose : Returns Integer Value of Lower Limit (0 if none)
75
76     HasUpper (me) returns Boolean;
77     ---Purpose : Returns True if a Lower limit is defined
78
79     Upper (me) returns mutable IntParam;
80     ---Purpose : Returns Upper limit (if there is; else, value is senseless)
81
82     UpperValue (me) returns Integer;
83     ---Purpose : Returns Integer Value of Upper Limit (0 if none)
84
85
86     RootResult (me; G : Graph) returns EntityIterator  raises InterfaceError;
87     ---Purpose : Returns the list of selected entities (list of entities
88     --           complying with rank criterium)
89     --           Error if the input list has more than one Item
90
91     FillResult (me; n1,n2 : Integer; ent : Transient;
92         res : in out EntityIterator)  is deferred;
93     ---Purpose : Puts into <res>, the sub-entities of the list, from n1 to
94     --           n2 included. Remark that adequation with Entity's type and
95     --           length of list has already been made at this stage
96     --           Called by RootResult
97
98
99     Label (me) returns AsciiString from TCollection;
100     ---Purpose : Returns a text defining the criterium : "Componants of List "
101     --           then Specific List Label, then, following cases :
102     --           " From .. Until .." or "From .." or "Until .." or "Rank no .."
103     --           Specific type is given by deferred method ListLabel
104
105     ListLabel (me) returns AsciiString from TCollection  is deferred;
106     ---Purpose : Returns the specific label for the list, which is included as
107     --           a part of Label
108
109 fields
110
111     thelower : IntParam;
112     theupper : IntParam;
113
114 end SelectAnyList;