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