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