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.Behaviors;
51with AMF.UML.Classifiers.Collections;
52with AMF.UML.Decision_Nodes;
53with AMF.UML.Dependencies.Collections;
54with AMF.UML.Interruptible_Activity_Regions.Collections;
55with AMF.UML.Named_Elements;
56with AMF.UML.Namespaces;
57with AMF.UML.Object_Flows;
58with AMF.UML.Packages.Collections;
59with AMF.UML.Redefinable_Elements.Collections;
60with AMF.UML.String_Expressions;
61with AMF.UML.Structured_Activity_Nodes;
62with AMF.Visitors;
63
64package AMF.Internals.UML_Decision_Nodes is
65
66   type UML_Decision_Node_Proxy is
67     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
68       and AMF.UML.Decision_Nodes.UML_Decision_Node with null record;
69
70   overriding function Get_Decision_Input
71    (Self : not null access constant UML_Decision_Node_Proxy)
72       return AMF.UML.Behaviors.UML_Behavior_Access;
73   --  Getter of DecisionNode::decisionInput.
74   --
75   --  Provides input to guard specifications on edges outgoing from the
76   --  decision node.
77
78   overriding procedure Set_Decision_Input
79    (Self : not null access UML_Decision_Node_Proxy;
80     To   : AMF.UML.Behaviors.UML_Behavior_Access);
81   --  Setter of DecisionNode::decisionInput.
82   --
83   --  Provides input to guard specifications on edges outgoing from the
84   --  decision node.
85
86   overriding function Get_Decision_Input_Flow
87    (Self : not null access constant UML_Decision_Node_Proxy)
88       return AMF.UML.Object_Flows.UML_Object_Flow_Access;
89   --  Getter of DecisionNode::decisionInputFlow.
90   --
91   --  An additional edge incoming to the decision node that provides a
92   --  decision input value.
93
94   overriding procedure Set_Decision_Input_Flow
95    (Self : not null access UML_Decision_Node_Proxy;
96     To   : AMF.UML.Object_Flows.UML_Object_Flow_Access);
97   --  Setter of DecisionNode::decisionInputFlow.
98   --
99   --  An additional edge incoming to the decision node that provides a
100   --  decision input value.
101
102   overriding function Get_Activity
103    (Self : not null access constant UML_Decision_Node_Proxy)
104       return AMF.UML.Activities.UML_Activity_Access;
105   --  Getter of ActivityNode::activity.
106   --
107   --  Activity containing the node.
108
109   overriding procedure Set_Activity
110    (Self : not null access UML_Decision_Node_Proxy;
111     To   : AMF.UML.Activities.UML_Activity_Access);
112   --  Setter of ActivityNode::activity.
113   --
114   --  Activity containing the node.
115
116   overriding function Get_In_Group
117    (Self : not null access constant UML_Decision_Node_Proxy)
118       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
119   --  Getter of ActivityNode::inGroup.
120   --
121   --  Groups containing the node.
122
123   overriding function Get_In_Interruptible_Region
124    (Self : not null access constant UML_Decision_Node_Proxy)
125       return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region;
126   --  Getter of ActivityNode::inInterruptibleRegion.
127   --
128   --  Interruptible regions containing the node.
129
130   overriding function Get_In_Partition
131    (Self : not null access constant UML_Decision_Node_Proxy)
132       return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
133   --  Getter of ActivityNode::inPartition.
134   --
135   --  Partitions containing the node.
136
137   overriding function Get_In_Structured_Node
138    (Self : not null access constant UML_Decision_Node_Proxy)
139       return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
140   --  Getter of ActivityNode::inStructuredNode.
141   --
142   --  Structured activity node containing the node.
143
144   overriding procedure Set_In_Structured_Node
145    (Self : not null access UML_Decision_Node_Proxy;
146     To   : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
147   --  Setter of ActivityNode::inStructuredNode.
148   --
149   --  Structured activity node containing the node.
150
151   overriding function Get_Incoming
152    (Self : not null access constant UML_Decision_Node_Proxy)
153       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
154   --  Getter of ActivityNode::incoming.
155   --
156   --  Edges that have the node as target.
157
158   overriding function Get_Outgoing
159    (Self : not null access constant UML_Decision_Node_Proxy)
160       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
161   --  Getter of ActivityNode::outgoing.
162   --
163   --  Edges that have the node as source.
164
165   overriding function Get_Redefined_Node
166    (Self : not null access constant UML_Decision_Node_Proxy)
167       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node;
168   --  Getter of ActivityNode::redefinedNode.
169   --
170   --  Inherited nodes replaced by this node in a specialization of the
171   --  activity.
172
173   overriding function Get_Is_Leaf
174    (Self : not null access constant UML_Decision_Node_Proxy)
175       return Boolean;
176   --  Getter of RedefinableElement::isLeaf.
177   --
178   --  Indicates whether it is possible to further redefine a
179   --  RedefinableElement. If the value is true, then it is not possible to
180   --  further redefine the RedefinableElement. Note that this property is
181   --  preserved through package merge operations; that is, the capability to
182   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
183   --  the resulting RedefinableElement of a package merge operation where a
184   --  RedefinableElement with isLeaf=false is merged with a matching
185   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
186   --  will have isLeaf=false. Default value is false.
187
188   overriding procedure Set_Is_Leaf
189    (Self : not null access UML_Decision_Node_Proxy;
190     To   : Boolean);
191   --  Setter of RedefinableElement::isLeaf.
192   --
193   --  Indicates whether it is possible to further redefine a
194   --  RedefinableElement. If the value is true, then it is not possible to
195   --  further redefine the RedefinableElement. Note that this property is
196   --  preserved through package merge operations; that is, the capability to
197   --  redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
198   --  the resulting RedefinableElement of a package merge operation where a
199   --  RedefinableElement with isLeaf=false is merged with a matching
200   --  RedefinableElement with isLeaf=true: the resulting RedefinableElement
201   --  will have isLeaf=false. Default value is false.
202
203   overriding function Get_Redefined_Element
204    (Self : not null access constant UML_Decision_Node_Proxy)
205       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
206   --  Getter of RedefinableElement::redefinedElement.
207   --
208   --  The redefinable element that is being redefined by this element.
209
210   overriding function Get_Redefinition_Context
211    (Self : not null access constant UML_Decision_Node_Proxy)
212       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
213   --  Getter of RedefinableElement::redefinitionContext.
214   --
215   --  References the contexts that this element may be redefined from.
216
217   overriding function Get_Client_Dependency
218    (Self : not null access constant UML_Decision_Node_Proxy)
219       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
220   --  Getter of NamedElement::clientDependency.
221   --
222   --  Indicates the dependencies that reference the client.
223
224   overriding function Get_Name_Expression
225    (Self : not null access constant UML_Decision_Node_Proxy)
226       return AMF.UML.String_Expressions.UML_String_Expression_Access;
227   --  Getter of NamedElement::nameExpression.
228   --
229   --  The string expression used to define the name of this named element.
230
231   overriding procedure Set_Name_Expression
232    (Self : not null access UML_Decision_Node_Proxy;
233     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
234   --  Setter of NamedElement::nameExpression.
235   --
236   --  The string expression used to define the name of this named element.
237
238   overriding function Get_Namespace
239    (Self : not null access constant UML_Decision_Node_Proxy)
240       return AMF.UML.Namespaces.UML_Namespace_Access;
241   --  Getter of NamedElement::namespace.
242   --
243   --  Specifies the namespace that owns the NamedElement.
244
245   overriding function Get_Qualified_Name
246    (Self : not null access constant UML_Decision_Node_Proxy)
247       return AMF.Optional_String;
248   --  Getter of NamedElement::qualifiedName.
249   --
250   --  A name which allows the NamedElement to be identified within a
251   --  hierarchy of nested Namespaces. It is constructed from the names of the
252   --  containing namespaces starting at the root of the hierarchy and ending
253   --  with the name of the NamedElement itself.
254
255   overriding function Is_Consistent_With
256    (Self : not null access constant UML_Decision_Node_Proxy;
257     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
258       return Boolean;
259   --  Operation RedefinableElement::isConsistentWith.
260   --
261   --  The query isConsistentWith() specifies, for any two RedefinableElements
262   --  in a context in which redefinition is possible, whether redefinition
263   --  would be logically consistent. By default, this is false; this
264   --  operation must be overridden for subclasses of RedefinableElement to
265   --  define the consistency conditions.
266
267   overriding function Is_Redefinition_Context_Valid
268    (Self : not null access constant UML_Decision_Node_Proxy;
269     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
270       return Boolean;
271   --  Operation RedefinableElement::isRedefinitionContextValid.
272   --
273   --  The query isRedefinitionContextValid() specifies whether the
274   --  redefinition contexts of this RedefinableElement are properly related
275   --  to the redefinition contexts of the specified RedefinableElement to
276   --  allow this element to redefine the other. By default at least one of
277   --  the redefinition contexts of this element must be a specialization of
278   --  at least one of the redefinition contexts of the specified element.
279
280   overriding function All_Owning_Packages
281    (Self : not null access constant UML_Decision_Node_Proxy)
282       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
283   --  Operation NamedElement::allOwningPackages.
284   --
285   --  The query allOwningPackages() returns all the directly or indirectly
286   --  owning packages.
287
288   overriding function Is_Distinguishable_From
289    (Self : not null access constant UML_Decision_Node_Proxy;
290     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
291     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
292       return Boolean;
293   --  Operation NamedElement::isDistinguishableFrom.
294   --
295   --  The query isDistinguishableFrom() determines whether two NamedElements
296   --  may logically co-exist within a Namespace. By default, two named
297   --  elements are distinguishable if (a) they have unrelated types or (b)
298   --  they have related types but different names.
299
300   overriding function Namespace
301    (Self : not null access constant UML_Decision_Node_Proxy)
302       return AMF.UML.Namespaces.UML_Namespace_Access;
303   --  Operation NamedElement::namespace.
304   --
305   --  Missing derivation for NamedElement::/namespace : Namespace
306
307   overriding procedure Enter_Element
308    (Self    : not null access constant UML_Decision_Node_Proxy;
309     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
310     Control : in out AMF.Visitors.Traverse_Control);
311   --  Dispatch call to corresponding subprogram of visitor interface.
312
313   overriding procedure Leave_Element
314    (Self    : not null access constant UML_Decision_Node_Proxy;
315     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
316     Control : in out AMF.Visitors.Traverse_Control);
317   --  Dispatch call to corresponding subprogram of visitor interface.
318
319   overriding procedure Visit_Element
320    (Self     : not null access constant UML_Decision_Node_Proxy;
321     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
322     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
323     Control  : in out AMF.Visitors.Traverse_Control);
324   --  Dispatch call to corresponding subprogram of iterator interface.
325
326end AMF.Internals.UML_Decision_Nodes;
327