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_States is
54
55   -------------------
56   -- Enter_Element --
57   -------------------
58
59   overriding procedure Enter_Element
60    (Self    : not null access constant UML_State_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_State
67            (AMF.UML.States.UML_State_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_State_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_State
84            (AMF.UML.States.UML_State_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_State_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_State
102            (Visitor,
103             AMF.UML.States.UML_State_Access (Self),
104             Control);
105      end if;
106   end Visit_Element;
107
108   --------------------
109   -- Get_Connection --
110   --------------------
111
112   overriding function Get_Connection
113    (Self : not null access constant UML_State_Proxy)
114       return AMF.UML.Connection_Point_References.Collections.Set_Of_UML_Connection_Point_Reference is
115   begin
116      return
117        AMF.UML.Connection_Point_References.Collections.Wrap
118         (AMF.Internals.Element_Collections.Wrap
119           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Connection
120             (Self.Element)));
121   end Get_Connection;
122
123   --------------------------
124   -- Get_Connection_Point --
125   --------------------------
126
127   overriding function Get_Connection_Point
128    (Self : not null access constant UML_State_Proxy)
129       return AMF.UML.Pseudostates.Collections.Set_Of_UML_Pseudostate is
130   begin
131      return
132        AMF.UML.Pseudostates.Collections.Wrap
133         (AMF.Internals.Element_Collections.Wrap
134           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Connection_Point
135             (Self.Element)));
136   end Get_Connection_Point;
137
138   ----------------------------
139   -- Get_Deferrable_Trigger --
140   ----------------------------
141
142   overriding function Get_Deferrable_Trigger
143    (Self : not null access constant UML_State_Proxy)
144       return AMF.UML.Triggers.Collections.Set_Of_UML_Trigger is
145   begin
146      return
147        AMF.UML.Triggers.Collections.Wrap
148         (AMF.Internals.Element_Collections.Wrap
149           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Deferrable_Trigger
150             (Self.Element)));
151   end Get_Deferrable_Trigger;
152
153   ---------------------
154   -- Get_Do_Activity --
155   ---------------------
156
157   overriding function Get_Do_Activity
158    (Self : not null access constant UML_State_Proxy)
159       return AMF.UML.Behaviors.UML_Behavior_Access is
160   begin
161      return
162        AMF.UML.Behaviors.UML_Behavior_Access
163         (AMF.Internals.Helpers.To_Element
164           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Do_Activity
165             (Self.Element)));
166   end Get_Do_Activity;
167
168   ---------------------
169   -- Set_Do_Activity --
170   ---------------------
171
172   overriding procedure Set_Do_Activity
173    (Self : not null access UML_State_Proxy;
174     To   : AMF.UML.Behaviors.UML_Behavior_Access) is
175   begin
176      AMF.Internals.Tables.UML_Attributes.Internal_Set_Do_Activity
177       (Self.Element,
178        AMF.Internals.Helpers.To_Element
179         (AMF.Elements.Element_Access (To)));
180   end Set_Do_Activity;
181
182   ---------------
183   -- Get_Entry --
184   ---------------
185
186   overriding function Get_Entry
187    (Self : not null access constant UML_State_Proxy)
188       return AMF.UML.Behaviors.UML_Behavior_Access is
189   begin
190      return
191        AMF.UML.Behaviors.UML_Behavior_Access
192         (AMF.Internals.Helpers.To_Element
193           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Entry
194             (Self.Element)));
195   end Get_Entry;
196
197   ---------------
198   -- Set_Entry --
199   ---------------
200
201   overriding procedure Set_Entry
202    (Self : not null access UML_State_Proxy;
203     To   : AMF.UML.Behaviors.UML_Behavior_Access) is
204   begin
205      AMF.Internals.Tables.UML_Attributes.Internal_Set_Entry
206       (Self.Element,
207        AMF.Internals.Helpers.To_Element
208         (AMF.Elements.Element_Access (To)));
209   end Set_Entry;
210
211   --------------
212   -- Get_Exit --
213   --------------
214
215   overriding function Get_Exit
216    (Self : not null access constant UML_State_Proxy)
217       return AMF.UML.Behaviors.UML_Behavior_Access is
218   begin
219      return
220        AMF.UML.Behaviors.UML_Behavior_Access
221         (AMF.Internals.Helpers.To_Element
222           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Exit
223             (Self.Element)));
224   end Get_Exit;
225
226   --------------
227   -- Set_Exit --
228   --------------
229
230   overriding procedure Set_Exit
231    (Self : not null access UML_State_Proxy;
232     To   : AMF.UML.Behaviors.UML_Behavior_Access) is
233   begin
234      AMF.Internals.Tables.UML_Attributes.Internal_Set_Exit
235       (Self.Element,
236        AMF.Internals.Helpers.To_Element
237         (AMF.Elements.Element_Access (To)));
238   end Set_Exit;
239
240   ----------------------
241   -- Get_Is_Composite --
242   ----------------------
243
244   overriding function Get_Is_Composite
245    (Self : not null access constant UML_State_Proxy)
246       return Boolean is
247   begin
248      return
249        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Composite
250         (Self.Element);
251   end Get_Is_Composite;
252
253   -----------------------
254   -- Get_Is_Orthogonal --
255   -----------------------
256
257   overriding function Get_Is_Orthogonal
258    (Self : not null access constant UML_State_Proxy)
259       return Boolean is
260   begin
261      return
262        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Orthogonal
263         (Self.Element);
264   end Get_Is_Orthogonal;
265
266   -------------------
267   -- Get_Is_Simple --
268   -------------------
269
270   overriding function Get_Is_Simple
271    (Self : not null access constant UML_State_Proxy)
272       return Boolean is
273   begin
274      return
275        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Simple
276         (Self.Element);
277   end Get_Is_Simple;
278
279   -----------------------------
280   -- Get_Is_Submachine_State --
281   -----------------------------
282
283   overriding function Get_Is_Submachine_State
284    (Self : not null access constant UML_State_Proxy)
285       return Boolean is
286   begin
287      return
288        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Submachine_State
289         (Self.Element);
290   end Get_Is_Submachine_State;
291
292   -------------------------
293   -- Get_Redefined_State --
294   -------------------------
295
296   overriding function Get_Redefined_State
297    (Self : not null access constant UML_State_Proxy)
298       return AMF.UML.States.UML_State_Access is
299   begin
300      return
301        AMF.UML.States.UML_State_Access
302         (AMF.Internals.Helpers.To_Element
303           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_State
304             (Self.Element)));
305   end Get_Redefined_State;
306
307   -------------------------
308   -- Set_Redefined_State --
309   -------------------------
310
311   overriding procedure Set_Redefined_State
312    (Self : not null access UML_State_Proxy;
313     To   : AMF.UML.States.UML_State_Access) is
314   begin
315      AMF.Internals.Tables.UML_Attributes.Internal_Set_Redefined_State
316       (Self.Element,
317        AMF.Internals.Helpers.To_Element
318         (AMF.Elements.Element_Access (To)));
319   end Set_Redefined_State;
320
321   ------------------------------
322   -- Get_Redefinition_Context --
323   ------------------------------
324
325   overriding function Get_Redefinition_Context
326    (Self : not null access constant UML_State_Proxy)
327       return AMF.UML.Classifiers.UML_Classifier_Access is
328   begin
329      raise Program_Error;
330      return Get_Redefinition_Context (Self);
331   end Get_Redefinition_Context;
332
333   ----------------
334   -- Get_Region --
335   ----------------
336
337   overriding function Get_Region
338    (Self : not null access constant UML_State_Proxy)
339       return AMF.UML.Regions.Collections.Set_Of_UML_Region is
340   begin
341      return
342        AMF.UML.Regions.Collections.Wrap
343         (AMF.Internals.Element_Collections.Wrap
344           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Region
345             (Self.Element)));
346   end Get_Region;
347
348   -------------------------
349   -- Get_State_Invariant --
350   -------------------------
351
352   overriding function Get_State_Invariant
353    (Self : not null access constant UML_State_Proxy)
354       return AMF.UML.Constraints.UML_Constraint_Access is
355   begin
356      return
357        AMF.UML.Constraints.UML_Constraint_Access
358         (AMF.Internals.Helpers.To_Element
359           (AMF.Internals.Tables.UML_Attributes.Internal_Get_State_Invariant
360             (Self.Element)));
361   end Get_State_Invariant;
362
363   -------------------------
364   -- Set_State_Invariant --
365   -------------------------
366
367   overriding procedure Set_State_Invariant
368    (Self : not null access UML_State_Proxy;
369     To   : AMF.UML.Constraints.UML_Constraint_Access) is
370   begin
371      AMF.Internals.Tables.UML_Attributes.Internal_Set_State_Invariant
372       (Self.Element,
373        AMF.Internals.Helpers.To_Element
374         (AMF.Elements.Element_Access (To)));
375   end Set_State_Invariant;
376
377   --------------------
378   -- Get_Submachine --
379   --------------------
380
381   overriding function Get_Submachine
382    (Self : not null access constant UML_State_Proxy)
383       return AMF.UML.State_Machines.UML_State_Machine_Access is
384   begin
385      return
386        AMF.UML.State_Machines.UML_State_Machine_Access
387         (AMF.Internals.Helpers.To_Element
388           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Submachine
389             (Self.Element)));
390   end Get_Submachine;
391
392   --------------------
393   -- Set_Submachine --
394   --------------------
395
396   overriding procedure Set_Submachine
397    (Self : not null access UML_State_Proxy;
398     To   : AMF.UML.State_Machines.UML_State_Machine_Access) is
399   begin
400      AMF.Internals.Tables.UML_Attributes.Internal_Set_Submachine
401       (Self.Element,
402        AMF.Internals.Helpers.To_Element
403         (AMF.Elements.Element_Access (To)));
404   end Set_Submachine;
405
406   -----------------
407   -- Get_Is_Leaf --
408   -----------------
409
410   overriding function Get_Is_Leaf
411    (Self : not null access constant UML_State_Proxy)
412       return Boolean is
413   begin
414      return
415        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf
416         (Self.Element);
417   end Get_Is_Leaf;
418
419   -----------------
420   -- Set_Is_Leaf --
421   -----------------
422
423   overriding procedure Set_Is_Leaf
424    (Self : not null access UML_State_Proxy;
425     To   : Boolean) is
426   begin
427      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf
428       (Self.Element, To);
429   end Set_Is_Leaf;
430
431   ---------------------------
432   -- Get_Redefined_Element --
433   ---------------------------
434
435   overriding function Get_Redefined_Element
436    (Self : not null access constant UML_State_Proxy)
437       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is
438   begin
439      return
440        AMF.UML.Redefinable_Elements.Collections.Wrap
441         (AMF.Internals.Element_Collections.Wrap
442           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element
443             (Self.Element)));
444   end Get_Redefined_Element;
445
446   ------------------------------
447   -- Get_Redefinition_Context --
448   ------------------------------
449
450   overriding function Get_Redefinition_Context
451    (Self : not null access constant UML_State_Proxy)
452       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
453   begin
454      return
455        AMF.UML.Classifiers.Collections.Wrap
456         (AMF.Internals.Element_Collections.Wrap
457           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context
458             (Self.Element)));
459   end Get_Redefinition_Context;
460
461   ---------------------------
462   -- Get_Client_Dependency --
463   ---------------------------
464
465   overriding function Get_Client_Dependency
466    (Self : not null access constant UML_State_Proxy)
467       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
468   begin
469      return
470        AMF.UML.Dependencies.Collections.Wrap
471         (AMF.Internals.Element_Collections.Wrap
472           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
473             (Self.Element)));
474   end Get_Client_Dependency;
475
476   -------------------------
477   -- Get_Name_Expression --
478   -------------------------
479
480   overriding function Get_Name_Expression
481    (Self : not null access constant UML_State_Proxy)
482       return AMF.UML.String_Expressions.UML_String_Expression_Access is
483   begin
484      return
485        AMF.UML.String_Expressions.UML_String_Expression_Access
486         (AMF.Internals.Helpers.To_Element
487           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
488             (Self.Element)));
489   end Get_Name_Expression;
490
491   -------------------------
492   -- Set_Name_Expression --
493   -------------------------
494
495   overriding procedure Set_Name_Expression
496    (Self : not null access UML_State_Proxy;
497     To   : AMF.UML.String_Expressions.UML_String_Expression_Access) is
498   begin
499      AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
500       (Self.Element,
501        AMF.Internals.Helpers.To_Element
502         (AMF.Elements.Element_Access (To)));
503   end Set_Name_Expression;
504
505   -------------------
506   -- Get_Namespace --
507   -------------------
508
509   overriding function Get_Namespace
510    (Self : not null access constant UML_State_Proxy)
511       return AMF.UML.Namespaces.UML_Namespace_Access is
512   begin
513      return
514        AMF.UML.Namespaces.UML_Namespace_Access
515         (AMF.Internals.Helpers.To_Element
516           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
517             (Self.Element)));
518   end Get_Namespace;
519
520   ------------------------
521   -- Get_Qualified_Name --
522   ------------------------
523
524   overriding function Get_Qualified_Name
525    (Self : not null access constant UML_State_Proxy)
526       return AMF.Optional_String is
527   begin
528      declare
529         use type Matreshka.Internals.Strings.Shared_String_Access;
530
531         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
532           := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
533
534      begin
535         if Aux = null then
536            return (Is_Empty => True);
537
538         else
539            return (False, League.Strings.Internals.Create (Aux));
540         end if;
541      end;
542   end Get_Qualified_Name;
543
544   ------------------------
545   -- Get_Element_Import --
546   ------------------------
547
548   overriding function Get_Element_Import
549    (Self : not null access constant UML_State_Proxy)
550       return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is
551   begin
552      return
553        AMF.UML.Element_Imports.Collections.Wrap
554         (AMF.Internals.Element_Collections.Wrap
555           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Element_Import
556             (Self.Element)));
557   end Get_Element_Import;
558
559   -------------------------
560   -- Get_Imported_Member --
561   -------------------------
562
563   overriding function Get_Imported_Member
564    (Self : not null access constant UML_State_Proxy)
565       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
566   begin
567      return
568        AMF.UML.Packageable_Elements.Collections.Wrap
569         (AMF.Internals.Element_Collections.Wrap
570           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Imported_Member
571             (Self.Element)));
572   end Get_Imported_Member;
573
574   ----------------
575   -- Get_Member --
576   ----------------
577
578   overriding function Get_Member
579    (Self : not null access constant UML_State_Proxy)
580       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
581   begin
582      return
583        AMF.UML.Named_Elements.Collections.Wrap
584         (AMF.Internals.Element_Collections.Wrap
585           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Member
586             (Self.Element)));
587   end Get_Member;
588
589   ----------------------
590   -- Get_Owned_Member --
591   ----------------------
592
593   overriding function Get_Owned_Member
594    (Self : not null access constant UML_State_Proxy)
595       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
596   begin
597      return
598        AMF.UML.Named_Elements.Collections.Wrap
599         (AMF.Internals.Element_Collections.Wrap
600           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Member
601             (Self.Element)));
602   end Get_Owned_Member;
603
604   --------------------
605   -- Get_Owned_Rule --
606   --------------------
607
608   overriding function Get_Owned_Rule
609    (Self : not null access constant UML_State_Proxy)
610       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
611   begin
612      return
613        AMF.UML.Constraints.Collections.Wrap
614         (AMF.Internals.Element_Collections.Wrap
615           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Rule
616             (Self.Element)));
617   end Get_Owned_Rule;
618
619   ------------------------
620   -- Get_Package_Import --
621   ------------------------
622
623   overriding function Get_Package_Import
624    (Self : not null access constant UML_State_Proxy)
625       return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is
626   begin
627      return
628        AMF.UML.Package_Imports.Collections.Wrap
629         (AMF.Internals.Element_Collections.Wrap
630           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package_Import
631             (Self.Element)));
632   end Get_Package_Import;
633
634   -------------------
635   -- Get_Container --
636   -------------------
637
638   overriding function Get_Container
639    (Self : not null access constant UML_State_Proxy)
640       return AMF.UML.Regions.UML_Region_Access is
641   begin
642      return
643        AMF.UML.Regions.UML_Region_Access
644         (AMF.Internals.Helpers.To_Element
645           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Container
646             (Self.Element)));
647   end Get_Container;
648
649   -------------------
650   -- Set_Container --
651   -------------------
652
653   overriding procedure Set_Container
654    (Self : not null access UML_State_Proxy;
655     To   : AMF.UML.Regions.UML_Region_Access) is
656   begin
657      AMF.Internals.Tables.UML_Attributes.Internal_Set_Container
658       (Self.Element,
659        AMF.Internals.Helpers.To_Element
660         (AMF.Elements.Element_Access (To)));
661   end Set_Container;
662
663   ------------------
664   -- Get_Incoming --
665   ------------------
666
667   overriding function Get_Incoming
668    (Self : not null access constant UML_State_Proxy)
669       return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
670   begin
671      return
672        AMF.UML.Transitions.Collections.Wrap
673         (AMF.Internals.Element_Collections.Wrap
674           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Incoming
675             (Self.Element)));
676   end Get_Incoming;
677
678   ------------------
679   -- Get_Outgoing --
680   ------------------
681
682   overriding function Get_Outgoing
683    (Self : not null access constant UML_State_Proxy)
684       return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
685   begin
686      return
687        AMF.UML.Transitions.Collections.Wrap
688         (AMF.Internals.Element_Collections.Wrap
689           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Outgoing
690             (Self.Element)));
691   end Get_Outgoing;
692
693   ------------------------------
694   -- Containing_State_Machine --
695   ------------------------------
696
697   overriding function Containing_State_Machine
698    (Self : not null access constant UML_State_Proxy)
699       return AMF.UML.State_Machines.UML_State_Machine_Access is
700   begin
701      --  Generated stub: replace with real body!
702      pragma Compile_Time_Warning (Standard.True, "Containing_State_Machine unimplemented");
703      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Containing_State_Machine";
704      return Containing_State_Machine (Self);
705   end Containing_State_Machine;
706
707   ------------------
708   -- Is_Composite --
709   ------------------
710
711   overriding function Is_Composite
712    (Self : not null access constant UML_State_Proxy)
713       return Boolean is
714   begin
715      --  Generated stub: replace with real body!
716      pragma Compile_Time_Warning (Standard.True, "Is_Composite unimplemented");
717      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Composite";
718      return Is_Composite (Self);
719   end Is_Composite;
720
721   ------------------------
722   -- Is_Consistent_With --
723   ------------------------
724
725   overriding function Is_Consistent_With
726    (Self : not null access constant UML_State_Proxy;
727     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
728       return Boolean is
729   begin
730      --  Generated stub: replace with real body!
731      pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented");
732      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Consistent_With";
733      return Is_Consistent_With (Self, Redefinee);
734   end Is_Consistent_With;
735
736   -------------------
737   -- Is_Orthogonal --
738   -------------------
739
740   overriding function Is_Orthogonal
741    (Self : not null access constant UML_State_Proxy)
742       return Boolean is
743   begin
744      --  Generated stub: replace with real body!
745      pragma Compile_Time_Warning (Standard.True, "Is_Orthogonal unimplemented");
746      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Orthogonal";
747      return Is_Orthogonal (Self);
748   end Is_Orthogonal;
749
750   -----------------------------------
751   -- Is_Redefinition_Context_Valid --
752   -----------------------------------
753
754   overriding function Is_Redefinition_Context_Valid
755    (Self : not null access constant UML_State_Proxy;
756     Redefined : AMF.UML.States.UML_State_Access)
757       return Boolean is
758   begin
759      --  Generated stub: replace with real body!
760      pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
761      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Redefinition_Context_Valid";
762      return Is_Redefinition_Context_Valid (Self, Redefined);
763   end Is_Redefinition_Context_Valid;
764
765   ---------------
766   -- Is_Simple --
767   ---------------
768
769   overriding function Is_Simple
770    (Self : not null access constant UML_State_Proxy)
771       return Boolean is
772   begin
773      --  Generated stub: replace with real body!
774      pragma Compile_Time_Warning (Standard.True, "Is_Simple unimplemented");
775      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Simple";
776      return Is_Simple (Self);
777   end Is_Simple;
778
779   -------------------------
780   -- Is_Submachine_State --
781   -------------------------
782
783   overriding function Is_Submachine_State
784    (Self : not null access constant UML_State_Proxy)
785       return Boolean is
786   begin
787      --  Generated stub: replace with real body!
788      pragma Compile_Time_Warning (Standard.True, "Is_Submachine_State unimplemented");
789      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Submachine_State";
790      return Is_Submachine_State (Self);
791   end Is_Submachine_State;
792
793   --------------------------
794   -- Redefinition_Context --
795   --------------------------
796
797   overriding function Redefinition_Context
798    (Self : not null access constant UML_State_Proxy)
799       return AMF.UML.Classifiers.UML_Classifier_Access is
800   begin
801      --  Generated stub: replace with real body!
802      pragma Compile_Time_Warning (Standard.True, "Redefinition_Context unimplemented");
803      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Redefinition_Context";
804      return Redefinition_Context (Self);
805   end Redefinition_Context;
806
807   -----------------------------------
808   -- Is_Redefinition_Context_Valid --
809   -----------------------------------
810
811   overriding function Is_Redefinition_Context_Valid
812    (Self : not null access constant UML_State_Proxy;
813     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
814       return Boolean is
815   begin
816      --  Generated stub: replace with real body!
817      pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
818      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Redefinition_Context_Valid";
819      return Is_Redefinition_Context_Valid (Self, Redefined);
820   end Is_Redefinition_Context_Valid;
821
822   -------------------------
823   -- All_Owning_Packages --
824   -------------------------
825
826   overriding function All_Owning_Packages
827    (Self : not null access constant UML_State_Proxy)
828       return AMF.UML.Packages.Collections.Set_Of_UML_Package is
829   begin
830      --  Generated stub: replace with real body!
831      pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
832      raise Program_Error with "Unimplemented procedure UML_State_Proxy.All_Owning_Packages";
833      return All_Owning_Packages (Self);
834   end All_Owning_Packages;
835
836   -----------------------------
837   -- Is_Distinguishable_From --
838   -----------------------------
839
840   overriding function Is_Distinguishable_From
841    (Self : not null access constant UML_State_Proxy;
842     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
843     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
844       return Boolean is
845   begin
846      --  Generated stub: replace with real body!
847      pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
848      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Is_Distinguishable_From";
849      return Is_Distinguishable_From (Self, N, Ns);
850   end Is_Distinguishable_From;
851
852   ---------------
853   -- Namespace --
854   ---------------
855
856   overriding function Namespace
857    (Self : not null access constant UML_State_Proxy)
858       return AMF.UML.Namespaces.UML_Namespace_Access is
859   begin
860      --  Generated stub: replace with real body!
861      pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
862      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Namespace";
863      return Namespace (Self);
864   end Namespace;
865
866   ------------------------
867   -- Exclude_Collisions --
868   ------------------------
869
870   overriding function Exclude_Collisions
871    (Self : not null access constant UML_State_Proxy;
872     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
873       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
874   begin
875      --  Generated stub: replace with real body!
876      pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented");
877      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Exclude_Collisions";
878      return Exclude_Collisions (Self, Imps);
879   end Exclude_Collisions;
880
881   -------------------------
882   -- Get_Names_Of_Member --
883   -------------------------
884
885   overriding function Get_Names_Of_Member
886    (Self : not null access constant UML_State_Proxy;
887     Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
888       return AMF.String_Collections.Set_Of_String is
889   begin
890      --  Generated stub: replace with real body!
891      pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented");
892      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Get_Names_Of_Member";
893      return Get_Names_Of_Member (Self, Element);
894   end Get_Names_Of_Member;
895
896   --------------------
897   -- Import_Members --
898   --------------------
899
900   overriding function Import_Members
901    (Self : not null access constant UML_State_Proxy;
902     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
903       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
904   begin
905      --  Generated stub: replace with real body!
906      pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented");
907      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Import_Members";
908      return Import_Members (Self, Imps);
909   end Import_Members;
910
911   ---------------------
912   -- Imported_Member --
913   ---------------------
914
915   overriding function Imported_Member
916    (Self : not null access constant UML_State_Proxy)
917       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
918   begin
919      --  Generated stub: replace with real body!
920      pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented");
921      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Imported_Member";
922      return Imported_Member (Self);
923   end Imported_Member;
924
925   ---------------------------------
926   -- Members_Are_Distinguishable --
927   ---------------------------------
928
929   overriding function Members_Are_Distinguishable
930    (Self : not null access constant UML_State_Proxy)
931       return Boolean is
932   begin
933      --  Generated stub: replace with real body!
934      pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented");
935      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Members_Are_Distinguishable";
936      return Members_Are_Distinguishable (Self);
937   end Members_Are_Distinguishable;
938
939   ------------------
940   -- Owned_Member --
941   ------------------
942
943   overriding function Owned_Member
944    (Self : not null access constant UML_State_Proxy)
945       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
946   begin
947      --  Generated stub: replace with real body!
948      pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented");
949      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Owned_Member";
950      return Owned_Member (Self);
951   end Owned_Member;
952
953   --------------
954   -- Incoming --
955   --------------
956
957   overriding function Incoming
958    (Self : not null access constant UML_State_Proxy)
959       return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
960   begin
961      --  Generated stub: replace with real body!
962      pragma Compile_Time_Warning (Standard.True, "Incoming unimplemented");
963      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Incoming";
964      return Incoming (Self);
965   end Incoming;
966
967   --------------
968   -- Outgoing --
969   --------------
970
971   overriding function Outgoing
972    (Self : not null access constant UML_State_Proxy)
973       return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
974   begin
975      --  Generated stub: replace with real body!
976      pragma Compile_Time_Warning (Standard.True, "Outgoing unimplemented");
977      raise Program_Error with "Unimplemented procedure UML_State_Proxy.Outgoing";
978      return Outgoing (Self);
979   end Outgoing;
980
981end AMF.Internals.UML_States;
982