1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
-- File: Transfer_MultipleBinder.cdl
-- Created: Wed Apr 7 19:13:46 1993
-- Author: Christian CAILLET
-- <cky@sdsun2>
---Copyright: Matra Datavision 1993
class MultipleBinder from Transfer inherits Binder
---Purpose : Allows direct binding between a starting Object and the Result
-- of its transfer, when it can be made of several Transient
-- Objects. Compared to a Transcriptor, it has no Transfer Action
--
-- Result is a list of Transient Results. Unique Result is not
-- available : SetResult is redefined to start the list on the
-- first call, and refuse the other times.
--
-- rr
--
-- Remark : MultipleBinder itself is intended to be created and
-- filled by TransferProcess itself (method Bind). In particular,
-- conflicts between Unique (Standard) result and Multiple result
-- are avoided through management made by TransferProcess.
--
-- Also, a Transcriptor (with an effective Transfer Method) which
-- can produce a Multiple Result, may be defined as a sub-class
-- of MultipleBinder by redefining method Transfer.
uses CString, Transient, Type, HSequenceOfTransient from TColStd
raises TransferFailure, OutOfRange
is
Create returns mutable MultipleBinder;
---Purpose : normal standard constructor, creates an empty MultipleBinder
IsMultiple (me) returns Boolean is redefined;
---Purpose : Returns True if a starting object is bound with SEVERAL
-- results : Here, returns allways True
ResultType (me) returns Type;
---Purpose : Returns the Type permitted for Results, i.e. here Transient
ResultTypeName (me) returns CString;
---Purpose : Returns the Name of the Type which characterizes the Result
-- Here, returns "(list)"
AddResult (me : mutable; res : mutable Transient);
---Purpose : Adds a new Item to the Multiple Result
NbResults (me) returns Integer;
---Purpose : Returns the actual count of recorded (Transient) results
ResultValue (me; num : Integer) returns mutable Transient
---Purpose : Returns the value of the recorded result n0 <num>
raises OutOfRange;
-- Error if <num> is out of range
MultipleResult (me) returns HSequenceOfTransient from TColStd;
---Purpose : Returns the Multiple Result, if it is defined (at least one
-- Item). Else, returns a Null Handle
SetMultipleResult (me : mutable;
mulres : mutable HSequenceOfTransient from TColStd)
raises TransferFailure;
---Purpose : Defines a Binding with a Multiple Result, given as a Sequence
-- Error if a Unique Result has yet been defined
fields
themulres : HSequenceOfTransient from TColStd;
end MultipleBinder;
|