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_Enumerations is
54
55   -------------------
56   -- Enter_Element --
57   -------------------
58
59   overriding procedure Enter_Element
60    (Self    : not null access constant UML_Enumeration_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_Enumeration
67            (AMF.UML.Enumerations.UML_Enumeration_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_Enumeration_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_Enumeration
84            (AMF.UML.Enumerations.UML_Enumeration_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_Enumeration_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_Enumeration
102            (Visitor,
103             AMF.UML.Enumerations.UML_Enumeration_Access (Self),
104             Control);
105      end if;
106   end Visit_Element;
107
108   -----------------------
109   -- Get_Owned_Literal --
110   -----------------------
111
112   overriding function Get_Owned_Literal
113    (Self : not null access constant UML_Enumeration_Proxy)
114       return AMF.UML.Enumeration_Literals.Collections.Ordered_Set_Of_UML_Enumeration_Literal is
115   begin
116      return
117        AMF.UML.Enumeration_Literals.Collections.Wrap
118         (AMF.Internals.Element_Collections.Wrap
119           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Literal
120             (Self.Element)));
121   end Get_Owned_Literal;
122
123   -------------------------
124   -- Get_Owned_Attribute --
125   -------------------------
126
127   overriding function Get_Owned_Attribute
128    (Self : not null access constant UML_Enumeration_Proxy)
129       return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property is
130   begin
131      return
132        AMF.UML.Properties.Collections.Wrap
133         (AMF.Internals.Element_Collections.Wrap
134           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Attribute
135             (Self.Element)));
136   end Get_Owned_Attribute;
137
138   -------------------------
139   -- Get_Owned_Operation --
140   -------------------------
141
142   overriding function Get_Owned_Operation
143    (Self : not null access constant UML_Enumeration_Proxy)
144       return AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation is
145   begin
146      return
147        AMF.UML.Operations.Collections.Wrap
148         (AMF.Internals.Element_Collections.Wrap
149           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Operation
150             (Self.Element)));
151   end Get_Owned_Operation;
152
153   -------------------
154   -- Get_Attribute --
155   -------------------
156
157   overriding function Get_Attribute
158    (Self : not null access constant UML_Enumeration_Proxy)
159       return AMF.UML.Properties.Collections.Set_Of_UML_Property is
160   begin
161      return
162        AMF.UML.Properties.Collections.Wrap
163         (AMF.Internals.Element_Collections.Wrap
164           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Attribute
165             (Self.Element)));
166   end Get_Attribute;
167
168   ---------------------------
169   -- Get_Collaboration_Use --
170   ---------------------------
171
172   overriding function Get_Collaboration_Use
173    (Self : not null access constant UML_Enumeration_Proxy)
174       return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use is
175   begin
176      return
177        AMF.UML.Collaboration_Uses.Collections.Wrap
178         (AMF.Internals.Element_Collections.Wrap
179           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Collaboration_Use
180             (Self.Element)));
181   end Get_Collaboration_Use;
182
183   -----------------
184   -- Get_Feature --
185   -----------------
186
187   overriding function Get_Feature
188    (Self : not null access constant UML_Enumeration_Proxy)
189       return AMF.UML.Features.Collections.Set_Of_UML_Feature is
190   begin
191      return
192        AMF.UML.Features.Collections.Wrap
193         (AMF.Internals.Element_Collections.Wrap
194           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Feature
195             (Self.Element)));
196   end Get_Feature;
197
198   -----------------
199   -- Get_General --
200   -----------------
201
202   overriding function Get_General
203    (Self : not null access constant UML_Enumeration_Proxy)
204       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
205   begin
206      return
207        AMF.UML.Classifiers.Collections.Wrap
208         (AMF.Internals.Element_Collections.Wrap
209           (AMF.Internals.Tables.UML_Attributes.Internal_Get_General
210             (Self.Element)));
211   end Get_General;
212
213   ------------------------
214   -- Get_Generalization --
215   ------------------------
216
217   overriding function Get_Generalization
218    (Self : not null access constant UML_Enumeration_Proxy)
219       return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization is
220   begin
221      return
222        AMF.UML.Generalizations.Collections.Wrap
223         (AMF.Internals.Element_Collections.Wrap
224           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Generalization
225             (Self.Element)));
226   end Get_Generalization;
227
228   --------------------------
229   -- Get_Inherited_Member --
230   --------------------------
231
232   overriding function Get_Inherited_Member
233    (Self : not null access constant UML_Enumeration_Proxy)
234       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
235   begin
236      return
237        AMF.UML.Named_Elements.Collections.Wrap
238         (AMF.Internals.Element_Collections.Wrap
239           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Inherited_Member
240             (Self.Element)));
241   end Get_Inherited_Member;
242
243   ---------------------
244   -- Get_Is_Abstract --
245   ---------------------
246
247   overriding function Get_Is_Abstract
248    (Self : not null access constant UML_Enumeration_Proxy)
249       return Boolean is
250   begin
251      return
252        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Abstract
253         (Self.Element);
254   end Get_Is_Abstract;
255
256   ---------------------------------
257   -- Get_Is_Final_Specialization --
258   ---------------------------------
259
260   overriding function Get_Is_Final_Specialization
261    (Self : not null access constant UML_Enumeration_Proxy)
262       return Boolean is
263   begin
264      return
265        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Final_Specialization
266         (Self.Element);
267   end Get_Is_Final_Specialization;
268
269   ---------------------------------
270   -- Set_Is_Final_Specialization --
271   ---------------------------------
272
273   overriding procedure Set_Is_Final_Specialization
274    (Self : not null access UML_Enumeration_Proxy;
275     To   : Boolean) is
276   begin
277      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Final_Specialization
278       (Self.Element, To);
279   end Set_Is_Final_Specialization;
280
281   ----------------------------------
282   -- Get_Owned_Template_Signature --
283   ----------------------------------
284
285   overriding function Get_Owned_Template_Signature
286    (Self : not null access constant UML_Enumeration_Proxy)
287       return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access is
288   begin
289      return
290        AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access
291         (AMF.Internals.Helpers.To_Element
292           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Template_Signature
293             (Self.Element)));
294   end Get_Owned_Template_Signature;
295
296   ----------------------------------
297   -- Set_Owned_Template_Signature --
298   ----------------------------------
299
300   overriding procedure Set_Owned_Template_Signature
301    (Self : not null access UML_Enumeration_Proxy;
302     To   : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access) is
303   begin
304      AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Template_Signature
305       (Self.Element,
306        AMF.Internals.Helpers.To_Element
307         (AMF.Elements.Element_Access (To)));
308   end Set_Owned_Template_Signature;
309
310   ------------------------
311   -- Get_Owned_Use_Case --
312   ------------------------
313
314   overriding function Get_Owned_Use_Case
315    (Self : not null access constant UML_Enumeration_Proxy)
316       return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is
317   begin
318      return
319        AMF.UML.Use_Cases.Collections.Wrap
320         (AMF.Internals.Element_Collections.Wrap
321           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Use_Case
322             (Self.Element)));
323   end Get_Owned_Use_Case;
324
325   --------------------------
326   -- Get_Powertype_Extent --
327   --------------------------
328
329   overriding function Get_Powertype_Extent
330    (Self : not null access constant UML_Enumeration_Proxy)
331       return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set is
332   begin
333      return
334        AMF.UML.Generalization_Sets.Collections.Wrap
335         (AMF.Internals.Element_Collections.Wrap
336           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Powertype_Extent
337             (Self.Element)));
338   end Get_Powertype_Extent;
339
340   ------------------------------
341   -- Get_Redefined_Classifier --
342   ------------------------------
343
344   overriding function Get_Redefined_Classifier
345    (Self : not null access constant UML_Enumeration_Proxy)
346       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
347   begin
348      return
349        AMF.UML.Classifiers.Collections.Wrap
350         (AMF.Internals.Element_Collections.Wrap
351           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Classifier
352             (Self.Element)));
353   end Get_Redefined_Classifier;
354
355   ------------------------
356   -- Get_Representation --
357   ------------------------
358
359   overriding function Get_Representation
360    (Self : not null access constant UML_Enumeration_Proxy)
361       return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access is
362   begin
363      return
364        AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access
365         (AMF.Internals.Helpers.To_Element
366           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Representation
367             (Self.Element)));
368   end Get_Representation;
369
370   ------------------------
371   -- Set_Representation --
372   ------------------------
373
374   overriding procedure Set_Representation
375    (Self : not null access UML_Enumeration_Proxy;
376     To   : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access) is
377   begin
378      AMF.Internals.Tables.UML_Attributes.Internal_Set_Representation
379       (Self.Element,
380        AMF.Internals.Helpers.To_Element
381         (AMF.Elements.Element_Access (To)));
382   end Set_Representation;
383
384   ----------------------
385   -- Get_Substitution --
386   ----------------------
387
388   overriding function Get_Substitution
389    (Self : not null access constant UML_Enumeration_Proxy)
390       return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution is
391   begin
392      return
393        AMF.UML.Substitutions.Collections.Wrap
394         (AMF.Internals.Element_Collections.Wrap
395           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Substitution
396             (Self.Element)));
397   end Get_Substitution;
398
399   ----------------------------
400   -- Get_Template_Parameter --
401   ----------------------------
402
403   overriding function Get_Template_Parameter
404    (Self : not null access constant UML_Enumeration_Proxy)
405       return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access is
406   begin
407      return
408        AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access
409         (AMF.Internals.Helpers.To_Element
410           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
411             (Self.Element)));
412   end Get_Template_Parameter;
413
414   ----------------------------
415   -- Set_Template_Parameter --
416   ----------------------------
417
418   overriding procedure Set_Template_Parameter
419    (Self : not null access UML_Enumeration_Proxy;
420     To   : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access) is
421   begin
422      AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
423       (Self.Element,
424        AMF.Internals.Helpers.To_Element
425         (AMF.Elements.Element_Access (To)));
426   end Set_Template_Parameter;
427
428   ------------------
429   -- Get_Use_Case --
430   ------------------
431
432   overriding function Get_Use_Case
433    (Self : not null access constant UML_Enumeration_Proxy)
434       return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is
435   begin
436      return
437        AMF.UML.Use_Cases.Collections.Wrap
438         (AMF.Internals.Element_Collections.Wrap
439           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Use_Case
440             (Self.Element)));
441   end Get_Use_Case;
442
443   ------------------------
444   -- Get_Element_Import --
445   ------------------------
446
447   overriding function Get_Element_Import
448    (Self : not null access constant UML_Enumeration_Proxy)
449       return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is
450   begin
451      return
452        AMF.UML.Element_Imports.Collections.Wrap
453         (AMF.Internals.Element_Collections.Wrap
454           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Element_Import
455             (Self.Element)));
456   end Get_Element_Import;
457
458   -------------------------
459   -- Get_Imported_Member --
460   -------------------------
461
462   overriding function Get_Imported_Member
463    (Self : not null access constant UML_Enumeration_Proxy)
464       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
465   begin
466      return
467        AMF.UML.Packageable_Elements.Collections.Wrap
468         (AMF.Internals.Element_Collections.Wrap
469           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Imported_Member
470             (Self.Element)));
471   end Get_Imported_Member;
472
473   ----------------
474   -- Get_Member --
475   ----------------
476
477   overriding function Get_Member
478    (Self : not null access constant UML_Enumeration_Proxy)
479       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
480   begin
481      return
482        AMF.UML.Named_Elements.Collections.Wrap
483         (AMF.Internals.Element_Collections.Wrap
484           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Member
485             (Self.Element)));
486   end Get_Member;
487
488   ----------------------
489   -- Get_Owned_Member --
490   ----------------------
491
492   overriding function Get_Owned_Member
493    (Self : not null access constant UML_Enumeration_Proxy)
494       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
495   begin
496      return
497        AMF.UML.Named_Elements.Collections.Wrap
498         (AMF.Internals.Element_Collections.Wrap
499           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Member
500             (Self.Element)));
501   end Get_Owned_Member;
502
503   --------------------
504   -- Get_Owned_Rule --
505   --------------------
506
507   overriding function Get_Owned_Rule
508    (Self : not null access constant UML_Enumeration_Proxy)
509       return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
510   begin
511      return
512        AMF.UML.Constraints.Collections.Wrap
513         (AMF.Internals.Element_Collections.Wrap
514           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Rule
515             (Self.Element)));
516   end Get_Owned_Rule;
517
518   ------------------------
519   -- Get_Package_Import --
520   ------------------------
521
522   overriding function Get_Package_Import
523    (Self : not null access constant UML_Enumeration_Proxy)
524       return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is
525   begin
526      return
527        AMF.UML.Package_Imports.Collections.Wrap
528         (AMF.Internals.Element_Collections.Wrap
529           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package_Import
530             (Self.Element)));
531   end Get_Package_Import;
532
533   ---------------------------
534   -- Get_Client_Dependency --
535   ---------------------------
536
537   overriding function Get_Client_Dependency
538    (Self : not null access constant UML_Enumeration_Proxy)
539       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
540   begin
541      return
542        AMF.UML.Dependencies.Collections.Wrap
543         (AMF.Internals.Element_Collections.Wrap
544           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
545             (Self.Element)));
546   end Get_Client_Dependency;
547
548   -------------------------
549   -- Get_Name_Expression --
550   -------------------------
551
552   overriding function Get_Name_Expression
553    (Self : not null access constant UML_Enumeration_Proxy)
554       return AMF.UML.String_Expressions.UML_String_Expression_Access is
555   begin
556      return
557        AMF.UML.String_Expressions.UML_String_Expression_Access
558         (AMF.Internals.Helpers.To_Element
559           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
560             (Self.Element)));
561   end Get_Name_Expression;
562
563   -------------------------
564   -- Set_Name_Expression --
565   -------------------------
566
567   overriding procedure Set_Name_Expression
568    (Self : not null access UML_Enumeration_Proxy;
569     To   : AMF.UML.String_Expressions.UML_String_Expression_Access) is
570   begin
571      AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
572       (Self.Element,
573        AMF.Internals.Helpers.To_Element
574         (AMF.Elements.Element_Access (To)));
575   end Set_Name_Expression;
576
577   -------------------
578   -- Get_Namespace --
579   -------------------
580
581   overriding function Get_Namespace
582    (Self : not null access constant UML_Enumeration_Proxy)
583       return AMF.UML.Namespaces.UML_Namespace_Access is
584   begin
585      return
586        AMF.UML.Namespaces.UML_Namespace_Access
587         (AMF.Internals.Helpers.To_Element
588           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
589             (Self.Element)));
590   end Get_Namespace;
591
592   ------------------------
593   -- Get_Qualified_Name --
594   ------------------------
595
596   overriding function Get_Qualified_Name
597    (Self : not null access constant UML_Enumeration_Proxy)
598       return AMF.Optional_String is
599   begin
600      declare
601         use type Matreshka.Internals.Strings.Shared_String_Access;
602
603         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
604           := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
605
606      begin
607         if Aux = null then
608            return (Is_Empty => True);
609
610         else
611            return (False, League.Strings.Internals.Create (Aux));
612         end if;
613      end;
614   end Get_Qualified_Name;
615
616   -----------------
617   -- Get_Package --
618   -----------------
619
620   overriding function Get_Package
621    (Self : not null access constant UML_Enumeration_Proxy)
622       return AMF.UML.Packages.UML_Package_Access is
623   begin
624      return
625        AMF.UML.Packages.UML_Package_Access
626         (AMF.Internals.Helpers.To_Element
627           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package
628             (Self.Element)));
629   end Get_Package;
630
631   -----------------
632   -- Set_Package --
633   -----------------
634
635   overriding procedure Set_Package
636    (Self : not null access UML_Enumeration_Proxy;
637     To   : AMF.UML.Packages.UML_Package_Access) is
638   begin
639      AMF.Internals.Tables.UML_Attributes.Internal_Set_Package
640       (Self.Element,
641        AMF.Internals.Helpers.To_Element
642         (AMF.Elements.Element_Access (To)));
643   end Set_Package;
644
645   -----------------------------------
646   -- Get_Owning_Template_Parameter --
647   -----------------------------------
648
649   overriding function Get_Owning_Template_Parameter
650    (Self : not null access constant UML_Enumeration_Proxy)
651       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
652   begin
653      return
654        AMF.UML.Template_Parameters.UML_Template_Parameter_Access
655         (AMF.Internals.Helpers.To_Element
656           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter
657             (Self.Element)));
658   end Get_Owning_Template_Parameter;
659
660   -----------------------------------
661   -- Set_Owning_Template_Parameter --
662   -----------------------------------
663
664   overriding procedure Set_Owning_Template_Parameter
665    (Self : not null access UML_Enumeration_Proxy;
666     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
667   begin
668      AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter
669       (Self.Element,
670        AMF.Internals.Helpers.To_Element
671         (AMF.Elements.Element_Access (To)));
672   end Set_Owning_Template_Parameter;
673
674   ----------------------------
675   -- Get_Template_Parameter --
676   ----------------------------
677
678   overriding function Get_Template_Parameter
679    (Self : not null access constant UML_Enumeration_Proxy)
680       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
681   begin
682      return
683        AMF.UML.Template_Parameters.UML_Template_Parameter_Access
684         (AMF.Internals.Helpers.To_Element
685           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
686             (Self.Element)));
687   end Get_Template_Parameter;
688
689   ----------------------------
690   -- Set_Template_Parameter --
691   ----------------------------
692
693   overriding procedure Set_Template_Parameter
694    (Self : not null access UML_Enumeration_Proxy;
695     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
696   begin
697      AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
698       (Self.Element,
699        AMF.Internals.Helpers.To_Element
700         (AMF.Elements.Element_Access (To)));
701   end Set_Template_Parameter;
702
703   ----------------------------------
704   -- Get_Owned_Template_Signature --
705   ----------------------------------
706
707   overriding function Get_Owned_Template_Signature
708    (Self : not null access constant UML_Enumeration_Proxy)
709       return AMF.UML.Template_Signatures.UML_Template_Signature_Access is
710   begin
711      return
712        AMF.UML.Template_Signatures.UML_Template_Signature_Access
713         (AMF.Internals.Helpers.To_Element
714           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Template_Signature
715             (Self.Element)));
716   end Get_Owned_Template_Signature;
717
718   ----------------------------------
719   -- Set_Owned_Template_Signature --
720   ----------------------------------
721
722   overriding procedure Set_Owned_Template_Signature
723    (Self : not null access UML_Enumeration_Proxy;
724     To   : AMF.UML.Template_Signatures.UML_Template_Signature_Access) is
725   begin
726      AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Template_Signature
727       (Self.Element,
728        AMF.Internals.Helpers.To_Element
729         (AMF.Elements.Element_Access (To)));
730   end Set_Owned_Template_Signature;
731
732   --------------------------
733   -- Get_Template_Binding --
734   --------------------------
735
736   overriding function Get_Template_Binding
737    (Self : not null access constant UML_Enumeration_Proxy)
738       return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding is
739   begin
740      return
741        AMF.UML.Template_Bindings.Collections.Wrap
742         (AMF.Internals.Element_Collections.Wrap
743           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Binding
744             (Self.Element)));
745   end Get_Template_Binding;
746
747   -----------------
748   -- Get_Is_Leaf --
749   -----------------
750
751   overriding function Get_Is_Leaf
752    (Self : not null access constant UML_Enumeration_Proxy)
753       return Boolean is
754   begin
755      return
756        AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf
757         (Self.Element);
758   end Get_Is_Leaf;
759
760   -----------------
761   -- Set_Is_Leaf --
762   -----------------
763
764   overriding procedure Set_Is_Leaf
765    (Self : not null access UML_Enumeration_Proxy;
766     To   : Boolean) is
767   begin
768      AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf
769       (Self.Element, To);
770   end Set_Is_Leaf;
771
772   ---------------------------
773   -- Get_Redefined_Element --
774   ---------------------------
775
776   overriding function Get_Redefined_Element
777    (Self : not null access constant UML_Enumeration_Proxy)
778       return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is
779   begin
780      return
781        AMF.UML.Redefinable_Elements.Collections.Wrap
782         (AMF.Internals.Element_Collections.Wrap
783           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element
784             (Self.Element)));
785   end Get_Redefined_Element;
786
787   ------------------------------
788   -- Get_Redefinition_Context --
789   ------------------------------
790
791   overriding function Get_Redefinition_Context
792    (Self : not null access constant UML_Enumeration_Proxy)
793       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
794   begin
795      return
796        AMF.UML.Classifiers.Collections.Wrap
797         (AMF.Internals.Element_Collections.Wrap
798           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context
799             (Self.Element)));
800   end Get_Redefinition_Context;
801
802   -------------
803   -- Inherit --
804   -------------
805
806   overriding function Inherit
807    (Self : not null access constant UML_Enumeration_Proxy;
808     Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element)
809       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
810   begin
811      --  Generated stub: replace with real body!
812      pragma Compile_Time_Warning (Standard.True, "Inherit unimplemented");
813      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Inherit";
814      return Inherit (Self, Inhs);
815   end Inherit;
816
817   ------------------
818   -- All_Features --
819   ------------------
820
821   overriding function All_Features
822    (Self : not null access constant UML_Enumeration_Proxy)
823       return AMF.UML.Features.Collections.Set_Of_UML_Feature is
824   begin
825      --  Generated stub: replace with real body!
826      pragma Compile_Time_Warning (Standard.True, "All_Features unimplemented");
827      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.All_Features";
828      return All_Features (Self);
829   end All_Features;
830
831   -----------------
832   -- Conforms_To --
833   -----------------
834
835   overriding function Conforms_To
836    (Self : not null access constant UML_Enumeration_Proxy;
837     Other : AMF.UML.Classifiers.UML_Classifier_Access)
838       return Boolean is
839   begin
840      --  Generated stub: replace with real body!
841      pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented");
842      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Conforms_To";
843      return Conforms_To (Self, Other);
844   end Conforms_To;
845
846   -------------
847   -- General --
848   -------------
849
850   overriding function General
851    (Self : not null access constant UML_Enumeration_Proxy)
852       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
853   begin
854      --  Generated stub: replace with real body!
855      pragma Compile_Time_Warning (Standard.True, "General unimplemented");
856      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.General";
857      return General (Self);
858   end General;
859
860   -----------------------
861   -- Has_Visibility_Of --
862   -----------------------
863
864   overriding function Has_Visibility_Of
865    (Self : not null access constant UML_Enumeration_Proxy;
866     N : AMF.UML.Named_Elements.UML_Named_Element_Access)
867       return Boolean is
868   begin
869      --  Generated stub: replace with real body!
870      pragma Compile_Time_Warning (Standard.True, "Has_Visibility_Of unimplemented");
871      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Has_Visibility_Of";
872      return Has_Visibility_Of (Self, N);
873   end Has_Visibility_Of;
874
875   -------------------------
876   -- Inheritable_Members --
877   -------------------------
878
879   overriding function Inheritable_Members
880    (Self : not null access constant UML_Enumeration_Proxy;
881     C : AMF.UML.Classifiers.UML_Classifier_Access)
882       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
883   begin
884      --  Generated stub: replace with real body!
885      pragma Compile_Time_Warning (Standard.True, "Inheritable_Members unimplemented");
886      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Inheritable_Members";
887      return Inheritable_Members (Self, C);
888   end Inheritable_Members;
889
890   ----------------------
891   -- Inherited_Member --
892   ----------------------
893
894   overriding function Inherited_Member
895    (Self : not null access constant UML_Enumeration_Proxy)
896       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
897   begin
898      --  Generated stub: replace with real body!
899      pragma Compile_Time_Warning (Standard.True, "Inherited_Member unimplemented");
900      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Inherited_Member";
901      return Inherited_Member (Self);
902   end Inherited_Member;
903
904   -----------------
905   -- Is_Template --
906   -----------------
907
908   overriding function Is_Template
909    (Self : not null access constant UML_Enumeration_Proxy)
910       return Boolean is
911   begin
912      --  Generated stub: replace with real body!
913      pragma Compile_Time_Warning (Standard.True, "Is_Template unimplemented");
914      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Template";
915      return Is_Template (Self);
916   end Is_Template;
917
918   -------------------------
919   -- May_Specialize_Type --
920   -------------------------
921
922   overriding function May_Specialize_Type
923    (Self : not null access constant UML_Enumeration_Proxy;
924     C : AMF.UML.Classifiers.UML_Classifier_Access)
925       return Boolean is
926   begin
927      --  Generated stub: replace with real body!
928      pragma Compile_Time_Warning (Standard.True, "May_Specialize_Type unimplemented");
929      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.May_Specialize_Type";
930      return May_Specialize_Type (Self, C);
931   end May_Specialize_Type;
932
933   ------------------------
934   -- Exclude_Collisions --
935   ------------------------
936
937   overriding function Exclude_Collisions
938    (Self : not null access constant UML_Enumeration_Proxy;
939     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
940       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
941   begin
942      --  Generated stub: replace with real body!
943      pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented");
944      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Exclude_Collisions";
945      return Exclude_Collisions (Self, Imps);
946   end Exclude_Collisions;
947
948   -------------------------
949   -- Get_Names_Of_Member --
950   -------------------------
951
952   overriding function Get_Names_Of_Member
953    (Self : not null access constant UML_Enumeration_Proxy;
954     Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
955       return AMF.String_Collections.Set_Of_String is
956   begin
957      --  Generated stub: replace with real body!
958      pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented");
959      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Get_Names_Of_Member";
960      return Get_Names_Of_Member (Self, Element);
961   end Get_Names_Of_Member;
962
963   --------------------
964   -- Import_Members --
965   --------------------
966
967   overriding function Import_Members
968    (Self : not null access constant UML_Enumeration_Proxy;
969     Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
970       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
971   begin
972      --  Generated stub: replace with real body!
973      pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented");
974      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Import_Members";
975      return Import_Members (Self, Imps);
976   end Import_Members;
977
978   ---------------------
979   -- Imported_Member --
980   ---------------------
981
982   overriding function Imported_Member
983    (Self : not null access constant UML_Enumeration_Proxy)
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, "Imported_Member unimplemented");
988      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Imported_Member";
989      return Imported_Member (Self);
990   end Imported_Member;
991
992   ---------------------------------
993   -- Members_Are_Distinguishable --
994   ---------------------------------
995
996   overriding function Members_Are_Distinguishable
997    (Self : not null access constant UML_Enumeration_Proxy)
998       return Boolean is
999   begin
1000      --  Generated stub: replace with real body!
1001      pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented");
1002      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Members_Are_Distinguishable";
1003      return Members_Are_Distinguishable (Self);
1004   end Members_Are_Distinguishable;
1005
1006   ------------------
1007   -- Owned_Member --
1008   ------------------
1009
1010   overriding function Owned_Member
1011    (Self : not null access constant UML_Enumeration_Proxy)
1012       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
1013   begin
1014      --  Generated stub: replace with real body!
1015      pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented");
1016      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Owned_Member";
1017      return Owned_Member (Self);
1018   end Owned_Member;
1019
1020   -------------------------
1021   -- All_Owning_Packages --
1022   -------------------------
1023
1024   overriding function All_Owning_Packages
1025    (Self : not null access constant UML_Enumeration_Proxy)
1026       return AMF.UML.Packages.Collections.Set_Of_UML_Package is
1027   begin
1028      --  Generated stub: replace with real body!
1029      pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
1030      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.All_Owning_Packages";
1031      return All_Owning_Packages (Self);
1032   end All_Owning_Packages;
1033
1034   -----------------------------
1035   -- Is_Distinguishable_From --
1036   -----------------------------
1037
1038   overriding function Is_Distinguishable_From
1039    (Self : not null access constant UML_Enumeration_Proxy;
1040     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
1041     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
1042       return Boolean is
1043   begin
1044      --  Generated stub: replace with real body!
1045      pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
1046      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Distinguishable_From";
1047      return Is_Distinguishable_From (Self, N, Ns);
1048   end Is_Distinguishable_From;
1049
1050   ---------------
1051   -- Namespace --
1052   ---------------
1053
1054   overriding function Namespace
1055    (Self : not null access constant UML_Enumeration_Proxy)
1056       return AMF.UML.Namespaces.UML_Namespace_Access is
1057   begin
1058      --  Generated stub: replace with real body!
1059      pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
1060      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Namespace";
1061      return Namespace (Self);
1062   end Namespace;
1063
1064   -----------------
1065   -- Conforms_To --
1066   -----------------
1067
1068   overriding function Conforms_To
1069    (Self : not null access constant UML_Enumeration_Proxy;
1070     Other : AMF.UML.Types.UML_Type_Access)
1071       return Boolean is
1072   begin
1073      --  Generated stub: replace with real body!
1074      pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented");
1075      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Conforms_To";
1076      return Conforms_To (Self, Other);
1077   end Conforms_To;
1078
1079   ------------------------
1080   -- Is_Compatible_With --
1081   ------------------------
1082
1083   overriding function Is_Compatible_With
1084    (Self : not null access constant UML_Enumeration_Proxy;
1085     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
1086       return Boolean is
1087   begin
1088      --  Generated stub: replace with real body!
1089      pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented");
1090      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Compatible_With";
1091      return Is_Compatible_With (Self, P);
1092   end Is_Compatible_With;
1093
1094   ---------------------------
1095   -- Is_Template_Parameter --
1096   ---------------------------
1097
1098   overriding function Is_Template_Parameter
1099    (Self : not null access constant UML_Enumeration_Proxy)
1100       return Boolean is
1101   begin
1102      --  Generated stub: replace with real body!
1103      pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented");
1104      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Template_Parameter";
1105      return Is_Template_Parameter (Self);
1106   end Is_Template_Parameter;
1107
1108   ----------------------------
1109   -- Parameterable_Elements --
1110   ----------------------------
1111
1112   overriding function Parameterable_Elements
1113    (Self : not null access constant UML_Enumeration_Proxy)
1114       return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element is
1115   begin
1116      --  Generated stub: replace with real body!
1117      pragma Compile_Time_Warning (Standard.True, "Parameterable_Elements unimplemented");
1118      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Parameterable_Elements";
1119      return Parameterable_Elements (Self);
1120   end Parameterable_Elements;
1121
1122   ------------------------
1123   -- Is_Consistent_With --
1124   ------------------------
1125
1126   overriding function Is_Consistent_With
1127    (Self : not null access constant UML_Enumeration_Proxy;
1128     Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
1129       return Boolean is
1130   begin
1131      --  Generated stub: replace with real body!
1132      pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented");
1133      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Consistent_With";
1134      return Is_Consistent_With (Self, Redefinee);
1135   end Is_Consistent_With;
1136
1137   -----------------------------------
1138   -- Is_Redefinition_Context_Valid --
1139   -----------------------------------
1140
1141   overriding function Is_Redefinition_Context_Valid
1142    (Self : not null access constant UML_Enumeration_Proxy;
1143     Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
1144       return Boolean is
1145   begin
1146      --  Generated stub: replace with real body!
1147      pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
1148      raise Program_Error with "Unimplemented procedure UML_Enumeration_Proxy.Is_Redefinition_Context_Valid";
1149      return Is_Redefinition_Context_Valid (Self, Redefined);
1150   end Is_Redefinition_Context_Valid;
1151
1152end AMF.Internals.UML_Enumerations;
1153