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