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