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------------------------------------------------------------------------------
44--  This file is generated, don't edit it.
45------------------------------------------------------------------------------
46with AMF.Elements;
47with AMF.Internals.Element_Collections;
48with AMF.Internals.Helpers;
49with AMF.Internals.Tables.UML_Attributes;
50with AMF.Visitors.UML_Iterators;
51with AMF.Visitors.UML_Visitors;
52with League.Strings.Internals;
53with Matreshka.Internals.Strings;
54
55package body AMF.Internals.UML_Interface_Realizations is
56
57   -------------------
58   -- Enter_Element --
59   -------------------
60
61   overriding procedure Enter_Element
62    (Self    : not null access constant UML_Interface_Realization_Proxy;
63     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
64     Control : in out AMF.Visitors.Traverse_Control) is
65   begin
66      if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
67         AMF.Visitors.UML_Visitors.UML_Visitor'Class
68          (Visitor).Enter_Interface_Realization
69            (AMF.UML.Interface_Realizations.UML_Interface_Realization_Access (Self),
70           Control);
71      end if;
72   end Enter_Element;
73
74   -------------------
75   -- Leave_Element --
76   -------------------
77
78   overriding procedure Leave_Element
79    (Self    : not null access constant UML_Interface_Realization_Proxy;
80     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
81     Control : in out AMF.Visitors.Traverse_Control) is
82   begin
83      if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
84         AMF.Visitors.UML_Visitors.UML_Visitor'Class
85          (Visitor).Leave_Interface_Realization
86            (AMF.UML.Interface_Realizations.UML_Interface_Realization_Access (Self),
87           Control);
88      end if;
89   end Leave_Element;
90
91   -------------------
92   -- Visit_Element --
93   -------------------
94
95   overriding procedure Visit_Element
96    (Self     : not null access constant UML_Interface_Realization_Proxy;
97     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
98     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
99     Control  : in out AMF.Visitors.Traverse_Control) is
100   begin
101      if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
102         AMF.Visitors.UML_Iterators.UML_Iterator'Class
103          (Iterator).Visit_Interface_Realization
104            (Visitor,
105             AMF.UML.Interface_Realizations.UML_Interface_Realization_Access (Self),
106             Control);
107      end if;
108   end Visit_Element;
109
110   ------------------
111   -- Get_Contract --
112   ------------------
113
114   overriding function Get_Contract
115    (Self : not null access constant UML_Interface_Realization_Proxy)
116       return AMF.UML.Interfaces.UML_Interface_Access is
117   begin
118      return
119        AMF.UML.Interfaces.UML_Interface_Access
120         (AMF.Internals.Helpers.To_Element
121           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Contract
122             (Self.Element)));
123   end Get_Contract;
124
125   ------------------
126   -- Set_Contract --
127   ------------------
128
129   overriding procedure Set_Contract
130    (Self : not null access UML_Interface_Realization_Proxy;
131     To   : AMF.UML.Interfaces.UML_Interface_Access) is
132   begin
133      AMF.Internals.Tables.UML_Attributes.Internal_Set_Contract
134       (Self.Element,
135        AMF.Internals.Helpers.To_Element
136         (AMF.Elements.Element_Access (To)));
137   end Set_Contract;
138
139   ---------------------------------
140   -- Get_Implementing_Classifier --
141   ---------------------------------
142
143   overriding function Get_Implementing_Classifier
144    (Self : not null access constant UML_Interface_Realization_Proxy)
145       return AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access is
146   begin
147      return
148        AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access
149         (AMF.Internals.Helpers.To_Element
150           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Implementing_Classifier
151             (Self.Element)));
152   end Get_Implementing_Classifier;
153
154   ---------------------------------
155   -- Set_Implementing_Classifier --
156   ---------------------------------
157
158   overriding procedure Set_Implementing_Classifier
159    (Self : not null access UML_Interface_Realization_Proxy;
160     To   : AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access) is
161   begin
162      AMF.Internals.Tables.UML_Attributes.Internal_Set_Implementing_Classifier
163       (Self.Element,
164        AMF.Internals.Helpers.To_Element
165         (AMF.Elements.Element_Access (To)));
166   end Set_Implementing_Classifier;
167
168   -----------------
169   -- Get_Mapping --
170   -----------------
171
172   overriding function Get_Mapping
173    (Self : not null access constant UML_Interface_Realization_Proxy)
174       return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access is
175   begin
176      return
177        AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access
178         (AMF.Internals.Helpers.To_Element
179           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Mapping
180             (Self.Element)));
181   end Get_Mapping;
182
183   -----------------
184   -- Set_Mapping --
185   -----------------
186
187   overriding procedure Set_Mapping
188    (Self : not null access UML_Interface_Realization_Proxy;
189     To   : AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access) is
190   begin
191      AMF.Internals.Tables.UML_Attributes.Internal_Set_Mapping
192       (Self.Element,
193        AMF.Internals.Helpers.To_Element
194         (AMF.Elements.Element_Access (To)));
195   end Set_Mapping;
196
197   ----------------
198   -- Get_Client --
199   ----------------
200
201   overriding function Get_Client
202    (Self : not null access constant UML_Interface_Realization_Proxy)
203       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
204   begin
205      return
206        AMF.UML.Named_Elements.Collections.Wrap
207         (AMF.Internals.Element_Collections.Wrap
208           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client
209             (Self.Element)));
210   end Get_Client;
211
212   ------------------
213   -- Get_Supplier --
214   ------------------
215
216   overriding function Get_Supplier
217    (Self : not null access constant UML_Interface_Realization_Proxy)
218       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
219   begin
220      return
221        AMF.UML.Named_Elements.Collections.Wrap
222         (AMF.Internals.Element_Collections.Wrap
223           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Supplier
224             (Self.Element)));
225   end Get_Supplier;
226
227   ----------------
228   -- Get_Source --
229   ----------------
230
231   overriding function Get_Source
232    (Self : not null access constant UML_Interface_Realization_Proxy)
233       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
234   begin
235      return
236        AMF.UML.Elements.Collections.Wrap
237         (AMF.Internals.Element_Collections.Wrap
238           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Source
239             (Self.Element)));
240   end Get_Source;
241
242   ----------------
243   -- Get_Target --
244   ----------------
245
246   overriding function Get_Target
247    (Self : not null access constant UML_Interface_Realization_Proxy)
248       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
249   begin
250      return
251        AMF.UML.Elements.Collections.Wrap
252         (AMF.Internals.Element_Collections.Wrap
253           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Target
254             (Self.Element)));
255   end Get_Target;
256
257   -------------------------
258   -- Get_Related_Element --
259   -------------------------
260
261   overriding function Get_Related_Element
262    (Self : not null access constant UML_Interface_Realization_Proxy)
263       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
264   begin
265      return
266        AMF.UML.Elements.Collections.Wrap
267         (AMF.Internals.Element_Collections.Wrap
268           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Related_Element
269             (Self.Element)));
270   end Get_Related_Element;
271
272   ---------------------------
273   -- Get_Client_Dependency --
274   ---------------------------
275
276   overriding function Get_Client_Dependency
277    (Self : not null access constant UML_Interface_Realization_Proxy)
278       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
279   begin
280      return
281        AMF.UML.Dependencies.Collections.Wrap
282         (AMF.Internals.Element_Collections.Wrap
283           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
284             (Self.Element)));
285   end Get_Client_Dependency;
286
287   -------------------------
288   -- Get_Name_Expression --
289   -------------------------
290
291   overriding function Get_Name_Expression
292    (Self : not null access constant UML_Interface_Realization_Proxy)
293       return AMF.UML.String_Expressions.UML_String_Expression_Access is
294   begin
295      return
296        AMF.UML.String_Expressions.UML_String_Expression_Access
297         (AMF.Internals.Helpers.To_Element
298           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
299             (Self.Element)));
300   end Get_Name_Expression;
301
302   -------------------------
303   -- Set_Name_Expression --
304   -------------------------
305
306   overriding procedure Set_Name_Expression
307    (Self : not null access UML_Interface_Realization_Proxy;
308     To   : AMF.UML.String_Expressions.UML_String_Expression_Access) is
309   begin
310      AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
311       (Self.Element,
312        AMF.Internals.Helpers.To_Element
313         (AMF.Elements.Element_Access (To)));
314   end Set_Name_Expression;
315
316   -------------------
317   -- Get_Namespace --
318   -------------------
319
320   overriding function Get_Namespace
321    (Self : not null access constant UML_Interface_Realization_Proxy)
322       return AMF.UML.Namespaces.UML_Namespace_Access is
323   begin
324      return
325        AMF.UML.Namespaces.UML_Namespace_Access
326         (AMF.Internals.Helpers.To_Element
327           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
328             (Self.Element)));
329   end Get_Namespace;
330
331   ------------------------
332   -- Get_Qualified_Name --
333   ------------------------
334
335   overriding function Get_Qualified_Name
336    (Self : not null access constant UML_Interface_Realization_Proxy)
337       return AMF.Optional_String is
338   begin
339      declare
340         use type Matreshka.Internals.Strings.Shared_String_Access;
341
342         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
343           := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
344
345      begin
346         if Aux = null then
347            return (Is_Empty => True);
348
349         else
350            return (False, League.Strings.Internals.Create (Aux));
351         end if;
352      end;
353   end Get_Qualified_Name;
354
355   -----------------------------------
356   -- Get_Owning_Template_Parameter --
357   -----------------------------------
358
359   overriding function Get_Owning_Template_Parameter
360    (Self : not null access constant UML_Interface_Realization_Proxy)
361       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
362   begin
363      return
364        AMF.UML.Template_Parameters.UML_Template_Parameter_Access
365         (AMF.Internals.Helpers.To_Element
366           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter
367             (Self.Element)));
368   end Get_Owning_Template_Parameter;
369
370   -----------------------------------
371   -- Set_Owning_Template_Parameter --
372   -----------------------------------
373
374   overriding procedure Set_Owning_Template_Parameter
375    (Self : not null access UML_Interface_Realization_Proxy;
376     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
377   begin
378      AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter
379       (Self.Element,
380        AMF.Internals.Helpers.To_Element
381         (AMF.Elements.Element_Access (To)));
382   end Set_Owning_Template_Parameter;
383
384   ----------------------------
385   -- Get_Template_Parameter --
386   ----------------------------
387
388   overriding function Get_Template_Parameter
389    (Self : not null access constant UML_Interface_Realization_Proxy)
390       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
391   begin
392      return
393        AMF.UML.Template_Parameters.UML_Template_Parameter_Access
394         (AMF.Internals.Helpers.To_Element
395           (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
396             (Self.Element)));
397   end Get_Template_Parameter;
398
399   ----------------------------
400   -- Set_Template_Parameter --
401   ----------------------------
402
403   overriding procedure Set_Template_Parameter
404    (Self : not null access UML_Interface_Realization_Proxy;
405     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
406   begin
407      AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
408       (Self.Element,
409        AMF.Internals.Helpers.To_Element
410         (AMF.Elements.Element_Access (To)));
411   end Set_Template_Parameter;
412
413   -------------------------
414   -- All_Owning_Packages --
415   -------------------------
416
417   overriding function All_Owning_Packages
418    (Self : not null access constant UML_Interface_Realization_Proxy)
419       return AMF.UML.Packages.Collections.Set_Of_UML_Package is
420   begin
421      --  Generated stub: replace with real body!
422      pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
423      raise Program_Error with "Unimplemented procedure UML_Interface_Realization_Proxy.All_Owning_Packages";
424      return All_Owning_Packages (Self);
425   end All_Owning_Packages;
426
427   -----------------------------
428   -- Is_Distinguishable_From --
429   -----------------------------
430
431   overriding function Is_Distinguishable_From
432    (Self : not null access constant UML_Interface_Realization_Proxy;
433     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
434     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
435       return Boolean is
436   begin
437      --  Generated stub: replace with real body!
438      pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
439      raise Program_Error with "Unimplemented procedure UML_Interface_Realization_Proxy.Is_Distinguishable_From";
440      return Is_Distinguishable_From (Self, N, Ns);
441   end Is_Distinguishable_From;
442
443   ---------------
444   -- Namespace --
445   ---------------
446
447   overriding function Namespace
448    (Self : not null access constant UML_Interface_Realization_Proxy)
449       return AMF.UML.Namespaces.UML_Namespace_Access is
450   begin
451      --  Generated stub: replace with real body!
452      pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
453      raise Program_Error with "Unimplemented procedure UML_Interface_Realization_Proxy.Namespace";
454      return Namespace (Self);
455   end Namespace;
456
457   ------------------------
458   -- Is_Compatible_With --
459   ------------------------
460
461   overriding function Is_Compatible_With
462    (Self : not null access constant UML_Interface_Realization_Proxy;
463     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
464       return Boolean is
465   begin
466      --  Generated stub: replace with real body!
467      pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented");
468      raise Program_Error with "Unimplemented procedure UML_Interface_Realization_Proxy.Is_Compatible_With";
469      return Is_Compatible_With (Self, P);
470   end Is_Compatible_With;
471
472   ---------------------------
473   -- Is_Template_Parameter --
474   ---------------------------
475
476   overriding function Is_Template_Parameter
477    (Self : not null access constant UML_Interface_Realization_Proxy)
478       return Boolean is
479   begin
480      --  Generated stub: replace with real body!
481      pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented");
482      raise Program_Error with "Unimplemented procedure UML_Interface_Realization_Proxy.Is_Template_Parameter";
483      return Is_Template_Parameter (Self);
484   end Is_Template_Parameter;
485
486end AMF.Internals.UML_Interface_Realizations;
487