1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                          Ada Modeling Framework                          --
6--                                                                          --
7--                        Runtime Library Component                         --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com>                     --
12-- All rights reserved.                                                     --
13--                                                                          --
14-- Redistribution and use in source and binary forms, with or without       --
15-- modification, are permitted provided that the following conditions       --
16-- are met:                                                                 --
17--                                                                          --
18--  * Redistributions of source code must retain the above copyright        --
19--    notice, this list of conditions and the following disclaimer.         --
20--                                                                          --
21--  * Redistributions in binary form must reproduce the above copyright     --
22--    notice, this list of conditions and the following disclaimer in the   --
23--    documentation and/or other materials provided with the distribution.  --
24--                                                                          --
25--  * Neither the name of the Vadim Godunko, IE nor the names of its        --
26--    contributors may be used to endorse or promote products derived from  --
27--    this software without specific prior written permission.              --
28--                                                                          --
29-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      --
30-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        --
31-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR    --
32-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT     --
33-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   --
34-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
35-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR   --
36-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF   --
37-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING     --
38-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS       --
39-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.             --
40--                                                                          --
41------------------------------------------------------------------------------
42--  $Revision: 2671 $ $Date: 2012-03-23 00:51:37 +0400 (Fri, 23 Mar 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.OCL_Attributes;
50with AMF.OCL.Tuple_Literal_Parts.Collections;
51with AMF.UML.Comments.Collections;
52with AMF.UML.Dependencies.Collections;
53with AMF.UML.Elements.Collections;
54with AMF.UML.Named_Elements;
55with AMF.UML.Namespaces.Collections;
56with AMF.UML.Packages.Collections;
57with AMF.UML.String_Expressions;
58with AMF.UML.Types;
59with AMF.Visitors.OCL_Iterators;
60with AMF.Visitors.OCL_Visitors;
61with League.Strings.Internals;
62with Matreshka.Internals.Strings;
63
64package body AMF.Internals.OCL_Tuple_Literal_Exps is
65
66   --------------
67   -- Get_Part --
68   --------------
69
70   overriding function Get_Part
71    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
72       return AMF.OCL.Tuple_Literal_Parts.Collections.Ordered_Set_Of_OCL_Tuple_Literal_Part is
73   begin
74      return
75        AMF.OCL.Tuple_Literal_Parts.Collections.Wrap
76         (AMF.Internals.Element_Collections.Wrap
77           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Part
78             (Self.Element)));
79   end Get_Part;
80
81   --------------
82   -- Get_Type --
83   --------------
84
85   overriding function Get_Type
86    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
87       return AMF.UML.Types.UML_Type_Access is
88   begin
89      return
90        AMF.UML.Types.UML_Type_Access
91         (AMF.Internals.Helpers.To_Element
92           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Type
93             (Self.Element)));
94   end Get_Type;
95
96   --------------
97   -- Set_Type --
98   --------------
99
100   overriding procedure Set_Type
101    (Self : not null access OCL_Tuple_Literal_Exp_Proxy;
102     To   : AMF.UML.Types.UML_Type_Access) is
103   begin
104      AMF.Internals.Tables.OCL_Attributes.Internal_Set_Type
105       (Self.Element,
106        AMF.Internals.Helpers.To_Element
107         (AMF.Elements.Element_Access (To)));
108   end Set_Type;
109
110   ---------------------------
111   -- Get_Client_Dependency --
112   ---------------------------
113
114   overriding function Get_Client_Dependency
115    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
116       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
117   begin
118      return
119        AMF.UML.Dependencies.Collections.Wrap
120         (AMF.Internals.Element_Collections.Wrap
121           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Client_Dependency
122             (Self.Element)));
123   end Get_Client_Dependency;
124
125   --------------
126   -- Get_Name --
127   --------------
128
129   overriding function Get_Name
130    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
131       return AMF.Optional_String is
132   begin
133      declare
134         use type Matreshka.Internals.Strings.Shared_String_Access;
135
136         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
137           := AMF.Internals.Tables.OCL_Attributes.Internal_Get_Name (Self.Element);
138
139      begin
140         if Aux = null then
141            return (Is_Empty => True);
142
143         else
144            return (False, League.Strings.Internals.Create (Aux));
145         end if;
146      end;
147   end Get_Name;
148
149   --------------
150   -- Set_Name --
151   --------------
152
153   overriding procedure Set_Name
154    (Self : not null access OCL_Tuple_Literal_Exp_Proxy;
155     To   : AMF.Optional_String) is
156   begin
157      if To.Is_Empty then
158         AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name
159          (Self.Element, null);
160
161      else
162         AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name
163          (Self.Element,
164           League.Strings.Internals.Internal (To.Value));
165      end if;
166   end Set_Name;
167
168   -------------------------
169   -- Get_Name_Expression --
170   -------------------------
171
172   overriding function Get_Name_Expression
173    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
174       return AMF.UML.String_Expressions.UML_String_Expression_Access is
175   begin
176      return
177        AMF.UML.String_Expressions.UML_String_Expression_Access
178         (AMF.Internals.Helpers.To_Element
179           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Name_Expression
180             (Self.Element)));
181   end Get_Name_Expression;
182
183   -------------------------
184   -- Set_Name_Expression --
185   -------------------------
186
187   overriding procedure Set_Name_Expression
188    (Self : not null access OCL_Tuple_Literal_Exp_Proxy;
189     To   : AMF.UML.String_Expressions.UML_String_Expression_Access) is
190   begin
191      AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name_Expression
192       (Self.Element,
193        AMF.Internals.Helpers.To_Element
194         (AMF.Elements.Element_Access (To)));
195   end Set_Name_Expression;
196
197   -------------------
198   -- Get_Namespace --
199   -------------------
200
201   overriding function Get_Namespace
202    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
203       return AMF.UML.Namespaces.UML_Namespace_Access is
204   begin
205      return
206        AMF.UML.Namespaces.UML_Namespace_Access
207         (AMF.Internals.Helpers.To_Element
208           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Namespace
209             (Self.Element)));
210   end Get_Namespace;
211
212   ------------------------
213   -- Get_Qualified_Name --
214   ------------------------
215
216   overriding function Get_Qualified_Name
217    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
218       return AMF.Optional_String is
219   begin
220      declare
221         use type Matreshka.Internals.Strings.Shared_String_Access;
222
223         Aux : constant Matreshka.Internals.Strings.Shared_String_Access
224           := AMF.Internals.Tables.OCL_Attributes.Internal_Get_Qualified_Name (Self.Element);
225
226      begin
227         if Aux = null then
228            return (Is_Empty => True);
229
230         else
231            return (False, League.Strings.Internals.Create (Aux));
232         end if;
233      end;
234   end Get_Qualified_Name;
235
236   --------------------
237   -- Get_Visibility --
238   --------------------
239
240   overriding function Get_Visibility
241    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
242       return AMF.UML.Optional_UML_Visibility_Kind is
243   begin
244      return
245        AMF.Internals.Tables.OCL_Attributes.Internal_Get_Visibility
246         (Self.Element);
247   end Get_Visibility;
248
249   --------------------
250   -- Set_Visibility --
251   --------------------
252
253   overriding procedure Set_Visibility
254    (Self : not null access OCL_Tuple_Literal_Exp_Proxy;
255     To   : AMF.UML.Optional_UML_Visibility_Kind) is
256   begin
257      AMF.Internals.Tables.OCL_Attributes.Internal_Set_Visibility
258       (Self.Element, To);
259   end Set_Visibility;
260
261   -----------------------
262   -- Get_Owned_Comment --
263   -----------------------
264
265   overriding function Get_Owned_Comment
266    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
267       return AMF.UML.Comments.Collections.Set_Of_UML_Comment is
268   begin
269      return
270        AMF.UML.Comments.Collections.Wrap
271         (AMF.Internals.Element_Collections.Wrap
272           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Comment
273             (Self.Element)));
274   end Get_Owned_Comment;
275
276   -----------------------
277   -- Get_Owned_Element --
278   -----------------------
279
280   overriding function Get_Owned_Element
281    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
282       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
283   begin
284      return
285        AMF.UML.Elements.Collections.Wrap
286         (AMF.Internals.Element_Collections.Wrap
287           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Element
288             (Self.Element)));
289   end Get_Owned_Element;
290
291   ---------------
292   -- Get_Owner --
293   ---------------
294
295   overriding function Get_Owner
296    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
297       return AMF.UML.Elements.UML_Element_Access is
298   begin
299      return
300        AMF.UML.Elements.UML_Element_Access
301         (AMF.Internals.Helpers.To_Element
302           (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owner
303             (Self.Element)));
304   end Get_Owner;
305
306   --------------------
307   -- All_Namespaces --
308   --------------------
309
310   overriding function All_Namespaces
311    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
312       return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is
313   begin
314      --  Generated stub: replace with real body!
315      pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented");
316      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.All_Namespaces";
317      return All_Namespaces (Self);
318   end All_Namespaces;
319
320   -------------------------
321   -- All_Owning_Packages --
322   -------------------------
323
324   overriding function All_Owning_Packages
325    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
326       return AMF.UML.Packages.Collections.Set_Of_UML_Package is
327   begin
328      --  Generated stub: replace with real body!
329      pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
330      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.All_Owning_Packages";
331      return All_Owning_Packages (Self);
332   end All_Owning_Packages;
333
334   -----------------------------
335   -- Is_Distinguishable_From --
336   -----------------------------
337
338   overriding function Is_Distinguishable_From
339    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy;
340     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
341     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
342       return Boolean is
343   begin
344      --  Generated stub: replace with real body!
345      pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
346      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.Is_Distinguishable_From";
347      return Is_Distinguishable_From (Self, N, Ns);
348   end Is_Distinguishable_From;
349
350   ---------------
351   -- Namespace --
352   ---------------
353
354   overriding function Namespace
355    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
356       return AMF.UML.Namespaces.UML_Namespace_Access is
357   begin
358      --  Generated stub: replace with real body!
359      pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
360      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.Namespace";
361      return Namespace (Self);
362   end Namespace;
363
364   --------------------
365   -- Qualified_Name --
366   --------------------
367
368   overriding function Qualified_Name
369    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
370       return League.Strings.Universal_String is
371   begin
372      --  Generated stub: replace with real body!
373      pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented");
374      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.Qualified_Name";
375      return Qualified_Name (Self);
376   end Qualified_Name;
377
378   ---------------
379   -- Separator --
380   ---------------
381
382   overriding function Separator
383    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
384       return League.Strings.Universal_String is
385   begin
386      --  Generated stub: replace with real body!
387      pragma Compile_Time_Warning (Standard.True, "Separator unimplemented");
388      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.Separator";
389      return Separator (Self);
390   end Separator;
391
392   ------------------------
393   -- All_Owned_Elements --
394   ------------------------
395
396   overriding function All_Owned_Elements
397    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
398       return AMF.UML.Elements.Collections.Set_Of_UML_Element is
399   begin
400      --  Generated stub: replace with real body!
401      pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented");
402      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.All_Owned_Elements";
403      return All_Owned_Elements (Self);
404   end All_Owned_Elements;
405
406   -------------------
407   -- Must_Be_Owned --
408   -------------------
409
410   overriding function Must_Be_Owned
411    (Self : not null access constant OCL_Tuple_Literal_Exp_Proxy)
412       return Boolean is
413   begin
414      --  Generated stub: replace with real body!
415      pragma Compile_Time_Warning (Standard.True, "Must_Be_Owned unimplemented");
416      raise Program_Error with "Unimplemented procedure OCL_Tuple_Literal_Exp_Proxy.Must_Be_Owned";
417      return Must_Be_Owned (Self);
418   end Must_Be_Owned;
419
420   -------------------
421   -- Enter_Element --
422   -------------------
423
424   overriding procedure Enter_Element
425    (Self    : not null access constant OCL_Tuple_Literal_Exp_Proxy;
426     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
427     Control : in out AMF.Visitors.Traverse_Control) is
428   begin
429      if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then
430         AMF.Visitors.OCL_Visitors.OCL_Visitor'Class
431          (Visitor).Enter_Tuple_Literal_Exp
432            (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (Self),
433           Control);
434      end if;
435   end Enter_Element;
436
437   -------------------
438   -- Leave_Element --
439   -------------------
440
441   overriding procedure Leave_Element
442    (Self    : not null access constant OCL_Tuple_Literal_Exp_Proxy;
443     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
444     Control : in out AMF.Visitors.Traverse_Control) is
445   begin
446      if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then
447         AMF.Visitors.OCL_Visitors.OCL_Visitor'Class
448          (Visitor).Leave_Tuple_Literal_Exp
449            (AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (Self),
450           Control);
451      end if;
452   end Leave_Element;
453
454   -------------------
455   -- Visit_Element --
456   -------------------
457
458   overriding procedure Visit_Element
459    (Self     : not null access constant OCL_Tuple_Literal_Exp_Proxy;
460     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
461     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
462     Control  : in out AMF.Visitors.Traverse_Control) is
463   begin
464      if Iterator in AMF.Visitors.OCL_Iterators.OCL_Iterator'Class then
465         AMF.Visitors.OCL_Iterators.OCL_Iterator'Class
466          (Iterator).Visit_Tuple_Literal_Exp
467            (Visitor,
468             AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access (Self),
469           Control);
470      end if;
471   end Visit_Element;
472
473end AMF.Internals.OCL_Tuple_Literal_Exps;
474