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.Elements;
45with AMF.Internals.Element_Collections;
46with AMF.Internals.Helpers;
47with AMF.Internals.Tables.UML_Attributes;
48with AMF.Visitors.UML_Iterators;
49with AMF.Visitors.UML_Visitors;
50with League.Strings.Internals;
51with Matreshka.Internals.Strings;
52
53package body AMF.Internals.UML_Loop_Nodes is
54
55   -------------------
56   -- Enter_Element --
57   -------------------
58
59   overriding procedure Enter_Element
60    (Self    : not null access constant UML_Loop_Node_Proxy;
61     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
62     Control : in out AMF.Visitors.Traverse_Control) is
63   begin
64      if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
65         AMF.Visitors.UML_Visitors.UML_Visitor'Class
66          (Visitor).Enter_Loop_Node
67            (AMF.UML.Loop_Nodes.UML_Loop_Node_Access (Self),
68           Control);
69      end if;
70   end Enter_Element;
71
72   -------------------
73   -- Leave_Element --
74   -------------------
75
76   overriding procedure Leave_Element
77    (Self    : not null access constant UML_Loop_Node_Proxy;
78     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
79     Control : in out AMF.Visitors.Traverse_Control) is
80   begin
81      if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
82         AMF.Visitors.UML_Visitors.UML_Visitor'Class
83          (Visitor).Leave_Loop_Node
84            (AMF.UML.Loop_Nodes.UML_Loop_Node_Access (Self),
85           Control);
86      end if;
87   end Leave_Element;
88
89   -------------------
90   -- Visit_Element --
91   -------------------
92
93   overriding procedure Visit_Element
94    (Self     : not null access constant UML_Loop_Node_Proxy;
95     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
96     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
97     Control  : in out AMF.Visitors.Traverse_Control) is
98   begin
99      if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
100         AMF.Visitors.UML_Iterators.UML_Iterator'Class
101          (Iterator).Visit_Loop_Node
102            (Visitor,
103             AMF.UML.Loop_Nodes.UML_Loop_Node_Access (Self),
104             Control);
105      end if;
106   end Visit_Element;
107
108   ---------------------
109   -- Get_Body_Output --
110   ---------------------
111
112   overriding function Get_Body_Output
113    (Self : not null access constant UML_Loop_Node_Proxy)
114       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin is
115   begin
116      return
117        AMF.UML.Output_Pins.Collections.Wrap
118         (AMF.Internals.Element_Collections.Wrap
119           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Body_Output
120             (Self.Element)));
121   end Get_Body_Output;
122
123   -------------------
124   -- Get_Body_Part --
125   -------------------
126
127   overriding function Get_Body_Part
128    (Self : not null access constant UML_Loop_Node_Proxy)
129       return AMF.UML.Executable_Nodes.Collections.Set_Of_UML_Executable_Node is
130   begin
131      return
132        AMF.UML.Executable_Nodes.Collections.Wrap
133         (AMF.Internals.Element_Collections.Wrap
134           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Body_Part
135             (Self.Element)));
136   end Get_Body_Part;
137
138   -----------------
139   -- Get_Decider --
140   -----------------
141
142   overriding function Get_Decider
143    (Self : not null access constant UML_Loop_Node_Proxy)
144       return AMF.UML.Output_Pins.UML_Output_Pin_Access is
145   begin
146      return
147        AMF.UML.Output_Pins.UML_Output_Pin_Access
148         (AMF.Internals.Helpers.To_Element
149           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Decider
150             (Self.Element)));
151   end Get_Decider;
152
153   -----------------
154   -- Set_Decider --
155   -----------------
156
157   overriding procedure Set_Decider
158    (Self : not null access UML_Loop_Node_Proxy;
159     To   : AMF.UML.Output_Pins.UML_Output_Pin_Access) is
160   begin
161      AMF.Internals.Tables.UML_Attributes.Internal_Set_Decider
162       (Self.Element,
163        AMF.Internals.Helpers.To_Element
164         (AMF.Elements.Element_Access (To)));
165   end Set_Decider;
166
167   -------------------------
168   -- Get_Is_Tested_First --
169   -------------------------
170
171   overriding function Get_Is_Tested_First
172    (Self : not null access constant UML_Loop_Node_Proxy)
173       return Boolean is
174   begin
175      return
176        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Tested_First
177         (Self.Element);
178   end Get_Is_Tested_First;
179
180   -------------------------
181   -- Set_Is_Tested_First --
182   -------------------------
183
184   overriding procedure Set_Is_Tested_First
185    (Self : not null access UML_Loop_Node_Proxy;
186     To   : Boolean) is
187   begin
188      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Tested_First
189       (Self.Element, To);
190   end Set_Is_Tested_First;
191
192   -----------------------
193   -- Get_Loop_Variable --
194   -----------------------
195
196   overriding function Get_Loop_Variable
197    (Self : not null access constant UML_Loop_Node_Proxy)
198       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin is
199   begin
200      return
201        AMF.UML.Output_Pins.Collections.Wrap
202         (AMF.Internals.Element_Collections.Wrap
203           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Loop_Variable
204             (Self.Element)));
205   end Get_Loop_Variable;
206
207   -----------------------------
208   -- Get_Loop_Variable_Input --
209   -----------------------------
210
211   overriding function Get_Loop_Variable_Input
212    (Self : not null access constant UML_Loop_Node_Proxy)
213       return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin is
214   begin
215      return
216        AMF.UML.Input_Pins.Collections.Wrap
217         (AMF.Internals.Element_Collections.Wrap
218           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Loop_Variable_Input
219             (Self.Element)));
220   end Get_Loop_Variable_Input;
221
222   ----------------
223   -- Get_Result --
224   ----------------
225
226   overriding function Get_Result
227    (Self : not null access constant UML_Loop_Node_Proxy)
228       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin is
229   begin
230      return
231        AMF.UML.Output_Pins.Collections.Wrap
232         (AMF.Internals.Element_Collections.Wrap
233           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Result
234             (Self.Element)));
235   end Get_Result;
236
237   --------------------
238   -- Get_Setup_Part --
239   --------------------
240
241   overriding function Get_Setup_Part
242    (Self : not null access constant UML_Loop_Node_Proxy)
243       return AMF.UML.Executable_Nodes.Collections.Set_Of_UML_Executable_Node is
244   begin
245      return
246        AMF.UML.Executable_Nodes.Collections.Wrap
247         (AMF.Internals.Element_Collections.Wrap
248           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Setup_Part
249             (Self.Element)));
250   end Get_Setup_Part;
251
252   --------------
253   -- Get_Test --
254   --------------
255
256   overriding function Get_Test
257    (Self : not null access constant UML_Loop_Node_Proxy)
258       return AMF.UML.Executable_Nodes.Collections.Set_Of_UML_Executable_Node is
259   begin
260      return
261        AMF.UML.Executable_Nodes.Collections.Wrap
262         (AMF.Internals.Element_Collections.Wrap
263           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Test
264             (Self.Element)));
265   end Get_Test;
266
267   ------------------
268   -- Get_Activity --
269   ------------------
270
271   overriding function Get_Activity
272    (Self : not null access constant UML_Loop_Node_Proxy)
273       return AMF.UML.Activities.UML_Activity_Access is
274   begin
275      return
276        AMF.UML.Activities.UML_Activity_Access
277         (AMF.Internals.Helpers.To_Element
278           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Activity
279             (Self.Element)));
280   end Get_Activity;
281
282   ------------------
283   -- Set_Activity --
284   ------------------
285
286   overriding procedure Set_Activity
287    (Self : not null access UML_Loop_Node_Proxy;
288     To   : AMF.UML.Activities.UML_Activity_Access) is
289   begin
290      AMF.Internals.Tables.UML_Attributes.Internal_Set_Activity
291       (Self.Element,
292        AMF.Internals.Helpers.To_Element
293         (AMF.Elements.Element_Access (To)));
294   end Set_Activity;
295
296   --------------
297   -- Get_Edge --
298   --------------
299
300   overriding function Get_Edge
301    (Self : not null access constant UML_Loop_Node_Proxy)
302       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is
303   begin
304      return
305        AMF.UML.Activity_Edges.Collections.Wrap
306         (AMF.Internals.Element_Collections.Wrap
307           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Edge
308             (Self.Element)));
309   end Get_Edge;
310
311   ----------------------
312   -- Get_Must_Isolate --
313   ----------------------
314
315   overriding function Get_Must_Isolate
316    (Self : not null access constant UML_Loop_Node_Proxy)
317       return Boolean is
318   begin
319      return
320        AMF.Internals.Tables.UML_Attributes.Internal_Get_Must_Isolate
321         (Self.Element);
322   end Get_Must_Isolate;
323
324   ----------------------
325   -- Set_Must_Isolate --
326   ----------------------
327
328   overriding procedure Set_Must_Isolate
329    (Self : not null access UML_Loop_Node_Proxy;
330     To   : Boolean) is
331   begin
332      AMF.Internals.Tables.UML_Attributes.Internal_Set_Must_Isolate
333       (Self.Element, To);
334   end Set_Must_Isolate;
335
336   --------------
337   -- Get_Node --
338   --------------
339
340   overriding function Get_Node
341    (Self : not null access constant UML_Loop_Node_Proxy)
342       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node is
343   begin
344      return
345        AMF.UML.Activity_Nodes.Collections.Wrap
346         (AMF.Internals.Element_Collections.Wrap
347           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Node
348             (Self.Element)));
349   end Get_Node;
350
351   -------------------------------
352   -- Get_Structured_Node_Input --
353   -------------------------------
354
355   overriding function Get_Structured_Node_Input
356    (Self : not null access constant UML_Loop_Node_Proxy)
357       return AMF.UML.Input_Pins.Collections.Set_Of_UML_Input_Pin is
358   begin
359      return
360        AMF.UML.Input_Pins.Collections.Wrap
361         (AMF.Internals.Element_Collections.Wrap
362           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Structured_Node_Input
363             (Self.Element)));
364   end Get_Structured_Node_Input;
365
366   --------------------------------
367   -- Get_Structured_Node_Output --
368   --------------------------------
369
370   overriding function Get_Structured_Node_Output
371    (Self : not null access constant UML_Loop_Node_Proxy)
372       return AMF.UML.Output_Pins.Collections.Set_Of_UML_Output_Pin is
373   begin
374      return
375        AMF.UML.Output_Pins.Collections.Wrap
376         (AMF.Internals.Element_Collections.Wrap
377           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Structured_Node_Output
378             (Self.Element)));
379   end Get_Structured_Node_Output;
380
381   ------------------
382   -- Get_Variable --
383   ------------------
384
385   overriding function Get_Variable
386    (Self : not null access constant UML_Loop_Node_Proxy)
387       return AMF.UML.Variables.Collections.Set_Of_UML_Variable is
388   begin
389      return
390        AMF.UML.Variables.Collections.Wrap
391         (AMF.Internals.Element_Collections.Wrap
392           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Variable
393             (Self.Element)));
394   end Get_Variable;
395
396   ------------------------
397   -- Get_Element_Import --
398   ------------------------
399
400   overriding function Get_Element_Import
401    (Self : not null access constant UML_Loop_Node_Proxy)
402       return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is
403   begin
404      return
405        AMF.UML.Element_Imports.Collections.Wrap
406         (AMF.Internals.Element_Collections.Wrap
407           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Element_Import
408             (Self.Element)));
409   end Get_Element_Import;
410
411   -------------------------
412   -- Get_Imported_Member --
413   -------------------------
414
415   overriding function Get_Imported_Member
416    (Self : not null access constant UML_Loop_Node_Proxy)
417       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
418   begin
419      return
420        AMF.UML.Packageable_Elements.Collections.Wrap
421         (AMF.Internals.Element_Collections.Wrap
422           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Imported_Member
423             (Self.Element)));
424   end Get_Imported_Member;
425
426   ----------------
427   -- Get_Member --
428   ----------------
429
430   overriding function Get_Member
431    (Self : not null access constant UML_Loop_Node_Proxy)
432       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
433   begin
434      return
435        AMF.UML.Named_Elements.Collections.Wrap
436         (AMF.Internals.Element_Collections.Wrap
437           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Member
438             (Self.Element)));
439   end Get_Member;
440
441   ----------------------
442   -- Get_Owned_Member --
443   ----------------------
444
445   overriding function Get_Owned_Member
446    (Self : not null access constant UML_Loop_Node_Proxy)
447       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
448   begin
449      return
450        AMF.UML.Named_Elements.Collections.Wrap
451         (AMF.Internals.Element_Collections.Wrap
452           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Member
453             (Self.Element)));
454   end Get_Owned_Member;
455
456   --------------------
457   -- Get_Owned_Rule --
458   --------------------
459
460   overriding function Get_Owned_Rule
461    (Self : not null access constant UML_Loop_Node_Proxy)
462       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
463   begin
464      return
465        AMF.UML.Constraints.Collections.Wrap
466         (AMF.Internals.Element_Collections.Wrap
467           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Rule
468             (Self.Element)));
469   end Get_Owned_Rule;
470
471   ------------------------
472   -- Get_Package_Import --
473   ------------------------
474
475   overriding function Get_Package_Import
476    (Self : not null access constant UML_Loop_Node_Proxy)
477       return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is
478   begin
479      return
480        AMF.UML.Package_Imports.Collections.Wrap
481         (AMF.Internals.Element_Collections.Wrap
482           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package_Import
483             (Self.Element)));
484   end Get_Package_Import;
485
486   ---------------------------
487   -- Get_Client_Dependency --
488   ---------------------------
489
490   overriding function Get_Client_Dependency
491    (Self : not null access constant UML_Loop_Node_Proxy)
492       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
493   begin
494      return
495        AMF.UML.Dependencies.Collections.Wrap
496         (AMF.Internals.Element_Collections.Wrap
497           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
498             (Self.Element)));
499   end Get_Client_Dependency;
500
501   -------------------------
502   -- Get_Name_Expression --
503   -------------------------
504
505   overriding function Get_Name_Expression
506    (Self : not null access constant UML_Loop_Node_Proxy)
507       return AMF.UML.String_Expressions.UML_String_Expression_Access is
508   begin
509      return
510        AMF.UML.String_Expressions.UML_String_Expression_Access
511         (AMF.Internals.Helpers.To_Element
512           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
513             (Self.Element)));
514   end Get_Name_Expression;
515
516   -------------------------
517   -- Set_Name_Expression --
518   -------------------------
519
520   overriding procedure Set_Name_Expression
521    (Self : not null access UML_Loop_Node_Proxy;
522     To   : AMF.UML.String_Expressions.UML_String_Expression_Access) is
523   begin
524      AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
525       (Self.Element,
526        AMF.Internals.Helpers.To_Element
527         (AMF.Elements.Element_Access (To)));
528   end Set_Name_Expression;
529
530   -------------------
531   -- Get_Namespace --
532   -------------------
533
534   overriding function Get_Namespace
535    (Self : not null access constant UML_Loop_Node_Proxy)
536       return AMF.UML.Namespaces.UML_Namespace_Access is
537   begin
538      return
539        AMF.UML.Namespaces.UML_Namespace_Access
540         (AMF.Internals.Helpers.To_Element
541           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
542             (Self.Element)));
543   end Get_Namespace;
544
545   ------------------------
546   -- Get_Qualified_Name --
547   ------------------------
548
549   overriding function Get_Qualified_Name
550    (Self : not null access constant UML_Loop_Node_Proxy)
551       return AMF.Optional_String is
552   begin
553      declare
554         use type Matreshka.Internals.Strings.Shared_String_Access;
555
556         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
557           := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
558
559      begin
560         if Aux = null then
561            return (Is_Empty => True);
562
563         else
564            return (False, League.Strings.Internals.Create (Aux));
565         end if;
566      end;
567   end Get_Qualified_Name;
568
569   ------------------------
570   -- Get_Contained_Edge --
571   ------------------------
572
573   overriding function Get_Contained_Edge
574    (Self : not null access constant UML_Loop_Node_Proxy)
575       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is
576   begin
577      return
578        AMF.UML.Activity_Edges.Collections.Wrap
579         (AMF.Internals.Element_Collections.Wrap
580           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Contained_Edge
581             (Self.Element)));
582   end Get_Contained_Edge;
583
584   ------------------------
585   -- Get_Contained_Node --
586   ------------------------
587
588   overriding function Get_Contained_Node
589    (Self : not null access constant UML_Loop_Node_Proxy)
590       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node is
591   begin
592      return
593        AMF.UML.Activity_Nodes.Collections.Wrap
594         (AMF.Internals.Element_Collections.Wrap
595           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Contained_Node
596             (Self.Element)));
597   end Get_Contained_Node;
598
599   ---------------------
600   -- Get_In_Activity --
601   ---------------------
602
603   overriding function Get_In_Activity
604    (Self : not null access constant UML_Loop_Node_Proxy)
605       return AMF.UML.Activities.UML_Activity_Access is
606   begin
607      return
608        AMF.UML.Activities.UML_Activity_Access
609         (AMF.Internals.Helpers.To_Element
610           (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Activity
611             (Self.Element)));
612   end Get_In_Activity;
613
614   ---------------------
615   -- Set_In_Activity --
616   ---------------------
617
618   overriding procedure Set_In_Activity
619    (Self : not null access UML_Loop_Node_Proxy;
620     To   : AMF.UML.Activities.UML_Activity_Access) is
621   begin
622      AMF.Internals.Tables.UML_Attributes.Internal_Set_In_Activity
623       (Self.Element,
624        AMF.Internals.Helpers.To_Element
625         (AMF.Elements.Element_Access (To)));
626   end Set_In_Activity;
627
628   ------------------
629   -- Get_Subgroup --
630   ------------------
631
632   overriding function Get_Subgroup
633    (Self : not null access constant UML_Loop_Node_Proxy)
634       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group is
635   begin
636      return
637        AMF.UML.Activity_Groups.Collections.Wrap
638         (AMF.Internals.Element_Collections.Wrap
639           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Subgroup
640             (Self.Element)));
641   end Get_Subgroup;
642
643   ---------------------
644   -- Get_Super_Group --
645   ---------------------
646
647   overriding function Get_Super_Group
648    (Self : not null access constant UML_Loop_Node_Proxy)
649       return AMF.UML.Activity_Groups.UML_Activity_Group_Access is
650   begin
651      return
652        AMF.UML.Activity_Groups.UML_Activity_Group_Access
653         (AMF.Internals.Helpers.To_Element
654           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Super_Group
655             (Self.Element)));
656   end Get_Super_Group;
657
658   -----------------
659   -- Get_Context --
660   -----------------
661
662   overriding function Get_Context
663    (Self : not null access constant UML_Loop_Node_Proxy)
664       return AMF.UML.Classifiers.UML_Classifier_Access is
665   begin
666      return
667        AMF.UML.Classifiers.UML_Classifier_Access
668         (AMF.Internals.Helpers.To_Element
669           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Context
670             (Self.Element)));
671   end Get_Context;
672
673   ---------------
674   -- Get_Input --
675   ---------------
676
677   overriding function Get_Input
678    (Self : not null access constant UML_Loop_Node_Proxy)
679       return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin is
680   begin
681      return
682        AMF.UML.Input_Pins.Collections.Wrap
683         (AMF.Internals.Element_Collections.Wrap
684           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Input
685             (Self.Element)));
686   end Get_Input;
687
688   ------------------------------
689   -- Get_Is_Locally_Reentrant --
690   ------------------------------
691
692   overriding function Get_Is_Locally_Reentrant
693    (Self : not null access constant UML_Loop_Node_Proxy)
694       return Boolean is
695   begin
696      return
697        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Locally_Reentrant
698         (Self.Element);
699   end Get_Is_Locally_Reentrant;
700
701   ------------------------------
702   -- Set_Is_Locally_Reentrant --
703   ------------------------------
704
705   overriding procedure Set_Is_Locally_Reentrant
706    (Self : not null access UML_Loop_Node_Proxy;
707     To   : Boolean) is
708   begin
709      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Locally_Reentrant
710       (Self.Element, To);
711   end Set_Is_Locally_Reentrant;
712
713   -----------------------------
714   -- Get_Local_Postcondition --
715   -----------------------------
716
717   overriding function Get_Local_Postcondition
718    (Self : not null access constant UML_Loop_Node_Proxy)
719       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
720   begin
721      return
722        AMF.UML.Constraints.Collections.Wrap
723         (AMF.Internals.Element_Collections.Wrap
724           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Postcondition
725             (Self.Element)));
726   end Get_Local_Postcondition;
727
728   ----------------------------
729   -- Get_Local_Precondition --
730   ----------------------------
731
732   overriding function Get_Local_Precondition
733    (Self : not null access constant UML_Loop_Node_Proxy)
734       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
735   begin
736      return
737        AMF.UML.Constraints.Collections.Wrap
738         (AMF.Internals.Element_Collections.Wrap
739           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Precondition
740             (Self.Element)));
741   end Get_Local_Precondition;
742
743   ----------------
744   -- Get_Output --
745   ----------------
746
747   overriding function Get_Output
748    (Self : not null access constant UML_Loop_Node_Proxy)
749       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin is
750   begin
751      return
752        AMF.UML.Output_Pins.Collections.Wrap
753         (AMF.Internals.Element_Collections.Wrap
754           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Output
755             (Self.Element)));
756   end Get_Output;
757
758   -----------------
759   -- Get_Handler --
760   -----------------
761
762   overriding function Get_Handler
763    (Self : not null access constant UML_Loop_Node_Proxy)
764       return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler is
765   begin
766      return
767        AMF.UML.Exception_Handlers.Collections.Wrap
768         (AMF.Internals.Element_Collections.Wrap
769           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Handler
770             (Self.Element)));
771   end Get_Handler;
772
773   ------------------
774   -- Get_In_Group --
775   ------------------
776
777   overriding function Get_In_Group
778    (Self : not null access constant UML_Loop_Node_Proxy)
779       return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group is
780   begin
781      return
782        AMF.UML.Activity_Groups.Collections.Wrap
783         (AMF.Internals.Element_Collections.Wrap
784           (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Group
785             (Self.Element)));
786   end Get_In_Group;
787
788   ---------------------------------
789   -- Get_In_Interruptible_Region --
790   ---------------------------------
791
792   overriding function Get_In_Interruptible_Region
793    (Self : not null access constant UML_Loop_Node_Proxy)
794       return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region is
795   begin
796      return
797        AMF.UML.Interruptible_Activity_Regions.Collections.Wrap
798         (AMF.Internals.Element_Collections.Wrap
799           (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Interruptible_Region
800             (Self.Element)));
801   end Get_In_Interruptible_Region;
802
803   ----------------------
804   -- Get_In_Partition --
805   ----------------------
806
807   overriding function Get_In_Partition
808    (Self : not null access constant UML_Loop_Node_Proxy)
809       return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition is
810   begin
811      return
812        AMF.UML.Activity_Partitions.Collections.Wrap
813         (AMF.Internals.Element_Collections.Wrap
814           (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Partition
815             (Self.Element)));
816   end Get_In_Partition;
817
818   ----------------------------
819   -- Get_In_Structured_Node --
820   ----------------------------
821
822   overriding function Get_In_Structured_Node
823    (Self : not null access constant UML_Loop_Node_Proxy)
824       return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access is
825   begin
826      return
827        AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access
828         (AMF.Internals.Helpers.To_Element
829           (AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Structured_Node
830             (Self.Element)));
831   end Get_In_Structured_Node;
832
833   ----------------------------
834   -- Set_In_Structured_Node --
835   ----------------------------
836
837   overriding procedure Set_In_Structured_Node
838    (Self : not null access UML_Loop_Node_Proxy;
839     To   : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access) is
840   begin
841      AMF.Internals.Tables.UML_Attributes.Internal_Set_In_Structured_Node
842       (Self.Element,
843        AMF.Internals.Helpers.To_Element
844         (AMF.Elements.Element_Access (To)));
845   end Set_In_Structured_Node;
846
847   ------------------
848   -- Get_Incoming --
849   ------------------
850
851   overriding function Get_Incoming
852    (Self : not null access constant UML_Loop_Node_Proxy)
853       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is
854   begin
855      return
856        AMF.UML.Activity_Edges.Collections.Wrap
857         (AMF.Internals.Element_Collections.Wrap
858           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Incoming
859             (Self.Element)));
860   end Get_Incoming;
861
862   ------------------
863   -- Get_Outgoing --
864   ------------------
865
866   overriding function Get_Outgoing
867    (Self : not null access constant UML_Loop_Node_Proxy)
868       return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is
869   begin
870      return
871        AMF.UML.Activity_Edges.Collections.Wrap
872         (AMF.Internals.Element_Collections.Wrap
873           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Outgoing
874             (Self.Element)));
875   end Get_Outgoing;
876
877   ------------------------
878   -- Get_Redefined_Node --
879   ------------------------
880
881   overriding function Get_Redefined_Node
882    (Self : not null access constant UML_Loop_Node_Proxy)
883       return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node is
884   begin
885      return
886        AMF.UML.Activity_Nodes.Collections.Wrap
887         (AMF.Internals.Element_Collections.Wrap
888           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Node
889             (Self.Element)));
890   end Get_Redefined_Node;
891
892   -----------------
893   -- Get_Is_Leaf --
894   -----------------
895
896   overriding function Get_Is_Leaf
897    (Self : not null access constant UML_Loop_Node_Proxy)
898       return Boolean is
899   begin
900      return
901        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf
902         (Self.Element);
903   end Get_Is_Leaf;
904
905   -----------------
906   -- Set_Is_Leaf --
907   -----------------
908
909   overriding procedure Set_Is_Leaf
910    (Self : not null access UML_Loop_Node_Proxy;
911     To   : Boolean) is
912   begin
913      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf
914       (Self.Element, To);
915   end Set_Is_Leaf;
916
917   ---------------------------
918   -- Get_Redefined_Element --
919   ---------------------------
920
921   overriding function Get_Redefined_Element
922    (Self : not null access constant UML_Loop_Node_Proxy)
923       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is
924   begin
925      return
926        AMF.UML.Redefinable_Elements.Collections.Wrap
927         (AMF.Internals.Element_Collections.Wrap
928           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element
929             (Self.Element)));
930   end Get_Redefined_Element;
931
932   ------------------------------
933   -- Get_Redefinition_Context --
934   ------------------------------
935
936   overriding function Get_Redefinition_Context
937    (Self : not null access constant UML_Loop_Node_Proxy)
938       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
939   begin
940      return
941        AMF.UML.Classifiers.Collections.Wrap
942         (AMF.Internals.Element_Collections.Wrap
943           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context
944             (Self.Element)));
945   end Get_Redefinition_Context;
946
947   ------------------------
948   -- Exclude_Collisions --
949   ------------------------
950
951   overriding function Exclude_Collisions
952    (Self : not null access constant UML_Loop_Node_Proxy;
953     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
954       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
955   begin
956      --  Generated stub: replace with real body!
957      pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented");
958      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Exclude_Collisions";
959      return Exclude_Collisions (Self, Imps);
960   end Exclude_Collisions;
961
962   -------------------------
963   -- Get_Names_Of_Member --
964   -------------------------
965
966   overriding function Get_Names_Of_Member
967    (Self : not null access constant UML_Loop_Node_Proxy;
968     Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
969       return AMF.String_Collections.Set_Of_String is
970   begin
971      --  Generated stub: replace with real body!
972      pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented");
973      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Get_Names_Of_Member";
974      return Get_Names_Of_Member (Self, Element);
975   end Get_Names_Of_Member;
976
977   --------------------
978   -- Import_Members --
979   --------------------
980
981   overriding function Import_Members
982    (Self : not null access constant UML_Loop_Node_Proxy;
983     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
984       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
985   begin
986      --  Generated stub: replace with real body!
987      pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented");
988      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Import_Members";
989      return Import_Members (Self, Imps);
990   end Import_Members;
991
992   ---------------------
993   -- Imported_Member --
994   ---------------------
995
996   overriding function Imported_Member
997    (Self : not null access constant UML_Loop_Node_Proxy)
998       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
999   begin
1000      --  Generated stub: replace with real body!
1001      pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented");
1002      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Imported_Member";
1003      return Imported_Member (Self);
1004   end Imported_Member;
1005
1006   ---------------------------------
1007   -- Members_Are_Distinguishable --
1008   ---------------------------------
1009
1010   overriding function Members_Are_Distinguishable
1011    (Self : not null access constant UML_Loop_Node_Proxy)
1012       return Boolean is
1013   begin
1014      --  Generated stub: replace with real body!
1015      pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented");
1016      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Members_Are_Distinguishable";
1017      return Members_Are_Distinguishable (Self);
1018   end Members_Are_Distinguishable;
1019
1020   ------------------
1021   -- Owned_Member --
1022   ------------------
1023
1024   overriding function Owned_Member
1025    (Self : not null access constant UML_Loop_Node_Proxy)
1026       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
1027   begin
1028      --  Generated stub: replace with real body!
1029      pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented");
1030      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Owned_Member";
1031      return Owned_Member (Self);
1032   end Owned_Member;
1033
1034   -------------------------
1035   -- All_Owning_Packages --
1036   -------------------------
1037
1038   overriding function All_Owning_Packages
1039    (Self : not null access constant UML_Loop_Node_Proxy)
1040       return AMF.UML.Packages.Collections.Set_Of_UML_Package is
1041   begin
1042      --  Generated stub: replace with real body!
1043      pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
1044      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.All_Owning_Packages";
1045      return All_Owning_Packages (Self);
1046   end All_Owning_Packages;
1047
1048   -----------------------------
1049   -- Is_Distinguishable_From --
1050   -----------------------------
1051
1052   overriding function Is_Distinguishable_From
1053    (Self : not null access constant UML_Loop_Node_Proxy;
1054     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
1055     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
1056       return Boolean is
1057   begin
1058      --  Generated stub: replace with real body!
1059      pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
1060      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Is_Distinguishable_From";
1061      return Is_Distinguishable_From (Self, N, Ns);
1062   end Is_Distinguishable_From;
1063
1064   ---------------
1065   -- Namespace --
1066   ---------------
1067
1068   overriding function Namespace
1069    (Self : not null access constant UML_Loop_Node_Proxy)
1070       return AMF.UML.Namespaces.UML_Namespace_Access is
1071   begin
1072      --  Generated stub: replace with real body!
1073      pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
1074      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Namespace";
1075      return Namespace (Self);
1076   end Namespace;
1077
1078   -------------
1079   -- Context --
1080   -------------
1081
1082   overriding function Context
1083    (Self : not null access constant UML_Loop_Node_Proxy)
1084       return AMF.UML.Classifiers.UML_Classifier_Access is
1085   begin
1086      --  Generated stub: replace with real body!
1087      pragma Compile_Time_Warning (Standard.True, "Context unimplemented");
1088      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Context";
1089      return Context (Self);
1090   end Context;
1091
1092   ------------------------
1093   -- Is_Consistent_With --
1094   ------------------------
1095
1096   overriding function Is_Consistent_With
1097    (Self : not null access constant UML_Loop_Node_Proxy;
1098     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
1099       return Boolean is
1100   begin
1101      --  Generated stub: replace with real body!
1102      pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented");
1103      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Is_Consistent_With";
1104      return Is_Consistent_With (Self, Redefinee);
1105   end Is_Consistent_With;
1106
1107   -----------------------------------
1108   -- Is_Redefinition_Context_Valid --
1109   -----------------------------------
1110
1111   overriding function Is_Redefinition_Context_Valid
1112    (Self : not null access constant UML_Loop_Node_Proxy;
1113     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
1114       return Boolean is
1115   begin
1116      --  Generated stub: replace with real body!
1117      pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
1118      raise Program_Error with "Unimplemented procedure UML_Loop_Node_Proxy.Is_Redefinition_Context_Valid";
1119      return Is_Redefinition_Context_Valid (Self, Redefined);
1120   end Is_Redefinition_Context_Valid;
1121
1122end AMF.Internals.UML_Loop_Nodes;
1123