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: 2864 $ $Date: 2012-04-13 14:08:07 +0400 (Fri, 13 Apr 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Elements;
45with AMF.UML.Element_Imports;
46with AMF.UML.Elements.Collections;
47with AMF.UML.Namespaces;
48with AMF.UML.Packageable_Elements;
49with AMF.Visitors;
50
51package AMF.Internals.UML_Element_Imports is
52
53   type UML_Element_Import_Proxy is
54     limited new AMF.Internals.UML_Elements.UML_Element_Proxy
55       and AMF.UML.Element_Imports.UML_Element_Import with null record;
56
57   overriding function Get_Alias
58    (Self : not null access constant UML_Element_Import_Proxy)
59       return AMF.Optional_String;
60   --  Getter of ElementImport::alias.
61   --
62   --  Specifies the name that should be added to the namespace of the
63   --  importing package in lieu of the name of the imported packagable
64   --  element. The aliased name must not clash with any other member name in
65   --  the importing package. By default, no alias is used.
66
67   overriding procedure Set_Alias
68    (Self : not null access UML_Element_Import_Proxy;
69     To   : AMF.Optional_String);
70   --  Setter of ElementImport::alias.
71   --
72   --  Specifies the name that should be added to the namespace of the
73   --  importing package in lieu of the name of the imported packagable
74   --  element. The aliased name must not clash with any other member name in
75   --  the importing package. By default, no alias is used.
76
77   overriding function Get_Imported_Element
78    (Self : not null access constant UML_Element_Import_Proxy)
79       return AMF.UML.Packageable_Elements.UML_Packageable_Element_Access;
80   --  Getter of ElementImport::importedElement.
81   --
82   --  Specifies the PackageableElement whose name is to be added to a
83   --  Namespace.
84
85   overriding procedure Set_Imported_Element
86    (Self : not null access UML_Element_Import_Proxy;
87     To   : AMF.UML.Packageable_Elements.UML_Packageable_Element_Access);
88   --  Setter of ElementImport::importedElement.
89   --
90   --  Specifies the PackageableElement whose name is to be added to a
91   --  Namespace.
92
93   overriding function Get_Importing_Namespace
94    (Self : not null access constant UML_Element_Import_Proxy)
95       return AMF.UML.Namespaces.UML_Namespace_Access;
96   --  Getter of ElementImport::importingNamespace.
97   --
98   --  Specifies the Namespace that imports a PackageableElement from another
99   --  Package.
100
101   overriding procedure Set_Importing_Namespace
102    (Self : not null access UML_Element_Import_Proxy;
103     To   : AMF.UML.Namespaces.UML_Namespace_Access);
104   --  Setter of ElementImport::importingNamespace.
105   --
106   --  Specifies the Namespace that imports a PackageableElement from another
107   --  Package.
108
109   overriding function Get_Visibility
110    (Self : not null access constant UML_Element_Import_Proxy)
111       return AMF.UML.UML_Visibility_Kind;
112   --  Getter of ElementImport::visibility.
113   --
114   --  Specifies the visibility of the imported PackageableElement within the
115   --  importing Package. The default visibility is the same as that of the
116   --  imported element. If the imported element does not have a visibility,
117   --  it is possible to add visibility to the element import.
118
119   overriding procedure Set_Visibility
120    (Self : not null access UML_Element_Import_Proxy;
121     To   : AMF.UML.UML_Visibility_Kind);
122   --  Setter of ElementImport::visibility.
123   --
124   --  Specifies the visibility of the imported PackageableElement within the
125   --  importing Package. The default visibility is the same as that of the
126   --  imported element. If the imported element does not have a visibility,
127   --  it is possible to add visibility to the element import.
128
129   overriding function Get_Source
130    (Self : not null access constant UML_Element_Import_Proxy)
131       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
132   --  Getter of DirectedRelationship::source.
133   --
134   --  Specifies the sources of the DirectedRelationship.
135
136   overriding function Get_Target
137    (Self : not null access constant UML_Element_Import_Proxy)
138       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
139   --  Getter of DirectedRelationship::target.
140   --
141   --  Specifies the targets of the DirectedRelationship.
142
143   overriding function Get_Related_Element
144    (Self : not null access constant UML_Element_Import_Proxy)
145       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
146   --  Getter of Relationship::relatedElement.
147   --
148   --  Specifies the elements related by the Relationship.
149
150   overriding function Get_Name
151    (Self : not null access constant UML_Element_Import_Proxy)
152       return League.Strings.Universal_String;
153   --  Operation ElementImport::getName.
154   --
155   --  The query getName() returns the name under which the imported
156   --  PackageableElement will be known in the importing namespace.
157
158   overriding procedure Enter_Element
159    (Self    : not null access constant UML_Element_Import_Proxy;
160     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
161     Control : in out AMF.Visitors.Traverse_Control);
162   --  Dispatch call to corresponding subprogram of visitor interface.
163
164   overriding procedure Leave_Element
165    (Self    : not null access constant UML_Element_Import_Proxy;
166     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
167     Control : in out AMF.Visitors.Traverse_Control);
168   --  Dispatch call to corresponding subprogram of visitor interface.
169
170   overriding procedure Visit_Element
171    (Self     : not null access constant UML_Element_Import_Proxy;
172     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
173     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
174     Control  : in out AMF.Visitors.Traverse_Control);
175   --  Dispatch call to corresponding subprogram of iterator interface.
176
177end AMF.Internals.UML_Element_Imports;
178