1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                          Ada Modeling Framework                          --
6--                                                                          --
7--                        Runtime Library Component                         --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 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: 3436 $ $Date: 2012-11-14 10:14:34 +0400 (Wed, 14 Nov 2012) $
43------------------------------------------------------------------------------
44with AMF.Elements;
45with AMF.Internals.Element_Collections;
46with AMF.Internals.Helpers;
47with AMF.Internals.Tables.UML_Attributes;
48with AMF.Visitors.UMLDI_Iterators;
49with AMF.Visitors.UMLDI_Visitors;
50with League.Strings.Internals;
51with Matreshka.Internals.Strings;
52
53package body AMF.Internals.UMLDI_UML_State_Machine_Diagrams is
54
55   --------------------------------
56   -- Get_Inherited_State_Border --
57   --------------------------------
58
59   overriding function Get_Inherited_State_Border
60    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
61       return AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind is
62   begin
63      return
64        AMF.Internals.Tables.UML_Attributes.Internal_Get_Inherited_State_Border
65         (Self.Element);
66   end Get_Inherited_State_Border;
67
68   --------------------------------
69   -- Set_Inherited_State_Border --
70   --------------------------------
71
72   overriding procedure Set_Inherited_State_Border
73    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
74     To   : AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind) is
75   begin
76      AMF.Internals.Tables.UML_Attributes.Internal_Set_Inherited_State_Border
77       (Self.Element, To);
78   end Set_Inherited_State_Border;
79
80   --------------------------------
81   -- Get_Is_Collapse_State_Icon --
82   --------------------------------
83
84   overriding function Get_Is_Collapse_State_Icon
85    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
86       return Boolean is
87   begin
88      return
89        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Collapse_State_Icon
90         (Self.Element);
91   end Get_Is_Collapse_State_Icon;
92
93   --------------------------------
94   -- Set_Is_Collapse_State_Icon --
95   --------------------------------
96
97   overriding procedure Set_Is_Collapse_State_Icon
98    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
99     To   : Boolean) is
100   begin
101      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Collapse_State_Icon
102       (Self.Element, To);
103   end Set_Is_Collapse_State_Icon;
104
105   --------------------------------
106   -- Get_Is_Transition_Oriented --
107   --------------------------------
108
109   overriding function Get_Is_Transition_Oriented
110    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
111       return Boolean is
112   begin
113      return
114        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Transition_Oriented
115         (Self.Element);
116   end Get_Is_Transition_Oriented;
117
118   --------------------------------
119   -- Set_Is_Transition_Oriented --
120   --------------------------------
121
122   overriding procedure Set_Is_Transition_Oriented
123    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
124     To   : Boolean) is
125   begin
126      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Transition_Oriented
127       (Self.Element, To);
128   end Set_Is_Transition_Oriented;
129
130   -----------------------
131   -- Get_Model_Element --
132   -----------------------
133
134   overriding function Get_Model_Element
135    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
136       return AMF.UML.State_Machines.UML_State_Machine_Access is
137   begin
138      return
139        AMF.UML.State_Machines.UML_State_Machine_Access
140         (AMF.Internals.Helpers.To_Element
141           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element
142             (Self.Element)));
143   end Get_Model_Element;
144
145   -----------------------
146   -- Set_Model_Element --
147   -----------------------
148
149   overriding procedure Set_Model_Element
150    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
151     To   : AMF.UML.State_Machines.UML_State_Machine_Access) is
152   begin
153      raise Program_Error;
154--      AMF.Internals.Tables.UML_Attributes.Internal_Set_Model_Element
155--       (Self.Element,
156--        AMF.Internals.Helpers.To_Element
157--         (AMF.Elements.Element_Access (To)));
158   end Set_Model_Element;
159
160   -----------------------
161   -- Get_Model_Element --
162   -----------------------
163
164   overriding function Get_Model_Element
165    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
166       return AMF.UML.Behaviors.UML_Behavior_Access is
167   begin
168      return
169        AMF.UML.Behaviors.UML_Behavior_Access
170         (AMF.Internals.Helpers.To_Element
171           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element
172             (Self.Element)));
173   end Get_Model_Element;
174
175   -----------------------
176   -- Set_Model_Element --
177   -----------------------
178
179   overriding procedure Set_Model_Element
180    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
181     To   : AMF.UML.Behaviors.UML_Behavior_Access) is
182   begin
183      raise Program_Error;
184--      AMF.Internals.Tables.UML_Attributes.Internal_Set_Model_Element
185--       (Self.Element,
186--        AMF.Internals.Helpers.To_Element
187--         (AMF.Elements.Element_Access (To)));
188   end Set_Model_Element;
189
190   -----------------
191   -- Get_Heading --
192   -----------------
193
194   overriding function Get_Heading
195    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
196       return AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access is
197   begin
198      return
199        AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access
200         (AMF.Internals.Helpers.To_Element
201           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Heading
202             (Self.Element)));
203   end Get_Heading;
204
205   -----------------
206   -- Set_Heading --
207   -----------------
208
209   overriding procedure Set_Heading
210    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
211     To   : AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access) is
212   begin
213      AMF.Internals.Tables.UML_Attributes.Internal_Set_Heading
214       (Self.Element,
215        AMF.Internals.Helpers.To_Element
216         (AMF.Elements.Element_Access (To)));
217   end Set_Heading;
218
219   ------------------
220   -- Get_Is_Frame --
221   ------------------
222
223   overriding function Get_Is_Frame
224    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
225       return Boolean is
226   begin
227      return
228        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Frame
229         (Self.Element);
230   end Get_Is_Frame;
231
232   ------------------
233   -- Set_Is_Frame --
234   ------------------
235
236   overriding procedure Set_Is_Frame
237    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
238     To   : Boolean) is
239   begin
240      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Frame
241       (Self.Element, To);
242   end Set_Is_Frame;
243
244   ----------------
245   -- Get_Is_Iso --
246   ----------------
247
248   overriding function Get_Is_Iso
249    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
250       return Boolean is
251   begin
252      return
253        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Iso
254         (Self.Element);
255   end Get_Is_Iso;
256
257   ----------------
258   -- Set_Is_Iso --
259   ----------------
260
261   overriding procedure Set_Is_Iso
262    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
263     To   : Boolean) is
264   begin
265      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Iso
266       (Self.Element, To);
267   end Set_Is_Iso;
268
269   -----------------
270   -- Get_Is_Icon --
271   -----------------
272
273   overriding function Get_Is_Icon
274    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
275       return Boolean is
276   begin
277      return
278        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Icon
279         (Self.Element);
280   end Get_Is_Icon;
281
282   -----------------
283   -- Set_Is_Icon --
284   -----------------
285
286   overriding procedure Set_Is_Icon
287    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
288     To   : Boolean) is
289   begin
290      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Icon
291       (Self.Element, To);
292   end Set_Is_Icon;
293
294   ---------------------
295   -- Get_Local_Style --
296   ---------------------
297
298   overriding function Get_Local_Style
299    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
300       return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access is
301   begin
302      return
303        AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access
304         (AMF.Internals.Helpers.To_Element
305           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style
306             (Self.Element)));
307   end Get_Local_Style;
308
309   ---------------------
310   -- Set_Local_Style --
311   ---------------------
312
313   overriding procedure Set_Local_Style
314    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
315     To   : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access) is
316   begin
317      AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style
318       (Self.Element,
319        AMF.Internals.Helpers.To_Element
320         (AMF.Elements.Element_Access (To)));
321   end Set_Local_Style;
322
323   -----------------------
324   -- Get_Model_Element --
325   -----------------------
326
327   overriding function Get_Model_Element
328    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
329       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
330   begin
331      raise Program_Error;
332      return X : AMF.UML.Elements.Collections.Set_Of_UML_Element;
333--      return
334--        AMF.UML.Elements.Collections.Wrap
335--         (AMF.Internals.Element_Collections.Wrap
336--           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element
337--             (Self.Element)));
338   end Get_Model_Element;
339
340   -----------------------
341   -- Get_Model_Element --
342   -----------------------
343
344   overriding function Get_Model_Element
345    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
346       return AMF.CMOF.Elements.CMOF_Element_Access is
347   begin
348      return
349        AMF.CMOF.Elements.CMOF_Element_Access
350         (AMF.Internals.Helpers.To_Element
351           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element
352             (Self.Element)));
353   end Get_Model_Element;
354
355   ---------------------
356   -- Get_Local_Style --
357   ---------------------
358
359   overriding function Get_Local_Style
360    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
361       return AMF.DI.Styles.DI_Style_Access is
362   begin
363      return
364        AMF.DI.Styles.DI_Style_Access
365         (AMF.Internals.Helpers.To_Element
366           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style
367             (Self.Element)));
368   end Get_Local_Style;
369
370   ---------------------
371   -- Set_Local_Style --
372   ---------------------
373
374   overriding procedure Set_Local_Style
375    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
376     To   : AMF.DI.Styles.DI_Style_Access) is
377   begin
378      AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style
379       (Self.Element,
380        AMF.Internals.Helpers.To_Element
381         (AMF.Elements.Element_Access (To)));
382   end Set_Local_Style;
383
384   --------------
385   -- Get_Name --
386   --------------
387
388   overriding function Get_Name
389    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
390       return League.Strings.Universal_String is
391   begin
392      null;
393      return
394        League.Strings.Internals.Create
395         (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name (Self.Element));
396   end Get_Name;
397
398   --------------
399   -- Set_Name --
400   --------------
401
402   overriding procedure Set_Name
403    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
404     To   : League.Strings.Universal_String) is
405   begin
406      AMF.Internals.Tables.UML_Attributes.Internal_Set_Name
407       (Self.Element,
408        League.Strings.Internals.Internal (To));
409   end Set_Name;
410
411   -----------------------
412   -- Get_Documentation --
413   -----------------------
414
415   overriding function Get_Documentation
416    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
417       return League.Strings.Universal_String is
418   begin
419      null;
420      return
421        League.Strings.Internals.Create
422         (AMF.Internals.Tables.UML_Attributes.Internal_Get_Documentation (Self.Element));
423   end Get_Documentation;
424
425   -----------------------
426   -- Set_Documentation --
427   -----------------------
428
429   overriding procedure Set_Documentation
430    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
431     To   : League.Strings.Universal_String) is
432   begin
433      AMF.Internals.Tables.UML_Attributes.Internal_Set_Documentation
434       (Self.Element,
435        League.Strings.Internals.Internal (To));
436   end Set_Documentation;
437
438   --------------------
439   -- Get_Resolution --
440   --------------------
441
442   overriding function Get_Resolution
443    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
444       return AMF.Real is
445   begin
446      return
447        AMF.Internals.Tables.UML_Attributes.Internal_Get_Resolution
448         (Self.Element);
449   end Get_Resolution;
450
451   --------------------
452   -- Set_Resolution --
453   --------------------
454
455   overriding procedure Set_Resolution
456    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
457     To   : AMF.Real) is
458   begin
459      AMF.Internals.Tables.UML_Attributes.Internal_Set_Resolution
460       (Self.Element, To);
461   end Set_Resolution;
462
463   ---------------------------
464   -- Get_Client_Dependency --
465   ---------------------------
466
467   overriding function Get_Client_Dependency
468    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
469       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
470   begin
471      return
472        AMF.UML.Dependencies.Collections.Wrap
473         (AMF.Internals.Element_Collections.Wrap
474           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
475             (Self.Element)));
476   end Get_Client_Dependency;
477
478   --------------
479   -- Get_Name --
480   --------------
481
482   overriding function Get_Name
483    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
484       return AMF.Optional_String is
485   begin
486      declare
487         use type Matreshka.Internals.Strings.Shared_String_Access;
488
489         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
490           := AMF.Internals.Tables.UML_Attributes.Internal_Get_Name (Self.Element);
491
492      begin
493         if Aux = null then
494            return (Is_Empty => True);
495
496         else
497            return (False, League.Strings.Internals.Create (Aux));
498         end if;
499      end;
500   end Get_Name;
501
502   --------------
503   -- Set_Name --
504   --------------
505
506   overriding procedure Set_Name
507    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
508     To   : AMF.Optional_String) is
509   begin
510      if To.Is_Empty then
511         AMF.Internals.Tables.UML_Attributes.Internal_Set_Name
512          (Self.Element, null);
513
514      else
515         AMF.Internals.Tables.UML_Attributes.Internal_Set_Name
516          (Self.Element,
517           League.Strings.Internals.Internal (To.Value));
518      end if;
519   end Set_Name;
520
521   -------------------------
522   -- Get_Name_Expression --
523   -------------------------
524
525   overriding function Get_Name_Expression
526    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
527       return AMF.UML.String_Expressions.UML_String_Expression_Access is
528   begin
529      return
530        AMF.UML.String_Expressions.UML_String_Expression_Access
531         (AMF.Internals.Helpers.To_Element
532           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
533             (Self.Element)));
534   end Get_Name_Expression;
535
536   -------------------------
537   -- Set_Name_Expression --
538   -------------------------
539
540   overriding procedure Set_Name_Expression
541    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
542     To   : AMF.UML.String_Expressions.UML_String_Expression_Access) is
543   begin
544      AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
545       (Self.Element,
546        AMF.Internals.Helpers.To_Element
547         (AMF.Elements.Element_Access (To)));
548   end Set_Name_Expression;
549
550   -------------------
551   -- Get_Namespace --
552   -------------------
553
554   overriding function Get_Namespace
555    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
556       return AMF.UML.Namespaces.UML_Namespace_Access is
557   begin
558      return
559        AMF.UML.Namespaces.UML_Namespace_Access
560         (AMF.Internals.Helpers.To_Element
561           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
562             (Self.Element)));
563   end Get_Namespace;
564
565   ------------------------
566   -- Get_Qualified_Name --
567   ------------------------
568
569   overriding function Get_Qualified_Name
570    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
571       return AMF.Optional_String is
572   begin
573      declare
574         use type Matreshka.Internals.Strings.Shared_String_Access;
575
576         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
577           := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
578
579      begin
580         if Aux = null then
581            return (Is_Empty => True);
582
583         else
584            return (False, League.Strings.Internals.Create (Aux));
585         end if;
586      end;
587   end Get_Qualified_Name;
588
589   -----------------------
590   -- Get_Owned_Comment --
591   -----------------------
592
593   overriding function Get_Owned_Comment
594    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
595       return AMF.UML.Comments.Collections.Set_Of_UML_Comment is
596   begin
597      return
598        AMF.UML.Comments.Collections.Wrap
599         (AMF.Internals.Element_Collections.Wrap
600           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Comment
601             (Self.Element)));
602   end Get_Owned_Comment;
603
604   -----------------------
605   -- Get_Owned_Element --
606   -----------------------
607
608   overriding function Get_Owned_Element
609    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
610       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
611   begin
612      return
613        AMF.UML.Elements.Collections.Wrap
614         (AMF.Internals.Element_Collections.Wrap
615           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Element
616             (Self.Element)));
617   end Get_Owned_Element;
618
619   ---------------
620   -- Get_Owner --
621   ---------------
622
623   overriding function Get_Owner
624    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
625       return AMF.UML.Elements.UML_Element_Access is
626   begin
627      return
628        AMF.UML.Elements.UML_Element_Access
629         (AMF.Internals.Helpers.To_Element
630           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owner
631             (Self.Element)));
632   end Get_Owner;
633
634   -----------------------------------
635   -- Get_Owning_Template_Parameter --
636   -----------------------------------
637
638   overriding function Get_Owning_Template_Parameter
639    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
640       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
641   begin
642      return
643        AMF.UML.Template_Parameters.UML_Template_Parameter_Access
644         (AMF.Internals.Helpers.To_Element
645           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter
646             (Self.Element)));
647   end Get_Owning_Template_Parameter;
648
649   -----------------------------------
650   -- Set_Owning_Template_Parameter --
651   -----------------------------------
652
653   overriding procedure Set_Owning_Template_Parameter
654    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
655     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
656   begin
657      AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter
658       (Self.Element,
659        AMF.Internals.Helpers.To_Element
660         (AMF.Elements.Element_Access (To)));
661   end Set_Owning_Template_Parameter;
662
663   ----------------------------
664   -- Get_Template_Parameter --
665   ----------------------------
666
667   overriding function Get_Template_Parameter
668    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
669       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
670   begin
671      return
672        AMF.UML.Template_Parameters.UML_Template_Parameter_Access
673         (AMF.Internals.Helpers.To_Element
674           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
675             (Self.Element)));
676   end Get_Template_Parameter;
677
678   ----------------------------
679   -- Set_Template_Parameter --
680   ----------------------------
681
682   overriding procedure Set_Template_Parameter
683    (Self : not null access UMLDI_UML_State_Machine_Diagram_Proxy;
684     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
685   begin
686      AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
687       (Self.Element,
688        AMF.Internals.Helpers.To_Element
689         (AMF.Elements.Element_Access (To)));
690   end Set_Template_Parameter;
691
692   --------------------
693   -- All_Namespaces --
694   --------------------
695
696   overriding function All_Namespaces
697    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
698       return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is
699   begin
700      --  Generated stub: replace with real body!
701      pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented");
702      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.All_Namespaces";
703      return All_Namespaces (Self);
704   end All_Namespaces;
705
706   -------------------------
707   -- All_Owning_Packages --
708   -------------------------
709
710   overriding function All_Owning_Packages
711    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
712       return AMF.UML.Packages.Collections.Set_Of_UML_Package is
713   begin
714      --  Generated stub: replace with real body!
715      pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
716      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.All_Owning_Packages";
717      return All_Owning_Packages (Self);
718   end All_Owning_Packages;
719
720   -----------------------------
721   -- Is_Distinguishable_From --
722   -----------------------------
723
724   overriding function Is_Distinguishable_From
725    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy;
726     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
727     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
728       return Boolean is
729   begin
730      --  Generated stub: replace with real body!
731      pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
732      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.Is_Distinguishable_From";
733      return Is_Distinguishable_From (Self, N, Ns);
734   end Is_Distinguishable_From;
735
736   ---------------
737   -- Namespace --
738   ---------------
739
740   overriding function Namespace
741    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
742       return AMF.UML.Namespaces.UML_Namespace_Access is
743   begin
744      --  Generated stub: replace with real body!
745      pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
746      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.Namespace";
747      return Namespace (Self);
748   end Namespace;
749
750   --------------------
751   -- Qualified_Name --
752   --------------------
753
754   overriding function Qualified_Name
755    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
756       return League.Strings.Universal_String is
757   begin
758      --  Generated stub: replace with real body!
759      pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented");
760      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.Qualified_Name";
761      return Qualified_Name (Self);
762   end Qualified_Name;
763
764   ---------------
765   -- Separator --
766   ---------------
767
768   overriding function Separator
769    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
770       return League.Strings.Universal_String is
771   begin
772      --  Generated stub: replace with real body!
773      pragma Compile_Time_Warning (Standard.True, "Separator unimplemented");
774      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.Separator";
775      return Separator (Self);
776   end Separator;
777
778   ------------------------
779   -- All_Owned_Elements --
780   ------------------------
781
782   overriding function All_Owned_Elements
783    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
784       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
785   begin
786      --  Generated stub: replace with real body!
787      pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented");
788      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.All_Owned_Elements";
789      return All_Owned_Elements (Self);
790   end All_Owned_Elements;
791
792   ------------------------
793   -- Is_Compatible_With --
794   ------------------------
795
796   overriding function Is_Compatible_With
797    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy;
798     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
799       return Boolean is
800   begin
801      --  Generated stub: replace with real body!
802      pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented");
803      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.Is_Compatible_With";
804      return Is_Compatible_With (Self, P);
805   end Is_Compatible_With;
806
807   ---------------------------
808   -- Is_Template_Parameter --
809   ---------------------------
810
811   overriding function Is_Template_Parameter
812    (Self : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy)
813       return Boolean is
814   begin
815      --  Generated stub: replace with real body!
816      pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented");
817      raise Program_Error with "Unimplemented procedure UMLDI_UML_State_Machine_Diagram_Proxy.Is_Template_Parameter";
818      return Is_Template_Parameter (Self);
819   end Is_Template_Parameter;
820
821   -------------------
822   -- Enter_Element --
823   -------------------
824
825   overriding procedure Enter_Element
826    (Self    : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy;
827     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
828     Control : in out AMF.Visitors.Traverse_Control) is
829   begin
830      if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then
831         AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class
832          (Visitor).Enter_UML_State_Machine_Diagram
833            (AMF.UMLDI.UML_State_Machine_Diagrams.UMLDI_UML_State_Machine_Diagram_Access (Self),
834           Control);
835      end if;
836   end Enter_Element;
837
838   -------------------
839   -- Leave_Element --
840   -------------------
841
842   overriding procedure Leave_Element
843    (Self    : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy;
844     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
845     Control : in out AMF.Visitors.Traverse_Control) is
846   begin
847      if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then
848         AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class
849          (Visitor).Leave_UML_State_Machine_Diagram
850            (AMF.UMLDI.UML_State_Machine_Diagrams.UMLDI_UML_State_Machine_Diagram_Access (Self),
851           Control);
852      end if;
853   end Leave_Element;
854
855   -------------------
856   -- Visit_Element --
857   -------------------
858
859   overriding procedure Visit_Element
860    (Self     : not null access constant UMLDI_UML_State_Machine_Diagram_Proxy;
861     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
862     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
863     Control  : in out AMF.Visitors.Traverse_Control) is
864   begin
865      if Iterator in AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class then
866         AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class
867          (Iterator).Visit_UML_State_Machine_Diagram
868            (Visitor,
869             AMF.UMLDI.UML_State_Machine_Diagrams.UMLDI_UML_State_Machine_Diagram_Access (Self),
870           Control);
871      end if;
872   end Visit_Element;
873
874end AMF.Internals.UMLDI_UML_State_Machine_Diagrams;
875