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;
49with AMF.UML.Activity_Partitions.Collections;
50with AMF.UML.Behaviors;
51with AMF.UML.Classifiers.Collections;
52with AMF.UML.Dependencies.Collections;
53with AMF.UML.Interruptible_Activity_Regions;
54with AMF.UML.Named_Elements;
55with AMF.UML.Namespaces;
56with AMF.UML.Object_Flows;
57with AMF.UML.Packages.Collections;
58with AMF.UML.Redefinable_Elements.Collections;
59with AMF.UML.String_Expressions;
60with AMF.UML.Structured_Activity_Nodes;
61with AMF.UML.Value_Specifications;
62with AMF.Visitors;
63
64package AMF.Internals.UML_Object_Flows is
65
66   type UML_Object_Flow_Proxy is
67     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
68       and AMF.UML.Object_Flows.UML_Object_Flow with null record;
69
70   overriding function Get_Is_Multicast
71    (Self : not null access constant UML_Object_Flow_Proxy)
72       return Boolean;
73   --  Getter of ObjectFlow::isMulticast.
74   --
75   --  Tells whether the objects in the flow are passed by multicasting.
76
77   overriding procedure Set_Is_Multicast
78    (Self : not null access UML_Object_Flow_Proxy;
79     To   : Boolean);
80   --  Setter of ObjectFlow::isMulticast.
81   --
82   --  Tells whether the objects in the flow are passed by multicasting.
83
84   overriding function Get_Is_Multireceive
85    (Self : not null access constant UML_Object_Flow_Proxy)
86       return Boolean;
87   --  Getter of ObjectFlow::isMultireceive.
88   --
89   --  Tells whether the objects in the flow are gathered from respondents to
90   --  multicasting.
91
92   overriding procedure Set_Is_Multireceive
93    (Self : not null access UML_Object_Flow_Proxy;
94     To   : Boolean);
95   --  Setter of ObjectFlow::isMultireceive.
96   --
97   --  Tells whether the objects in the flow are gathered from respondents to
98   --  multicasting.
99
100   overriding function Get_Selection
101    (Self : not null access constant UML_Object_Flow_Proxy)
102       return AMF.UML.Behaviors.UML_Behavior_Access;
103   --  Getter of ObjectFlow::selection.
104   --
105   --  Selects tokens from a source object node.
106
107   overriding procedure Set_Selection
108    (Self : not null access UML_Object_Flow_Proxy;
109     To   : AMF.UML.Behaviors.UML_Behavior_Access);
110   --  Setter of ObjectFlow::selection.
111   --
112   --  Selects tokens from a source object node.
113
114   overriding function Get_Transformation
115    (Self : not null access constant UML_Object_Flow_Proxy)
116       return AMF.UML.Behaviors.UML_Behavior_Access;
117   --  Getter of ObjectFlow::transformation.
118   --
119   --  Changes or replaces data tokens flowing along edge.
120
121   overriding procedure Set_Transformation
122    (Self : not null access UML_Object_Flow_Proxy;
123     To   : AMF.UML.Behaviors.UML_Behavior_Access);
124   --  Setter of ObjectFlow::transformation.
125   --
126   --  Changes or replaces data tokens flowing along edge.
127
128   overriding function Get_Activity
129    (Self : not null access constant UML_Object_Flow_Proxy)
130       return AMF.UML.Activities.UML_Activity_Access;
131   --  Getter of ActivityEdge::activity.
132   --
133   --  Activity containing the edge.
134
135   overriding procedure Set_Activity
136    (Self : not null access UML_Object_Flow_Proxy;
137     To   : AMF.UML.Activities.UML_Activity_Access);
138   --  Setter of ActivityEdge::activity.
139   --
140   --  Activity containing the edge.
141
142   overriding function Get_Guard
143    (Self : not null access constant UML_Object_Flow_Proxy)
144       return AMF.UML.Value_Specifications.UML_Value_Specification_Access;
145   --  Getter of ActivityEdge::guard.
146   --
147   --  Specification evaluated at runtime to determine if the edge can be
148   --  traversed.
149
150   overriding procedure Set_Guard
151    (Self : not null access UML_Object_Flow_Proxy;
152     To   : AMF.UML.Value_Specifications.UML_Value_Specification_Access);
153   --  Setter of ActivityEdge::guard.
154   --
155   --  Specification evaluated at runtime to determine if the edge can be
156   --  traversed.
157
158   overriding function Get_In_Group
159    (Self : not null access constant UML_Object_Flow_Proxy)
160       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
161   --  Getter of ActivityEdge::inGroup.
162   --
163   --  Groups containing the edge.
164
165   overriding function Get_In_Partition
166    (Self : not null access constant UML_Object_Flow_Proxy)
167       return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
168   --  Getter of ActivityEdge::inPartition.
169   --
170   --  Partitions containing the edge.
171
172   overriding function Get_In_Structured_Node
173    (Self : not null access constant UML_Object_Flow_Proxy)
174       return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
175   --  Getter of ActivityEdge::inStructuredNode.
176   --
177   --  Structured activity node containing the edge.
178
179   overriding procedure Set_In_Structured_Node
180    (Self : not null access UML_Object_Flow_Proxy;
181     To   : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
182   --  Setter of ActivityEdge::inStructuredNode.
183   --
184   --  Structured activity node containing the edge.
185
186   overriding function Get_Interrupts
187    (Self : not null access constant UML_Object_Flow_Proxy)
188       return AMF.UML.Interruptible_Activity_Regions.UML_Interruptible_Activity_Region_Access;
189   --  Getter of ActivityEdge::interrupts.
190   --
191   --  Region that the edge can interrupt.
192
193   overriding procedure Set_Interrupts
194    (Self : not null access UML_Object_Flow_Proxy;
195     To   : AMF.UML.Interruptible_Activity_Regions.UML_Interruptible_Activity_Region_Access);
196   --  Setter of ActivityEdge::interrupts.
197   --
198   --  Region that the edge can interrupt.
199
200   overriding function Get_Redefined_Edge
201    (Self : not null access constant UML_Object_Flow_Proxy)
202       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
203   --  Getter of ActivityEdge::redefinedEdge.
204   --
205   --  Inherited edges replaced by this edge in a specialization of the
206   --  activity.
207
208   overriding function Get_Source
209    (Self : not null access constant UML_Object_Flow_Proxy)
210       return AMF.UML.Activity_Nodes.UML_Activity_Node_Access;
211   --  Getter of ActivityEdge::source.
212   --
213   --  Node from which tokens are taken when they traverse the edge.
214
215   overriding procedure Set_Source
216    (Self : not null access UML_Object_Flow_Proxy;
217     To   : AMF.UML.Activity_Nodes.UML_Activity_Node_Access);
218   --  Setter of ActivityEdge::source.
219   --
220   --  Node from which tokens are taken when they traverse the edge.
221
222   overriding function Get_Target
223    (Self : not null access constant UML_Object_Flow_Proxy)
224       return AMF.UML.Activity_Nodes.UML_Activity_Node_Access;
225   --  Getter of ActivityEdge::target.
226   --
227   --  Node to which tokens are put when they traverse the edge.
228
229   overriding procedure Set_Target
230    (Self : not null access UML_Object_Flow_Proxy;
231     To   : AMF.UML.Activity_Nodes.UML_Activity_Node_Access);
232   --  Setter of ActivityEdge::target.
233   --
234   --  Node to which tokens are put when they traverse the edge.
235
236   overriding function Get_Weight
237    (Self : not null access constant UML_Object_Flow_Proxy)
238       return AMF.UML.Value_Specifications.UML_Value_Specification_Access;
239   --  Getter of ActivityEdge::weight.
240   --
241   --  The minimum number of tokens that must traverse the edge at the same
242   --  time.
243
244   overriding procedure Set_Weight
245    (Self : not null access UML_Object_Flow_Proxy;
246     To   : AMF.UML.Value_Specifications.UML_Value_Specification_Access);
247   --  Setter of ActivityEdge::weight.
248   --
249   --  The minimum number of tokens that must traverse the edge at the same
250   --  time.
251
252   overriding function Get_Is_Leaf
253    (Self : not null access constant UML_Object_Flow_Proxy)
254       return Boolean;
255   --  Getter 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 procedure Set_Is_Leaf
268    (Self : not null access UML_Object_Flow_Proxy;
269     To   : Boolean);
270   --  Setter of RedefinableElement::isLeaf.
271   --
272   --  Indicates whether it is possible to further redefine a
273   --  RedefinableElement. If the value is true, then it is not possible to
274   --  further redefine the RedefinableElement. Note that this property is
275   --  preserved through package merge operations; that is, the capability to
276   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
277   --  the resulting RedefinableElement of a package merge operation where a
278   --  RedefinableElement with isLeaf=false is merged with a matching
279   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
280   --  will have isLeaf=false. Default value is false.
281
282   overriding function Get_Redefined_Element
283    (Self : not null access constant UML_Object_Flow_Proxy)
284       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
285   --  Getter of RedefinableElement::redefinedElement.
286   --
287   --  The redefinable element that is being redefined by this element.
288
289   overriding function Get_Redefinition_Context
290    (Self : not null access constant UML_Object_Flow_Proxy)
291       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
292   --  Getter of RedefinableElement::redefinitionContext.
293   --
294   --  References the contexts that this element may be redefined from.
295
296   overriding function Get_Client_Dependency
297    (Self : not null access constant UML_Object_Flow_Proxy)
298       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
299   --  Getter of NamedElement::clientDependency.
300   --
301   --  Indicates the dependencies that reference the client.
302
303   overriding function Get_Name_Expression
304    (Self : not null access constant UML_Object_Flow_Proxy)
305       return AMF.UML.String_Expressions.UML_String_Expression_Access;
306   --  Getter of NamedElement::nameExpression.
307   --
308   --  The string expression used to define the name of this named element.
309
310   overriding procedure Set_Name_Expression
311    (Self : not null access UML_Object_Flow_Proxy;
312     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
313   --  Setter of NamedElement::nameExpression.
314   --
315   --  The string expression used to define the name of this named element.
316
317   overriding function Get_Namespace
318    (Self : not null access constant UML_Object_Flow_Proxy)
319       return AMF.UML.Namespaces.UML_Namespace_Access;
320   --  Getter of NamedElement::namespace.
321   --
322   --  Specifies the namespace that owns the NamedElement.
323
324   overriding function Get_Qualified_Name
325    (Self : not null access constant UML_Object_Flow_Proxy)
326       return AMF.Optional_String;
327   --  Getter of NamedElement::qualifiedName.
328   --
329   --  A name which allows the NamedElement to be identified within a
330   --  hierarchy of nested Namespaces. It is constructed from the names of the
331   --  containing namespaces starting at the root of the hierarchy and ending
332   --  with the name of the NamedElement itself.
333
334   overriding function Is_Consistent_With
335    (Self : not null access constant UML_Object_Flow_Proxy;
336     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
337       return Boolean;
338   --  Operation RedefinableElement::isConsistentWith.
339   --
340   --  The query isConsistentWith() specifies, for any two RedefinableElements
341   --  in a context in which redefinition is possible, whether redefinition
342   --  would be logically consistent. By default, this is false; this
343   --  operation must be overridden for subclasses of RedefinableElement to
344   --  define the consistency conditions.
345
346   overriding function Is_Redefinition_Context_Valid
347    (Self : not null access constant UML_Object_Flow_Proxy;
348     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
349       return Boolean;
350   --  Operation RedefinableElement::isRedefinitionContextValid.
351   --
352   --  The query isRedefinitionContextValid() specifies whether the
353   --  redefinition contexts of this RedefinableElement are properly related
354   --  to the redefinition contexts of the specified RedefinableElement to
355   --  allow this element to redefine the other. By default at least one of
356   --  the redefinition contexts of this element must be a specialization of
357   --  at least one of the redefinition contexts of the specified element.
358
359   overriding function All_Owning_Packages
360    (Self : not null access constant UML_Object_Flow_Proxy)
361       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
362   --  Operation NamedElement::allOwningPackages.
363   --
364   --  The query allOwningPackages() returns all the directly or indirectly
365   --  owning packages.
366
367   overriding function Is_Distinguishable_From
368    (Self : not null access constant UML_Object_Flow_Proxy;
369     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
370     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
371       return Boolean;
372   --  Operation NamedElement::isDistinguishableFrom.
373   --
374   --  The query isDistinguishableFrom() determines whether two NamedElements
375   --  may logically co-exist within a Namespace. By default, two named
376   --  elements are distinguishable if (a) they have unrelated types or (b)
377   --  they have related types but different names.
378
379   overriding function Namespace
380    (Self : not null access constant UML_Object_Flow_Proxy)
381       return AMF.UML.Namespaces.UML_Namespace_Access;
382   --  Operation NamedElement::namespace.
383   --
384   --  Missing derivation for NamedElement::/namespace : Namespace
385
386   overriding procedure Enter_Element
387    (Self    : not null access constant UML_Object_Flow_Proxy;
388     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
389     Control : in out AMF.Visitors.Traverse_Control);
390   --  Dispatch call to corresponding subprogram of visitor interface.
391
392   overriding procedure Leave_Element
393    (Self    : not null access constant UML_Object_Flow_Proxy;
394     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
395     Control : in out AMF.Visitors.Traverse_Control);
396   --  Dispatch call to corresponding subprogram of visitor interface.
397
398   overriding procedure Visit_Element
399    (Self     : not null access constant UML_Object_Flow_Proxy;
400     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
401     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
402     Control  : in out AMF.Visitors.Traverse_Control);
403   --  Dispatch call to corresponding subprogram of iterator interface.
404
405end AMF.Internals.UML_Object_Flows;
406