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.Activities;
46with AMF.UML.Activity_Edges.Collections;
47with AMF.UML.Activity_Groups.Collections;
48with AMF.UML.Activity_Nodes.Collections;
49with AMF.UML.Activity_Partitions.Collections;
50with AMF.UML.Associations;
51with AMF.UML.Classifiers.Collections;
52with AMF.UML.Constraints.Collections;
53with AMF.UML.Create_Link_Actions;
54with AMF.UML.Dependencies.Collections;
55with AMF.UML.Exception_Handlers.Collections;
56with AMF.UML.Input_Pins.Collections;
57with AMF.UML.Interruptible_Activity_Regions.Collections;
58with AMF.UML.Link_End_Creation_Datas.Collections;
59with AMF.UML.Link_End_Datas.Collections;
60with AMF.UML.Named_Elements;
61with AMF.UML.Namespaces;
62with AMF.UML.Output_Pins.Collections;
63with AMF.UML.Packages.Collections;
64with AMF.UML.Redefinable_Elements.Collections;
65with AMF.UML.String_Expressions;
66with AMF.UML.Structured_Activity_Nodes;
67with AMF.Visitors;
68
69package AMF.Internals.UML_Create_Link_Actions is
70
71   type UML_Create_Link_Action_Proxy is
72     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
73       and AMF.UML.Create_Link_Actions.UML_Create_Link_Action with null record;
74
75   overriding function Get_End_Data
76    (Self : not null access constant UML_Create_Link_Action_Proxy)
77       return AMF.UML.Link_End_Creation_Datas.Collections.Set_Of_UML_Link_End_Creation_Data;
78   --  Getter of CreateLinkAction::endData.
79   --
80   --  Specifies ends of association and inputs.
81
82   overriding function Get_End_Data
83    (Self : not null access constant UML_Create_Link_Action_Proxy)
84       return AMF.UML.Link_End_Datas.Collections.Set_Of_UML_Link_End_Data;
85   --  Getter of LinkAction::endData.
86   --
87   --  Data identifying one end of a link by the objects on its ends and
88   --  qualifiers.
89
90   overriding function Get_Input_Value
91    (Self : not null access constant UML_Create_Link_Action_Proxy)
92       return AMF.UML.Input_Pins.Collections.Set_Of_UML_Input_Pin;
93   --  Getter of LinkAction::inputValue.
94   --
95   --  Pins taking end objects and qualifier values as input.
96
97   overriding function Get_Context
98    (Self : not null access constant UML_Create_Link_Action_Proxy)
99       return AMF.UML.Classifiers.UML_Classifier_Access;
100   --  Getter of Action::context.
101   --
102   --  The classifier that owns the behavior of which this action is a part.
103
104   overriding function Get_Input
105    (Self : not null access constant UML_Create_Link_Action_Proxy)
106       return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin;
107   --  Getter of Action::input.
108   --
109   --  The ordered set of input pins connected to the Action. These are among
110   --  the total set of inputs.
111
112   overriding function Get_Is_Locally_Reentrant
113    (Self : not null access constant UML_Create_Link_Action_Proxy)
114       return Boolean;
115   --  Getter of Action::isLocallyReentrant.
116   --
117   --  If true, the action can begin a new, concurrent execution, even if
118   --  there is already another execution of the action ongoing. If false, the
119   --  action cannot begin a new execution until any previous execution has
120   --  completed.
121
122   overriding procedure Set_Is_Locally_Reentrant
123    (Self : not null access UML_Create_Link_Action_Proxy;
124     To   : Boolean);
125   --  Setter of Action::isLocallyReentrant.
126   --
127   --  If true, the action can begin a new, concurrent execution, even if
128   --  there is already another execution of the action ongoing. If false, the
129   --  action cannot begin a new execution until any previous execution has
130   --  completed.
131
132   overriding function Get_Local_Postcondition
133    (Self : not null access constant UML_Create_Link_Action_Proxy)
134       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
135   --  Getter of Action::localPostcondition.
136   --
137   --  Constraint that must be satisfied when executed is completed.
138
139   overriding function Get_Local_Precondition
140    (Self : not null access constant UML_Create_Link_Action_Proxy)
141       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
142   --  Getter of Action::localPrecondition.
143   --
144   --  Constraint that must be satisfied when execution is started.
145
146   overriding function Get_Output
147    (Self : not null access constant UML_Create_Link_Action_Proxy)
148       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin;
149   --  Getter of Action::output.
150   --
151   --  The ordered set of output pins connected to the Action. The action
152   --  places its results onto pins in this set.
153
154   overriding function Get_Handler
155    (Self : not null access constant UML_Create_Link_Action_Proxy)
156       return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler;
157   --  Getter of ExecutableNode::handler.
158   --
159   --  A set of exception handlers that are examined if an uncaught exception
160   --  propagates to the outer level of the executable node.
161
162   overriding function Get_Activity
163    (Self : not null access constant UML_Create_Link_Action_Proxy)
164       return AMF.UML.Activities.UML_Activity_Access;
165   --  Getter of ActivityNode::activity.
166   --
167   --  Activity containing the node.
168
169   overriding procedure Set_Activity
170    (Self : not null access UML_Create_Link_Action_Proxy;
171     To   : AMF.UML.Activities.UML_Activity_Access);
172   --  Setter of ActivityNode::activity.
173   --
174   --  Activity containing the node.
175
176   overriding function Get_In_Group
177    (Self : not null access constant UML_Create_Link_Action_Proxy)
178       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
179   --  Getter of ActivityNode::inGroup.
180   --
181   --  Groups containing the node.
182
183   overriding function Get_In_Interruptible_Region
184    (Self : not null access constant UML_Create_Link_Action_Proxy)
185       return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region;
186   --  Getter of ActivityNode::inInterruptibleRegion.
187   --
188   --  Interruptible regions containing the node.
189
190   overriding function Get_In_Partition
191    (Self : not null access constant UML_Create_Link_Action_Proxy)
192       return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
193   --  Getter of ActivityNode::inPartition.
194   --
195   --  Partitions containing the node.
196
197   overriding function Get_In_Structured_Node
198    (Self : not null access constant UML_Create_Link_Action_Proxy)
199       return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
200   --  Getter of ActivityNode::inStructuredNode.
201   --
202   --  Structured activity node containing the node.
203
204   overriding procedure Set_In_Structured_Node
205    (Self : not null access UML_Create_Link_Action_Proxy;
206     To   : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
207   --  Setter of ActivityNode::inStructuredNode.
208   --
209   --  Structured activity node containing the node.
210
211   overriding function Get_Incoming
212    (Self : not null access constant UML_Create_Link_Action_Proxy)
213       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
214   --  Getter of ActivityNode::incoming.
215   --
216   --  Edges that have the node as target.
217
218   overriding function Get_Outgoing
219    (Self : not null access constant UML_Create_Link_Action_Proxy)
220       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
221   --  Getter of ActivityNode::outgoing.
222   --
223   --  Edges that have the node as source.
224
225   overriding function Get_Redefined_Node
226    (Self : not null access constant UML_Create_Link_Action_Proxy)
227       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node;
228   --  Getter of ActivityNode::redefinedNode.
229   --
230   --  Inherited nodes replaced by this node in a specialization of the
231   --  activity.
232
233   overriding function Get_Is_Leaf
234    (Self : not null access constant UML_Create_Link_Action_Proxy)
235       return Boolean;
236   --  Getter of RedefinableElement::isLeaf.
237   --
238   --  Indicates whether it is possible to further redefine a
239   --  RedefinableElement. If the value is true, then it is not possible to
240   --  further redefine the RedefinableElement. Note that this property is
241   --  preserved through package merge operations; that is, the capability to
242   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
243   --  the resulting RedefinableElement of a package merge operation where a
244   --  RedefinableElement with isLeaf=false is merged with a matching
245   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
246   --  will have isLeaf=false. Default value is false.
247
248   overriding procedure Set_Is_Leaf
249    (Self : not null access UML_Create_Link_Action_Proxy;
250     To   : Boolean);
251   --  Setter of RedefinableElement::isLeaf.
252   --
253   --  Indicates whether it is possible to further redefine a
254   --  RedefinableElement. If the value is true, then it is not possible to
255   --  further redefine the RedefinableElement. Note that this property is
256   --  preserved through package merge operations; that is, the capability to
257   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
258   --  the resulting RedefinableElement of a package merge operation where a
259   --  RedefinableElement with isLeaf=false is merged with a matching
260   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
261   --  will have isLeaf=false. Default value is false.
262
263   overriding function Get_Redefined_Element
264    (Self : not null access constant UML_Create_Link_Action_Proxy)
265       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
266   --  Getter of RedefinableElement::redefinedElement.
267   --
268   --  The redefinable element that is being redefined by this element.
269
270   overriding function Get_Redefinition_Context
271    (Self : not null access constant UML_Create_Link_Action_Proxy)
272       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
273   --  Getter of RedefinableElement::redefinitionContext.
274   --
275   --  References the contexts that this element may be redefined from.
276
277   overriding function Get_Client_Dependency
278    (Self : not null access constant UML_Create_Link_Action_Proxy)
279       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
280   --  Getter of NamedElement::clientDependency.
281   --
282   --  Indicates the dependencies that reference the client.
283
284   overriding function Get_Name_Expression
285    (Self : not null access constant UML_Create_Link_Action_Proxy)
286       return AMF.UML.String_Expressions.UML_String_Expression_Access;
287   --  Getter of NamedElement::nameExpression.
288   --
289   --  The string expression used to define the name of this named element.
290
291   overriding procedure Set_Name_Expression
292    (Self : not null access UML_Create_Link_Action_Proxy;
293     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
294   --  Setter of NamedElement::nameExpression.
295   --
296   --  The string expression used to define the name of this named element.
297
298   overriding function Get_Namespace
299    (Self : not null access constant UML_Create_Link_Action_Proxy)
300       return AMF.UML.Namespaces.UML_Namespace_Access;
301   --  Getter of NamedElement::namespace.
302   --
303   --  Specifies the namespace that owns the NamedElement.
304
305   overriding function Get_Qualified_Name
306    (Self : not null access constant UML_Create_Link_Action_Proxy)
307       return AMF.Optional_String;
308   --  Getter of NamedElement::qualifiedName.
309   --
310   --  A name which allows the NamedElement to be identified within a
311   --  hierarchy of nested Namespaces. It is constructed from the names of the
312   --  containing namespaces starting at the root of the hierarchy and ending
313   --  with the name of the NamedElement itself.
314
315   overriding function Association
316    (Self : not null access constant UML_Create_Link_Action_Proxy)
317       return AMF.UML.Associations.UML_Association_Access;
318   --  Operation LinkAction::association.
319   --
320   --  The association operates on LinkAction. It returns the association of
321   --  the action.
322
323   overriding function Context
324    (Self : not null access constant UML_Create_Link_Action_Proxy)
325       return AMF.UML.Classifiers.UML_Classifier_Access;
326   --  Operation Action::context.
327   --
328   --  Missing derivation for Action::/context : Classifier
329
330   overriding function Is_Consistent_With
331    (Self : not null access constant UML_Create_Link_Action_Proxy;
332     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
333       return Boolean;
334   --  Operation RedefinableElement::isConsistentWith.
335   --
336   --  The query isConsistentWith() specifies, for any two RedefinableElements
337   --  in a context in which redefinition is possible, whether redefinition
338   --  would be logically consistent. By default, this is false; this
339   --  operation must be overridden for subclasses of RedefinableElement to
340   --  define the consistency conditions.
341
342   overriding function Is_Redefinition_Context_Valid
343    (Self : not null access constant UML_Create_Link_Action_Proxy;
344     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
345       return Boolean;
346   --  Operation RedefinableElement::isRedefinitionContextValid.
347   --
348   --  The query isRedefinitionContextValid() specifies whether the
349   --  redefinition contexts of this RedefinableElement are properly related
350   --  to the redefinition contexts of the specified RedefinableElement to
351   --  allow this element to redefine the other. By default at least one of
352   --  the redefinition contexts of this element must be a specialization of
353   --  at least one of the redefinition contexts of the specified element.
354
355   overriding function All_Owning_Packages
356    (Self : not null access constant UML_Create_Link_Action_Proxy)
357       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
358   --  Operation NamedElement::allOwningPackages.
359   --
360   --  The query allOwningPackages() returns all the directly or indirectly
361   --  owning packages.
362
363   overriding function Is_Distinguishable_From
364    (Self : not null access constant UML_Create_Link_Action_Proxy;
365     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
366     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
367       return Boolean;
368   --  Operation NamedElement::isDistinguishableFrom.
369   --
370   --  The query isDistinguishableFrom() determines whether two NamedElements
371   --  may logically co-exist within a Namespace. By default, two named
372   --  elements are distinguishable if (a) they have unrelated types or (b)
373   --  they have related types but different names.
374
375   overriding function Namespace
376    (Self : not null access constant UML_Create_Link_Action_Proxy)
377       return AMF.UML.Namespaces.UML_Namespace_Access;
378   --  Operation NamedElement::namespace.
379   --
380   --  Missing derivation for NamedElement::/namespace : Namespace
381
382   overriding procedure Enter_Element
383    (Self    : not null access constant UML_Create_Link_Action_Proxy;
384     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
385     Control : in out AMF.Visitors.Traverse_Control);
386   --  Dispatch call to corresponding subprogram of visitor interface.
387
388   overriding procedure Leave_Element
389    (Self    : not null access constant UML_Create_Link_Action_Proxy;
390     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
391     Control : in out AMF.Visitors.Traverse_Control);
392   --  Dispatch call to corresponding subprogram of visitor interface.
393
394   overriding procedure Visit_Element
395    (Self     : not null access constant UML_Create_Link_Action_Proxy;
396     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
397     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
398     Control  : in out AMF.Visitors.Traverse_Control);
399   --  Dispatch call to corresponding subprogram of iterator interface.
400
401end AMF.Internals.UML_Create_Link_Actions;
402