1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                          Ada Modeling Framework                          --
6--                                                                          --
7--                        Runtime Library Component                         --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com>                --
12-- All rights reserved.                                                     --
13--                                                                          --
14-- Redistribution and use in source and binary forms, with or without       --
15-- modification, are permitted provided that the following conditions       --
16-- are met:                                                                 --
17--                                                                          --
18--  * Redistributions of source code must retain the above copyright        --
19--    notice, this list of conditions and the following disclaimer.         --
20--                                                                          --
21--  * Redistributions in binary form must reproduce the above copyright     --
22--    notice, this list of conditions and the following disclaimer in the   --
23--    documentation and/or other materials provided with the distribution.  --
24--                                                                          --
25--  * Neither the name of the Vadim Godunko, IE nor the names of its        --
26--    contributors may be used to endorse or promote products derived from  --
27--    this software without specific prior written permission.              --
28--                                                                          --
29-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      --
30-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        --
31-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR    --
32-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT     --
33-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   --
34-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
35-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR   --
36-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF   --
37-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING     --
38-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS       --
39-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.             --
40--                                                                          --
41------------------------------------------------------------------------------
42--  $Revision: 2937 $ $Date: 2012-05-01 21:07:27 +0400 (Tue, 01 May 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Named_Elements;
45with AMF.UML.Continuations;
46with AMF.UML.Dependencies.Collections;
47with AMF.UML.General_Orderings.Collections;
48with AMF.UML.Interaction_Operands;
49with AMF.UML.Interactions;
50with AMF.UML.Lifelines.Collections;
51with AMF.UML.Named_Elements;
52with AMF.UML.Namespaces;
53with AMF.UML.Packages.Collections;
54with AMF.UML.String_Expressions;
55with AMF.Visitors;
56
57package AMF.Internals.UML_Continuations is
58
59   type UML_Continuation_Proxy is
60     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
61       and AMF.UML.Continuations.UML_Continuation with null record;
62
63   overriding function Get_Setting
64    (Self : not null access constant UML_Continuation_Proxy)
65       return Boolean;
66   --  Getter of Continuation::setting.
67   --
68   --  True: when the Continuation is at the end of the enclosing
69   --  InteractionFragment and False when it is in the beginning.
70
71   overriding procedure Set_Setting
72    (Self : not null access UML_Continuation_Proxy;
73     To   : Boolean);
74   --  Setter of Continuation::setting.
75   --
76   --  True: when the Continuation is at the end of the enclosing
77   --  InteractionFragment and False when it is in the beginning.
78
79   overriding function Get_Covered
80    (Self : not null access constant UML_Continuation_Proxy)
81       return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline;
82   --  Getter of InteractionFragment::covered.
83   --
84   --  References the Lifelines that the InteractionFragment involves.
85
86   overriding function Get_Enclosing_Interaction
87    (Self : not null access constant UML_Continuation_Proxy)
88       return AMF.UML.Interactions.UML_Interaction_Access;
89   --  Getter of InteractionFragment::enclosingInteraction.
90   --
91   --  The Interaction enclosing this InteractionFragment.
92
93   overriding procedure Set_Enclosing_Interaction
94    (Self : not null access UML_Continuation_Proxy;
95     To   : AMF.UML.Interactions.UML_Interaction_Access);
96   --  Setter of InteractionFragment::enclosingInteraction.
97   --
98   --  The Interaction enclosing this InteractionFragment.
99
100   overriding function Get_Enclosing_Operand
101    (Self : not null access constant UML_Continuation_Proxy)
102       return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access;
103   --  Getter of InteractionFragment::enclosingOperand.
104   --
105   --  The operand enclosing this InteractionFragment (they may nest
106   --  recursively)
107
108   overriding procedure Set_Enclosing_Operand
109    (Self : not null access UML_Continuation_Proxy;
110     To   : AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access);
111   --  Setter of InteractionFragment::enclosingOperand.
112   --
113   --  The operand enclosing this InteractionFragment (they may nest
114   --  recursively)
115
116   overriding function Get_General_Ordering
117    (Self : not null access constant UML_Continuation_Proxy)
118       return AMF.UML.General_Orderings.Collections.Set_Of_UML_General_Ordering;
119   --  Getter of InteractionFragment::generalOrdering.
120   --
121   --  The general ordering relationships contained in this fragment.
122
123   overriding function Get_Client_Dependency
124    (Self : not null access constant UML_Continuation_Proxy)
125       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
126   --  Getter of NamedElement::clientDependency.
127   --
128   --  Indicates the dependencies that reference the client.
129
130   overriding function Get_Name_Expression
131    (Self : not null access constant UML_Continuation_Proxy)
132       return AMF.UML.String_Expressions.UML_String_Expression_Access;
133   --  Getter of NamedElement::nameExpression.
134   --
135   --  The string expression used to define the name of this named element.
136
137   overriding procedure Set_Name_Expression
138    (Self : not null access UML_Continuation_Proxy;
139     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
140   --  Setter of NamedElement::nameExpression.
141   --
142   --  The string expression used to define the name of this named element.
143
144   overriding function Get_Namespace
145    (Self : not null access constant UML_Continuation_Proxy)
146       return AMF.UML.Namespaces.UML_Namespace_Access;
147   --  Getter of NamedElement::namespace.
148   --
149   --  Specifies the namespace that owns the NamedElement.
150
151   overriding function Get_Qualified_Name
152    (Self : not null access constant UML_Continuation_Proxy)
153       return AMF.Optional_String;
154   --  Getter of NamedElement::qualifiedName.
155   --
156   --  A name which allows the NamedElement to be identified within a
157   --  hierarchy of nested Namespaces. It is constructed from the names of the
158   --  containing namespaces starting at the root of the hierarchy and ending
159   --  with the name of the NamedElement itself.
160
161   overriding function All_Owning_Packages
162    (Self : not null access constant UML_Continuation_Proxy)
163       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
164   --  Operation NamedElement::allOwningPackages.
165   --
166   --  The query allOwningPackages() returns all the directly or indirectly
167   --  owning packages.
168
169   overriding function Is_Distinguishable_From
170    (Self : not null access constant UML_Continuation_Proxy;
171     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
172     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
173       return Boolean;
174   --  Operation NamedElement::isDistinguishableFrom.
175   --
176   --  The query isDistinguishableFrom() determines whether two NamedElements
177   --  may logically co-exist within a Namespace. By default, two named
178   --  elements are distinguishable if (a) they have unrelated types or (b)
179   --  they have related types but different names.
180
181   overriding function Namespace
182    (Self : not null access constant UML_Continuation_Proxy)
183       return AMF.UML.Namespaces.UML_Namespace_Access;
184   --  Operation NamedElement::namespace.
185   --
186   --  Missing derivation for NamedElement::/namespace : Namespace
187
188   overriding procedure Enter_Element
189    (Self    : not null access constant UML_Continuation_Proxy;
190     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
191     Control : in out AMF.Visitors.Traverse_Control);
192   --  Dispatch call to corresponding subprogram of visitor interface.
193
194   overriding procedure Leave_Element
195    (Self    : not null access constant UML_Continuation_Proxy;
196     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
197     Control : in out AMF.Visitors.Traverse_Control);
198   --  Dispatch call to corresponding subprogram of visitor interface.
199
200   overriding procedure Visit_Element
201    (Self     : not null access constant UML_Continuation_Proxy;
202     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
203     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
204     Control  : in out AMF.Visitors.Traverse_Control);
205   --  Dispatch call to corresponding subprogram of iterator interface.
206
207end AMF.Internals.UML_Continuations;
208