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