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: 2967 $ $Date: 2012-05-12 10:21:56 +0400 (Sat, 12 May 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Input_Pins;
45with AMF.UML.Action_Input_Pins;
46with AMF.UML.Actions;
47with AMF.UML.Activities;
48with AMF.UML.Activity_Edges.Collections;
49with AMF.UML.Activity_Groups.Collections;
50with AMF.UML.Activity_Nodes.Collections;
51with AMF.UML.Activity_Partitions.Collections;
52with AMF.UML.Behaviors;
53with AMF.UML.Classifiers.Collections;
54with AMF.UML.Dependencies.Collections;
55with AMF.UML.Interruptible_Activity_Regions.Collections;
56with AMF.UML.Multiplicity_Elements;
57with AMF.UML.Named_Elements;
58with AMF.UML.Namespaces;
59with AMF.UML.Packages.Collections;
60with AMF.UML.Redefinable_Elements.Collections;
61with AMF.UML.States.Collections;
62with AMF.UML.String_Expressions;
63with AMF.UML.Structured_Activity_Nodes;
64with AMF.UML.Types;
65with AMF.UML.Value_Specifications;
66with AMF.Visitors;
67
68package AMF.Internals.UML_Action_Input_Pins is
69
70   type UML_Action_Input_Pin_Proxy is
71     limited new AMF.Internals.UML_Input_Pins.UML_Input_Pin_Proxy
72       and AMF.UML.Action_Input_Pins.UML_Action_Input_Pin with null record;
73
74   overriding function Get_From_Action
75    (Self : not null access constant UML_Action_Input_Pin_Proxy)
76       return AMF.UML.Actions.UML_Action_Access;
77   --  Getter of ActionInputPin::fromAction.
78   --
79   --  The action used to provide values.
80
81   overriding procedure Set_From_Action
82    (Self : not null access UML_Action_Input_Pin_Proxy;
83     To   : AMF.UML.Actions.UML_Action_Access);
84   --  Setter of ActionInputPin::fromAction.
85   --
86   --  The action used to provide values.
87
88   overriding function Get_Is_Control
89    (Self : not null access constant UML_Action_Input_Pin_Proxy)
90       return Boolean;
91   --  Getter of Pin::isControl.
92   --
93   --  Tells whether the pins provide data to the actions, or just controls
94   --  when it executes it.
95
96   overriding procedure Set_Is_Control
97    (Self : not null access UML_Action_Input_Pin_Proxy;
98     To   : Boolean);
99   --  Setter of Pin::isControl.
100   --
101   --  Tells whether the pins provide data to the actions, or just controls
102   --  when it executes it.
103
104   overriding function Get_In_State
105    (Self : not null access constant UML_Action_Input_Pin_Proxy)
106       return AMF.UML.States.Collections.Set_Of_UML_State;
107   --  Getter of ObjectNode::inState.
108   --
109   --  The required states of the object available at this point in the
110   --  activity.
111
112   overriding function Get_Is_Control_Type
113    (Self : not null access constant UML_Action_Input_Pin_Proxy)
114       return Boolean;
115   --  Getter of ObjectNode::isControlType.
116   --
117   --  Tells whether the type of the object node is to be treated as control.
118
119   overriding procedure Set_Is_Control_Type
120    (Self : not null access UML_Action_Input_Pin_Proxy;
121     To   : Boolean);
122   --  Setter of ObjectNode::isControlType.
123   --
124   --  Tells whether the type of the object node is to be treated as control.
125
126   overriding function Get_Ordering
127    (Self : not null access constant UML_Action_Input_Pin_Proxy)
128       return AMF.UML.UML_Object_Node_Ordering_Kind;
129   --  Getter of ObjectNode::ordering.
130   --
131   --  Tells whether and how the tokens in the object node are ordered for
132   --  selection to traverse edges outgoing from the object node.
133
134   overriding procedure Set_Ordering
135    (Self : not null access UML_Action_Input_Pin_Proxy;
136     To   : AMF.UML.UML_Object_Node_Ordering_Kind);
137   --  Setter of ObjectNode::ordering.
138   --
139   --  Tells whether and how the tokens in the object node are ordered for
140   --  selection to traverse edges outgoing from the object node.
141
142   overriding function Get_Selection
143    (Self : not null access constant UML_Action_Input_Pin_Proxy)
144       return AMF.UML.Behaviors.UML_Behavior_Access;
145   --  Getter of ObjectNode::selection.
146   --
147   --  Selects tokens for outgoing edges.
148
149   overriding procedure Set_Selection
150    (Self : not null access UML_Action_Input_Pin_Proxy;
151     To   : AMF.UML.Behaviors.UML_Behavior_Access);
152   --  Setter of ObjectNode::selection.
153   --
154   --  Selects tokens for outgoing edges.
155
156   overriding function Get_Upper_Bound
157    (Self : not null access constant UML_Action_Input_Pin_Proxy)
158       return AMF.UML.Value_Specifications.UML_Value_Specification_Access;
159   --  Getter of ObjectNode::upperBound.
160   --
161   --  The maximum number of tokens allowed in the node. Objects cannot flow
162   --  into the node if the upper bound is reached.
163
164   overriding procedure Set_Upper_Bound
165    (Self : not null access UML_Action_Input_Pin_Proxy;
166     To   : AMF.UML.Value_Specifications.UML_Value_Specification_Access);
167   --  Setter of ObjectNode::upperBound.
168   --
169   --  The maximum number of tokens allowed in the node. Objects cannot flow
170   --  into the node if the upper bound is reached.
171
172   overriding function Get_Activity
173    (Self : not null access constant UML_Action_Input_Pin_Proxy)
174       return AMF.UML.Activities.UML_Activity_Access;
175   --  Getter of ActivityNode::activity.
176   --
177   --  Activity containing the node.
178
179   overriding procedure Set_Activity
180    (Self : not null access UML_Action_Input_Pin_Proxy;
181     To   : AMF.UML.Activities.UML_Activity_Access);
182   --  Setter of ActivityNode::activity.
183   --
184   --  Activity containing the node.
185
186   overriding function Get_In_Group
187    (Self : not null access constant UML_Action_Input_Pin_Proxy)
188       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
189   --  Getter of ActivityNode::inGroup.
190   --
191   --  Groups containing the node.
192
193   overriding function Get_In_Interruptible_Region
194    (Self : not null access constant UML_Action_Input_Pin_Proxy)
195       return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region;
196   --  Getter of ActivityNode::inInterruptibleRegion.
197   --
198   --  Interruptible regions containing the node.
199
200   overriding function Get_In_Partition
201    (Self : not null access constant UML_Action_Input_Pin_Proxy)
202       return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
203   --  Getter of ActivityNode::inPartition.
204   --
205   --  Partitions containing the node.
206
207   overriding function Get_In_Structured_Node
208    (Self : not null access constant UML_Action_Input_Pin_Proxy)
209       return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
210   --  Getter of ActivityNode::inStructuredNode.
211   --
212   --  Structured activity node containing the node.
213
214   overriding procedure Set_In_Structured_Node
215    (Self : not null access UML_Action_Input_Pin_Proxy;
216     To   : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
217   --  Setter of ActivityNode::inStructuredNode.
218   --
219   --  Structured activity node containing the node.
220
221   overriding function Get_Incoming
222    (Self : not null access constant UML_Action_Input_Pin_Proxy)
223       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
224   --  Getter of ActivityNode::incoming.
225   --
226   --  Edges that have the node as target.
227
228   overriding function Get_Outgoing
229    (Self : not null access constant UML_Action_Input_Pin_Proxy)
230       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
231   --  Getter of ActivityNode::outgoing.
232   --
233   --  Edges that have the node as source.
234
235   overriding function Get_Redefined_Node
236    (Self : not null access constant UML_Action_Input_Pin_Proxy)
237       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node;
238   --  Getter of ActivityNode::redefinedNode.
239   --
240   --  Inherited nodes replaced by this node in a specialization of the
241   --  activity.
242
243   overriding function Get_Is_Leaf
244    (Self : not null access constant UML_Action_Input_Pin_Proxy)
245       return Boolean;
246   --  Getter of RedefinableElement::isLeaf.
247   --
248   --  Indicates whether it is possible to further redefine a
249   --  RedefinableElement. If the value is true, then it is not possible to
250   --  further redefine the RedefinableElement. Note that this property is
251   --  preserved through package merge operations; that is, the capability to
252   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
253   --  the resulting RedefinableElement of a package merge operation where a
254   --  RedefinableElement with isLeaf=false is merged with a matching
255   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
256   --  will have isLeaf=false. Default value is false.
257
258   overriding procedure Set_Is_Leaf
259    (Self : not null access UML_Action_Input_Pin_Proxy;
260     To   : Boolean);
261   --  Setter of RedefinableElement::isLeaf.
262   --
263   --  Indicates whether it is possible to further redefine a
264   --  RedefinableElement. If the value is true, then it is not possible to
265   --  further redefine the RedefinableElement. Note that this property is
266   --  preserved through package merge operations; that is, the capability to
267   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
268   --  the resulting RedefinableElement of a package merge operation where a
269   --  RedefinableElement with isLeaf=false is merged with a matching
270   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
271   --  will have isLeaf=false. Default value is false.
272
273   overriding function Get_Redefined_Element
274    (Self : not null access constant UML_Action_Input_Pin_Proxy)
275       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
276   --  Getter of RedefinableElement::redefinedElement.
277   --
278   --  The redefinable element that is being redefined by this element.
279
280   overriding function Get_Redefinition_Context
281    (Self : not null access constant UML_Action_Input_Pin_Proxy)
282       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
283   --  Getter of RedefinableElement::redefinitionContext.
284   --
285   --  References the contexts that this element may be redefined from.
286
287   overriding function Get_Client_Dependency
288    (Self : not null access constant UML_Action_Input_Pin_Proxy)
289       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
290   --  Getter of NamedElement::clientDependency.
291   --
292   --  Indicates the dependencies that reference the client.
293
294   overriding function Get_Name_Expression
295    (Self : not null access constant UML_Action_Input_Pin_Proxy)
296       return AMF.UML.String_Expressions.UML_String_Expression_Access;
297   --  Getter of NamedElement::nameExpression.
298   --
299   --  The string expression used to define the name of this named element.
300
301   overriding procedure Set_Name_Expression
302    (Self : not null access UML_Action_Input_Pin_Proxy;
303     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
304   --  Setter of NamedElement::nameExpression.
305   --
306   --  The string expression used to define the name of this named element.
307
308   overriding function Get_Namespace
309    (Self : not null access constant UML_Action_Input_Pin_Proxy)
310       return AMF.UML.Namespaces.UML_Namespace_Access;
311   --  Getter of NamedElement::namespace.
312   --
313   --  Specifies the namespace that owns the NamedElement.
314
315   overriding function Get_Qualified_Name
316    (Self : not null access constant UML_Action_Input_Pin_Proxy)
317       return AMF.Optional_String;
318   --  Getter of NamedElement::qualifiedName.
319   --
320   --  A name which allows the NamedElement to be identified within a
321   --  hierarchy of nested Namespaces. It is constructed from the names of the
322   --  containing namespaces starting at the root of the hierarchy and ending
323   --  with the name of the NamedElement itself.
324
325   overriding function Get_Type
326    (Self : not null access constant UML_Action_Input_Pin_Proxy)
327       return AMF.UML.Types.UML_Type_Access;
328   --  Getter of TypedElement::type.
329   --
330   --  The type of the TypedElement.
331   --  This information is derived from the return result for this Operation.
332
333   overriding procedure Set_Type
334    (Self : not null access UML_Action_Input_Pin_Proxy;
335     To   : AMF.UML.Types.UML_Type_Access);
336   --  Setter of TypedElement::type.
337   --
338   --  The type of the TypedElement.
339   --  This information is derived from the return result for this Operation.
340
341   overriding function Is_Consistent_With
342    (Self : not null access constant UML_Action_Input_Pin_Proxy;
343     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
344       return Boolean;
345   --  Operation RedefinableElement::isConsistentWith.
346   --
347   --  The query isConsistentWith() specifies, for any two RedefinableElements
348   --  in a context in which redefinition is possible, whether redefinition
349   --  would be logically consistent. By default, this is false; this
350   --  operation must be overridden for subclasses of RedefinableElement to
351   --  define the consistency conditions.
352
353   overriding function Is_Redefinition_Context_Valid
354    (Self : not null access constant UML_Action_Input_Pin_Proxy;
355     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
356       return Boolean;
357   --  Operation RedefinableElement::isRedefinitionContextValid.
358   --
359   --  The query isRedefinitionContextValid() specifies whether the
360   --  redefinition contexts of this RedefinableElement are properly related
361   --  to the redefinition contexts of the specified RedefinableElement to
362   --  allow this element to redefine the other. By default at least one of
363   --  the redefinition contexts of this element must be a specialization of
364   --  at least one of the redefinition contexts of the specified element.
365
366   overriding function All_Owning_Packages
367    (Self : not null access constant UML_Action_Input_Pin_Proxy)
368       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
369   --  Operation NamedElement::allOwningPackages.
370   --
371   --  The query allOwningPackages() returns all the directly or indirectly
372   --  owning packages.
373
374   overriding function Is_Distinguishable_From
375    (Self : not null access constant UML_Action_Input_Pin_Proxy;
376     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
377     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
378       return Boolean;
379   --  Operation NamedElement::isDistinguishableFrom.
380   --
381   --  The query isDistinguishableFrom() determines whether two NamedElements
382   --  may logically co-exist within a Namespace. By default, two named
383   --  elements are distinguishable if (a) they have unrelated types or (b)
384   --  they have related types but different names.
385
386   overriding function Namespace
387    (Self : not null access constant UML_Action_Input_Pin_Proxy)
388       return AMF.UML.Namespaces.UML_Namespace_Access;
389   --  Operation NamedElement::namespace.
390   --
391   --  Missing derivation for NamedElement::/namespace : Namespace
392
393   overriding function Compatible_With
394    (Self : not null access constant UML_Action_Input_Pin_Proxy;
395     Other : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access)
396       return Boolean;
397   --  Operation MultiplicityElement::compatibleWith.
398   --
399   --  The operation compatibleWith takes another multiplicity as input. It
400   --  checks if one multiplicity is compatible with another.
401
402   overriding function Includes_Cardinality
403    (Self : not null access constant UML_Action_Input_Pin_Proxy;
404     C : Integer)
405       return Boolean;
406   --  Operation MultiplicityElement::includesCardinality.
407   --
408   --  The query includesCardinality() checks whether the specified
409   --  cardinality is valid for this multiplicity.
410
411   overriding function Includes_Multiplicity
412    (Self : not null access constant UML_Action_Input_Pin_Proxy;
413     M : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access)
414       return Boolean;
415   --  Operation MultiplicityElement::includesMultiplicity.
416   --
417   --  The query includesMultiplicity() checks whether this multiplicity
418   --  includes all the cardinalities allowed by the specified multiplicity.
419
420   overriding function Iss
421    (Self : not null access constant UML_Action_Input_Pin_Proxy;
422     Lowerbound : Integer;
423     Upperbound : Integer)
424       return Boolean;
425   --  Operation MultiplicityElement::is.
426   --
427   --  The operation is determines if the upper and lower bound of the ranges
428   --  are the ones given.
429
430   overriding procedure Enter_Element
431    (Self    : not null access constant UML_Action_Input_Pin_Proxy;
432     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
433     Control : in out AMF.Visitors.Traverse_Control);
434   --  Dispatch call to corresponding subprogram of visitor interface.
435
436   overriding procedure Leave_Element
437    (Self    : not null access constant UML_Action_Input_Pin_Proxy;
438     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
439     Control : in out AMF.Visitors.Traverse_Control);
440   --  Dispatch call to corresponding subprogram of visitor interface.
441
442   overriding procedure Visit_Element
443    (Self     : not null access constant UML_Action_Input_Pin_Proxy;
444     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
445     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
446     Control  : in out AMF.Visitors.Traverse_Control);
447   --  Dispatch call to corresponding subprogram of iterator interface.
448
449end AMF.Internals.UML_Action_Input_Pins;
450