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.Dependencies.Collections;
46with AMF.UML.Elements.Collections;
47with AMF.UML.Manifestations;
48with AMF.UML.Named_Elements.Collections;
49with AMF.UML.Namespaces;
50with AMF.UML.Opaque_Expressions;
51with AMF.UML.Packageable_Elements;
52with AMF.UML.Packages.Collections;
53with AMF.UML.Parameterable_Elements;
54with AMF.UML.String_Expressions;
55with AMF.UML.Template_Parameters;
56with AMF.Visitors;
57
58package AMF.Internals.UML_Manifestations is
59
60   type UML_Manifestation_Proxy is
61     limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy
62       and AMF.UML.Manifestations.UML_Manifestation with null record;
63
64   overriding function Get_Utilized_Element
65    (Self : not null access constant UML_Manifestation_Proxy)
66       return AMF.UML.Packageable_Elements.UML_Packageable_Element_Access;
67   --  Getter of Manifestation::utilizedElement.
68   --
69   --  The model element that is utilized in the manifestation in an Artifact.
70
71   overriding procedure Set_Utilized_Element
72    (Self : not null access UML_Manifestation_Proxy;
73     To   : AMF.UML.Packageable_Elements.UML_Packageable_Element_Access);
74   --  Setter of Manifestation::utilizedElement.
75   --
76   --  The model element that is utilized in the manifestation in an Artifact.
77
78   overriding function Get_Mapping
79    (Self : not null access constant UML_Manifestation_Proxy)
80       return AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access;
81   --  Getter of Abstraction::mapping.
82   --
83   --  An composition of an Expression that states the abstraction
84   --  relationship between the supplier and the client. In some cases, such
85   --  as Derivation, it is usually formal and unidirectional; in other cases,
86   --  such as Trace, it is usually informal and bidirectional. The mapping
87   --  expression is optional and may be omitted if the precise relationship
88   --  between the elements is not specified.
89
90   overriding procedure Set_Mapping
91    (Self : not null access UML_Manifestation_Proxy;
92     To   : AMF.UML.Opaque_Expressions.UML_Opaque_Expression_Access);
93   --  Setter of Abstraction::mapping.
94   --
95   --  An composition of an Expression that states the abstraction
96   --  relationship between the supplier and the client. In some cases, such
97   --  as Derivation, it is usually formal and unidirectional; in other cases,
98   --  such as Trace, it is usually informal and bidirectional. The mapping
99   --  expression is optional and may be omitted if the precise relationship
100   --  between the elements is not specified.
101
102   overriding function Get_Client
103    (Self : not null access constant UML_Manifestation_Proxy)
104       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
105   --  Getter of Dependency::client.
106   --
107   --  The element(s) dependent on the supplier element(s). In some cases
108   --  (such as a Trace Abstraction) the assignment of direction (that is, the
109   --  designation of the client element) is at the discretion of the modeler,
110   --  and is a stipulation.
111
112   overriding function Get_Supplier
113    (Self : not null access constant UML_Manifestation_Proxy)
114       return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
115   --  Getter of Dependency::supplier.
116   --
117   --  The element(s) independent of the client element(s), in the same
118   --  respect and the same dependency relationship. In some directed
119   --  dependency relationships (such as Refinement Abstractions), a common
120   --  convention in the domain of class-based OO software is to put the more
121   --  abstract element in this role. Despite this convention, users of UML
122   --  may stipulate a sense of dependency suitable for their domain, which
123   --  makes a more abstract element dependent on that which is more specific.
124
125   overriding function Get_Source
126    (Self : not null access constant UML_Manifestation_Proxy)
127       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
128   --  Getter of DirectedRelationship::source.
129   --
130   --  Specifies the sources of the DirectedRelationship.
131
132   overriding function Get_Target
133    (Self : not null access constant UML_Manifestation_Proxy)
134       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
135   --  Getter of DirectedRelationship::target.
136   --
137   --  Specifies the targets of the DirectedRelationship.
138
139   overriding function Get_Related_Element
140    (Self : not null access constant UML_Manifestation_Proxy)
141       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
142   --  Getter of Relationship::relatedElement.
143   --
144   --  Specifies the elements related by the Relationship.
145
146   overriding function Get_Client_Dependency
147    (Self : not null access constant UML_Manifestation_Proxy)
148       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
149   --  Getter of NamedElement::clientDependency.
150   --
151   --  Indicates the dependencies that reference the client.
152
153   overriding function Get_Name_Expression
154    (Self : not null access constant UML_Manifestation_Proxy)
155       return AMF.UML.String_Expressions.UML_String_Expression_Access;
156   --  Getter of NamedElement::nameExpression.
157   --
158   --  The string expression used to define the name of this named element.
159
160   overriding procedure Set_Name_Expression
161    (Self : not null access UML_Manifestation_Proxy;
162     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
163   --  Setter of NamedElement::nameExpression.
164   --
165   --  The string expression used to define the name of this named element.
166
167   overriding function Get_Namespace
168    (Self : not null access constant UML_Manifestation_Proxy)
169       return AMF.UML.Namespaces.UML_Namespace_Access;
170   --  Getter of NamedElement::namespace.
171   --
172   --  Specifies the namespace that owns the NamedElement.
173
174   overriding function Get_Qualified_Name
175    (Self : not null access constant UML_Manifestation_Proxy)
176       return AMF.Optional_String;
177   --  Getter of NamedElement::qualifiedName.
178   --
179   --  A name which allows the NamedElement to be identified within a
180   --  hierarchy of nested Namespaces. It is constructed from the names of the
181   --  containing namespaces starting at the root of the hierarchy and ending
182   --  with the name of the NamedElement itself.
183
184   overriding function Get_Owning_Template_Parameter
185    (Self : not null access constant UML_Manifestation_Proxy)
186       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
187   --  Getter of ParameterableElement::owningTemplateParameter.
188   --
189   --  The formal template parameter that owns this element.
190
191   overriding procedure Set_Owning_Template_Parameter
192    (Self : not null access UML_Manifestation_Proxy;
193     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
194   --  Setter of ParameterableElement::owningTemplateParameter.
195   --
196   --  The formal template parameter that owns this element.
197
198   overriding function Get_Template_Parameter
199    (Self : not null access constant UML_Manifestation_Proxy)
200       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
201   --  Getter of ParameterableElement::templateParameter.
202   --
203   --  The template parameter that exposes this element as a formal parameter.
204
205   overriding procedure Set_Template_Parameter
206    (Self : not null access UML_Manifestation_Proxy;
207     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
208   --  Setter of ParameterableElement::templateParameter.
209   --
210   --  The template parameter that exposes this element as a formal parameter.
211
212   overriding function All_Owning_Packages
213    (Self : not null access constant UML_Manifestation_Proxy)
214       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
215   --  Operation NamedElement::allOwningPackages.
216   --
217   --  The query allOwningPackages() returns all the directly or indirectly
218   --  owning packages.
219
220   overriding function Is_Distinguishable_From
221    (Self : not null access constant UML_Manifestation_Proxy;
222     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
223     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
224       return Boolean;
225   --  Operation NamedElement::isDistinguishableFrom.
226   --
227   --  The query isDistinguishableFrom() determines whether two NamedElements
228   --  may logically co-exist within a Namespace. By default, two named
229   --  elements are distinguishable if (a) they have unrelated types or (b)
230   --  they have related types but different names.
231
232   overriding function Namespace
233    (Self : not null access constant UML_Manifestation_Proxy)
234       return AMF.UML.Namespaces.UML_Namespace_Access;
235   --  Operation NamedElement::namespace.
236   --
237   --  Missing derivation for NamedElement::/namespace : Namespace
238
239   overriding function Is_Compatible_With
240    (Self : not null access constant UML_Manifestation_Proxy;
241     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
242       return Boolean;
243   --  Operation ParameterableElement::isCompatibleWith.
244   --
245   --  The query isCompatibleWith() determines if this parameterable element
246   --  is compatible with the specified parameterable element. By default
247   --  parameterable element P is compatible with parameterable element Q if
248   --  the kind of P is the same or a subtype as the kind of Q. Subclasses
249   --  should override this operation to specify different compatibility
250   --  constraints.
251
252   overriding function Is_Template_Parameter
253    (Self : not null access constant UML_Manifestation_Proxy)
254       return Boolean;
255   --  Operation ParameterableElement::isTemplateParameter.
256   --
257   --  The query isTemplateParameter() determines if this parameterable
258   --  element is exposed as a formal template parameter.
259
260   overriding procedure Enter_Element
261    (Self    : not null access constant UML_Manifestation_Proxy;
262     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
263     Control : in out AMF.Visitors.Traverse_Control);
264   --  Dispatch call to corresponding subprogram of visitor interface.
265
266   overriding procedure Leave_Element
267    (Self    : not null access constant UML_Manifestation_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 Visit_Element
273    (Self     : not null access constant UML_Manifestation_Proxy;
274     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
275     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
276     Control  : in out AMF.Visitors.Traverse_Control);
277   --  Dispatch call to corresponding subprogram of iterator interface.
278
279end AMF.Internals.UML_Manifestations;
280