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