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