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------------------------------------------------------------------------------
44with AMF.Internals.UML_Packageable_Elements;
45with AMF.UML.Classifiers.Collections;
46with AMF.UML.Dependencies.Collections;
47with AMF.UML.Deployments.Collections;
48with AMF.UML.Enumeration_Literals;
49with AMF.UML.Enumerations;
50with AMF.UML.Named_Elements;
51with AMF.UML.Namespaces;
52with AMF.UML.Packageable_Elements.Collections;
53with AMF.UML.Packages.Collections;
54with AMF.UML.Parameterable_Elements;
55with AMF.UML.Slots.Collections;
56with AMF.UML.String_Expressions;
57with AMF.UML.Template_Parameters;
58with AMF.UML.Value_Specifications;
59with AMF.Visitors;
60
61package AMF.Internals.UML_Enumeration_Literals is
62
63   type UML_Enumeration_Literal_Proxy is
64     limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy
65       and AMF.UML.Enumeration_Literals.UML_Enumeration_Literal with null record;
66
67   overriding function Get_Classifier
68    (Self : not null access constant UML_Enumeration_Literal_Proxy)
69       return AMF.UML.Enumerations.UML_Enumeration_Access;
70   --  Getter of EnumerationLiteral::classifier.
71   --
72   --  The classifier of this EnumerationLiteral derived to be equal to its
73   --  enumeration.
74
75   overriding function Get_Enumeration
76    (Self : not null access constant UML_Enumeration_Literal_Proxy)
77       return AMF.UML.Enumerations.UML_Enumeration_Access;
78   --  Getter of EnumerationLiteral::enumeration.
79   --
80   --  The Enumeration that this EnumerationLiteral is a member of.
81
82   overriding procedure Set_Enumeration
83    (Self : not null access UML_Enumeration_Literal_Proxy;
84     To   : AMF.UML.Enumerations.UML_Enumeration_Access);
85   --  Setter of EnumerationLiteral::enumeration.
86   --
87   --  The Enumeration that this EnumerationLiteral is a member of.
88
89   overriding function Get_Classifier
90    (Self : not null access constant UML_Enumeration_Literal_Proxy)
91       return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
92   --  Getter of InstanceSpecification::classifier.
93   --
94   --  The classifier or classifiers of the represented instance. If multiple
95   --  classifiers are specified, the instance is classified by all of them.
96
97   overriding function Get_Slot
98    (Self : not null access constant UML_Enumeration_Literal_Proxy)
99       return AMF.UML.Slots.Collections.Set_Of_UML_Slot;
100   --  Getter of InstanceSpecification::slot.
101   --
102   --  A slot giving the value or values of a structural feature of the
103   --  instance. An instance specification can have one slot per structural
104   --  feature of its classifiers, including inherited features. It is not
105   --  necessary to model a slot for each structural feature, in which case
106   --  the instance specification is a partial description.
107
108   overriding function Get_Specification
109    (Self : not null access constant UML_Enumeration_Literal_Proxy)
110       return AMF.UML.Value_Specifications.UML_Value_Specification_Access;
111   --  Getter of InstanceSpecification::specification.
112   --
113   --  A specification of how to compute, derive, or construct the instance.
114
115   overriding procedure Set_Specification
116    (Self : not null access UML_Enumeration_Literal_Proxy;
117     To   : AMF.UML.Value_Specifications.UML_Value_Specification_Access);
118   --  Setter of InstanceSpecification::specification.
119   --
120   --  A specification of how to compute, derive, or construct the instance.
121
122   overriding function Get_Deployed_Element
123    (Self : not null access constant UML_Enumeration_Literal_Proxy)
124       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
125   --  Getter of DeploymentTarget::deployedElement.
126   --
127   --  The set of elements that are manifested in an Artifact that is involved
128   --  in Deployment to a DeploymentTarget.
129
130   overriding function Get_Deployment
131    (Self : not null access constant UML_Enumeration_Literal_Proxy)
132       return AMF.UML.Deployments.Collections.Set_Of_UML_Deployment;
133   --  Getter of DeploymentTarget::deployment.
134   --
135   --  The set of Deployments for a DeploymentTarget.
136
137   overriding function Get_Client_Dependency
138    (Self : not null access constant UML_Enumeration_Literal_Proxy)
139       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
140   --  Getter of NamedElement::clientDependency.
141   --
142   --  Indicates the dependencies that reference the client.
143
144   overriding function Get_Name_Expression
145    (Self : not null access constant UML_Enumeration_Literal_Proxy)
146       return AMF.UML.String_Expressions.UML_String_Expression_Access;
147   --  Getter of NamedElement::nameExpression.
148   --
149   --  The string expression used to define the name of this named element.
150
151   overriding procedure Set_Name_Expression
152    (Self : not null access UML_Enumeration_Literal_Proxy;
153     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
154   --  Setter of NamedElement::nameExpression.
155   --
156   --  The string expression used to define the name of this named element.
157
158   overriding function Get_Namespace
159    (Self : not null access constant UML_Enumeration_Literal_Proxy)
160       return AMF.UML.Namespaces.UML_Namespace_Access;
161   --  Getter of NamedElement::namespace.
162   --
163   --  Specifies the namespace that owns the NamedElement.
164
165   overriding function Get_Qualified_Name
166    (Self : not null access constant UML_Enumeration_Literal_Proxy)
167       return AMF.Optional_String;
168   --  Getter of NamedElement::qualifiedName.
169   --
170   --  A name which allows the NamedElement to be identified within a
171   --  hierarchy of nested Namespaces. It is constructed from the names of the
172   --  containing namespaces starting at the root of the hierarchy and ending
173   --  with the name of the NamedElement itself.
174
175   overriding function Get_Owning_Template_Parameter
176    (Self : not null access constant UML_Enumeration_Literal_Proxy)
177       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
178   --  Getter of ParameterableElement::owningTemplateParameter.
179   --
180   --  The formal template parameter that owns this element.
181
182   overriding procedure Set_Owning_Template_Parameter
183    (Self : not null access UML_Enumeration_Literal_Proxy;
184     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
185   --  Setter of ParameterableElement::owningTemplateParameter.
186   --
187   --  The formal template parameter that owns this element.
188
189   overriding function Get_Template_Parameter
190    (Self : not null access constant UML_Enumeration_Literal_Proxy)
191       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
192   --  Getter of ParameterableElement::templateParameter.
193   --
194   --  The template parameter that exposes this element as a formal parameter.
195
196   overriding procedure Set_Template_Parameter
197    (Self : not null access UML_Enumeration_Literal_Proxy;
198     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
199   --  Setter of ParameterableElement::templateParameter.
200   --
201   --  The template parameter that exposes this element as a formal parameter.
202
203   overriding function Classifier
204    (Self : not null access constant UML_Enumeration_Literal_Proxy)
205       return AMF.UML.Enumerations.UML_Enumeration_Access;
206   --  Operation EnumerationLiteral::classifier.
207   --
208   --  Missing derivation for EnumerationLiteral::/classifier : Enumeration
209
210   overriding function Deployed_Element
211    (Self : not null access constant UML_Enumeration_Literal_Proxy)
212       return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
213   --  Operation DeploymentTarget::deployedElement.
214   --
215   --  Missing derivation for DeploymentTarget::/deployedElement :
216   --  PackageableElement
217
218   overriding function All_Owning_Packages
219    (Self : not null access constant UML_Enumeration_Literal_Proxy)
220       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
221   --  Operation NamedElement::allOwningPackages.
222   --
223   --  The query allOwningPackages() returns all the directly or indirectly
224   --  owning packages.
225
226   overriding function Is_Distinguishable_From
227    (Self : not null access constant UML_Enumeration_Literal_Proxy;
228     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
229     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
230       return Boolean;
231   --  Operation NamedElement::isDistinguishableFrom.
232   --
233   --  The query isDistinguishableFrom() determines whether two NamedElements
234   --  may logically co-exist within a Namespace. By default, two named
235   --  elements are distinguishable if (a) they have unrelated types or (b)
236   --  they have related types but different names.
237
238   overriding function Namespace
239    (Self : not null access constant UML_Enumeration_Literal_Proxy)
240       return AMF.UML.Namespaces.UML_Namespace_Access;
241   --  Operation NamedElement::namespace.
242   --
243   --  Missing derivation for NamedElement::/namespace : Namespace
244
245   overriding function Is_Compatible_With
246    (Self : not null access constant UML_Enumeration_Literal_Proxy;
247     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
248       return Boolean;
249   --  Operation ParameterableElement::isCompatibleWith.
250   --
251   --  The query isCompatibleWith() determines if this parameterable element
252   --  is compatible with the specified parameterable element. By default
253   --  parameterable element P is compatible with parameterable element Q if
254   --  the kind of P is the same or a subtype as the kind of Q. Subclasses
255   --  should override this operation to specify different compatibility
256   --  constraints.
257
258   overriding function Is_Template_Parameter
259    (Self : not null access constant UML_Enumeration_Literal_Proxy)
260       return Boolean;
261   --  Operation ParameterableElement::isTemplateParameter.
262   --
263   --  The query isTemplateParameter() determines if this parameterable
264   --  element is exposed as a formal template parameter.
265
266   overriding procedure Enter_Element
267    (Self    : not null access constant UML_Enumeration_Literal_Proxy;
268     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
269     Control : in out AMF.Visitors.Traverse_Control);
270   --  Dispatch call to corresponding subprogram of visitor interface.
271
272   overriding procedure Leave_Element
273    (Self    : not null access constant UML_Enumeration_Literal_Proxy;
274     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
275     Control : in out AMF.Visitors.Traverse_Control);
276   --  Dispatch call to corresponding subprogram of visitor interface.
277
278   overriding procedure Visit_Element
279    (Self     : not null access constant UML_Enumeration_Literal_Proxy;
280     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
281     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
282     Control  : in out AMF.Visitors.Traverse_Control);
283   --  Dispatch call to corresponding subprogram of iterator interface.
284
285end AMF.Internals.UML_Enumeration_Literals;
286