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.Classifiers.Collections;
51with AMF.UML.Constraints.Collections;
52with AMF.UML.Dependencies.Collections;
53with AMF.UML.Exception_Handlers.Collections;
54with AMF.UML.Input_Pins.Collections;
55with AMF.UML.Interruptible_Activity_Regions.Collections;
56with AMF.UML.Named_Elements;
57with AMF.UML.Namespaces;
58with AMF.UML.Output_Pins.Collections;
59with AMF.UML.Packages.Collections;
60with AMF.UML.Reclassify_Object_Actions;
61with AMF.UML.Redefinable_Elements.Collections;
62with AMF.UML.String_Expressions;
63with AMF.UML.Structured_Activity_Nodes;
64with AMF.Visitors;
65
66package AMF.Internals.UML_Reclassify_Object_Actions is
67
68   type UML_Reclassify_Object_Action_Proxy is
69     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
70       and AMF.UML.Reclassify_Object_Actions.UML_Reclassify_Object_Action with null record;
71
72   overriding function Get_Is_Replace_All
73    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
74       return Boolean;
75   --  Getter of ReclassifyObjectAction::isReplaceAll.
76   --
77   --  Specifies whether existing classifiers should be removed before adding
78   --  the new classifiers.
79
80   overriding procedure Set_Is_Replace_All
81    (Self : not null access UML_Reclassify_Object_Action_Proxy;
82     To   : Boolean);
83   --  Setter of ReclassifyObjectAction::isReplaceAll.
84   --
85   --  Specifies whether existing classifiers should be removed before adding
86   --  the new classifiers.
87
88   overriding function Get_New_Classifier
89    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
90       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
91   --  Getter of ReclassifyObjectAction::newClassifier.
92   --
93   --  A set of classifiers to be added to the classifiers of the object.
94
95   overriding function Get_Object
96    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
97       return AMF.UML.Input_Pins.UML_Input_Pin_Access;
98   --  Getter of ReclassifyObjectAction::object.
99   --
100   --  Holds the object to be reclassified.
101
102   overriding procedure Set_Object
103    (Self : not null access UML_Reclassify_Object_Action_Proxy;
104     To   : AMF.UML.Input_Pins.UML_Input_Pin_Access);
105   --  Setter of ReclassifyObjectAction::object.
106   --
107   --  Holds the object to be reclassified.
108
109   overriding function Get_Old_Classifier
110    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
111       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
112   --  Getter of ReclassifyObjectAction::oldClassifier.
113   --
114   --  A set of classifiers to be removed from the classifiers of the object.
115
116   overriding function Get_Context
117    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
118       return AMF.UML.Classifiers.UML_Classifier_Access;
119   --  Getter of Action::context.
120   --
121   --  The classifier that owns the behavior of which this action is a part.
122
123   overriding function Get_Input
124    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
125       return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin;
126   --  Getter of Action::input.
127   --
128   --  The ordered set of input pins connected to the Action. These are among
129   --  the total set of inputs.
130
131   overriding function Get_Is_Locally_Reentrant
132    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
133       return Boolean;
134   --  Getter of Action::isLocallyReentrant.
135   --
136   --  If true, the action can begin a new, concurrent execution, even if
137   --  there is already another execution of the action ongoing. If false, the
138   --  action cannot begin a new execution until any previous execution has
139   --  completed.
140
141   overriding procedure Set_Is_Locally_Reentrant
142    (Self : not null access UML_Reclassify_Object_Action_Proxy;
143     To   : Boolean);
144   --  Setter of Action::isLocallyReentrant.
145   --
146   --  If true, the action can begin a new, concurrent execution, even if
147   --  there is already another execution of the action ongoing. If false, the
148   --  action cannot begin a new execution until any previous execution has
149   --  completed.
150
151   overriding function Get_Local_Postcondition
152    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
153       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
154   --  Getter of Action::localPostcondition.
155   --
156   --  Constraint that must be satisfied when executed is completed.
157
158   overriding function Get_Local_Precondition
159    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
160       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
161   --  Getter of Action::localPrecondition.
162   --
163   --  Constraint that must be satisfied when execution is started.
164
165   overriding function Get_Output
166    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
167       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin;
168   --  Getter of Action::output.
169   --
170   --  The ordered set of output pins connected to the Action. The action
171   --  places its results onto pins in this set.
172
173   overriding function Get_Handler
174    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
175       return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler;
176   --  Getter of ExecutableNode::handler.
177   --
178   --  A set of exception handlers that are examined if an uncaught exception
179   --  propagates to the outer level of the executable node.
180
181   overriding function Get_Activity
182    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
183       return AMF.UML.Activities.UML_Activity_Access;
184   --  Getter of ActivityNode::activity.
185   --
186   --  Activity containing the node.
187
188   overriding procedure Set_Activity
189    (Self : not null access UML_Reclassify_Object_Action_Proxy;
190     To   : AMF.UML.Activities.UML_Activity_Access);
191   --  Setter of ActivityNode::activity.
192   --
193   --  Activity containing the node.
194
195   overriding function Get_In_Group
196    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
197       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
198   --  Getter of ActivityNode::inGroup.
199   --
200   --  Groups containing the node.
201
202   overriding function Get_In_Interruptible_Region
203    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
204       return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region;
205   --  Getter of ActivityNode::inInterruptibleRegion.
206   --
207   --  Interruptible regions containing the node.
208
209   overriding function Get_In_Partition
210    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
211       return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
212   --  Getter of ActivityNode::inPartition.
213   --
214   --  Partitions containing the node.
215
216   overriding function Get_In_Structured_Node
217    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
218       return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
219   --  Getter of ActivityNode::inStructuredNode.
220   --
221   --  Structured activity node containing the node.
222
223   overriding procedure Set_In_Structured_Node
224    (Self : not null access UML_Reclassify_Object_Action_Proxy;
225     To   : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
226   --  Setter of ActivityNode::inStructuredNode.
227   --
228   --  Structured activity node containing the node.
229
230   overriding function Get_Incoming
231    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
232       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
233   --  Getter of ActivityNode::incoming.
234   --
235   --  Edges that have the node as target.
236
237   overriding function Get_Outgoing
238    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
239       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
240   --  Getter of ActivityNode::outgoing.
241   --
242   --  Edges that have the node as source.
243
244   overriding function Get_Redefined_Node
245    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
246       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node;
247   --  Getter of ActivityNode::redefinedNode.
248   --
249   --  Inherited nodes replaced by this node in a specialization of the
250   --  activity.
251
252   overriding function Get_Is_Leaf
253    (Self : not null access constant UML_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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 Context
335    (Self : not null access constant UML_Reclassify_Object_Action_Proxy)
336       return AMF.UML.Classifiers.UML_Classifier_Access;
337   --  Operation Action::context.
338   --
339   --  Missing derivation for Action::/context : Classifier
340
341   overriding function Is_Consistent_With
342    (Self : not null access constant UML_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_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_Reclassify_Object_Action_Proxy)
388       return AMF.UML.Namespaces.UML_Namespace_Access;
389   --  Operation NamedElement::namespace.
390   --
391   --  Missing derivation for NamedElement::/namespace : Namespace
392
393   overriding procedure Enter_Element
394    (Self    : not null access constant UML_Reclassify_Object_Action_Proxy;
395     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
396     Control : in out AMF.Visitors.Traverse_Control);
397   --  Dispatch call to corresponding subprogram of visitor interface.
398
399   overriding procedure Leave_Element
400    (Self    : not null access constant UML_Reclassify_Object_Action_Proxy;
401     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
402     Control : in out AMF.Visitors.Traverse_Control);
403   --  Dispatch call to corresponding subprogram of visitor interface.
404
405   overriding procedure Visit_Element
406    (Self     : not null access constant UML_Reclassify_Object_Action_Proxy;
407     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
408     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
409     Control  : in out AMF.Visitors.Traverse_Control);
410   --  Dispatch call to corresponding subprogram of iterator interface.
411
412end AMF.Internals.UML_Reclassify_Object_Actions;
413