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