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_Named_Elements;
45with AMF.UML.Constraints;
46with AMF.UML.Dependencies.Collections;
47with AMF.UML.Elements.Collections;
48with AMF.UML.Extends;
49with AMF.UML.Extension_Points.Collections;
50with AMF.UML.Named_Elements;
51with AMF.UML.Namespaces;
52with AMF.UML.Packages.Collections;
53with AMF.UML.String_Expressions;
54with AMF.UML.Use_Cases;
55with AMF.Visitors;
56
57package AMF.Internals.UML_Extends is
58
59   type UML_Extend_Proxy is
60     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
61       and AMF.UML.Extends.UML_Extend with null record;
62
63   overriding function Get_Condition
64    (Self : not null access constant UML_Extend_Proxy)
65       return AMF.UML.Constraints.UML_Constraint_Access;
66   --  Getter of Extend::condition.
67   --
68   --  References the condition that must hold when the first extension point
69   --  is reached for the extension to take place. If no constraint is
70   --  associated with the extend relationship, the extension is unconditional.
71
72   overriding procedure Set_Condition
73    (Self : not null access UML_Extend_Proxy;
74     To   : AMF.UML.Constraints.UML_Constraint_Access);
75   --  Setter of Extend::condition.
76   --
77   --  References the condition that must hold when the first extension point
78   --  is reached for the extension to take place. If no constraint is
79   --  associated with the extend relationship, the extension is unconditional.
80
81   overriding function Get_Extended_Case
82    (Self : not null access constant UML_Extend_Proxy)
83       return AMF.UML.Use_Cases.UML_Use_Case_Access;
84   --  Getter of Extend::extendedCase.
85   --
86   --  References the use case that is being extended.
87
88   overriding procedure Set_Extended_Case
89    (Self : not null access UML_Extend_Proxy;
90     To   : AMF.UML.Use_Cases.UML_Use_Case_Access);
91   --  Setter of Extend::extendedCase.
92   --
93   --  References the use case that is being extended.
94
95   overriding function Get_Extension
96    (Self : not null access constant UML_Extend_Proxy)
97       return AMF.UML.Use_Cases.UML_Use_Case_Access;
98   --  Getter of Extend::extension.
99   --
100   --  References the use case that represents the extension and owns the
101   --  extend relationship.
102
103   overriding procedure Set_Extension
104    (Self : not null access UML_Extend_Proxy;
105     To   : AMF.UML.Use_Cases.UML_Use_Case_Access);
106   --  Setter of Extend::extension.
107   --
108   --  References the use case that represents the extension and owns the
109   --  extend relationship.
110
111   overriding function Get_Extension_Location
112    (Self : not null access constant UML_Extend_Proxy)
113       return AMF.UML.Extension_Points.Collections.Ordered_Set_Of_UML_Extension_Point;
114   --  Getter of Extend::extensionLocation.
115   --
116   --  An ordered list of extension points belonging to the extended use case,
117   --  specifying where the respective behavioral fragments of the extending
118   --  use case are to be inserted. The first fragment in the extending use
119   --  case is associated with the first extension point in the list, the
120   --  second fragment with the second point, and so on. (Note that, in most
121   --  practical cases, the extending use case has just a single behavior
122   --  fragment, so that the list of extension points is trivial.)
123
124   overriding function Get_Source
125    (Self : not null access constant UML_Extend_Proxy)
126       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
127   --  Getter of DirectedRelationship::source.
128   --
129   --  Specifies the sources of the DirectedRelationship.
130
131   overriding function Get_Target
132    (Self : not null access constant UML_Extend_Proxy)
133       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
134   --  Getter of DirectedRelationship::target.
135   --
136   --  Specifies the targets of the DirectedRelationship.
137
138   overriding function Get_Related_Element
139    (Self : not null access constant UML_Extend_Proxy)
140       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
141   --  Getter of Relationship::relatedElement.
142   --
143   --  Specifies the elements related by the Relationship.
144
145   overriding function Get_Client_Dependency
146    (Self : not null access constant UML_Extend_Proxy)
147       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
148   --  Getter of NamedElement::clientDependency.
149   --
150   --  Indicates the dependencies that reference the client.
151
152   overriding function Get_Name_Expression
153    (Self : not null access constant UML_Extend_Proxy)
154       return AMF.UML.String_Expressions.UML_String_Expression_Access;
155   --  Getter of NamedElement::nameExpression.
156   --
157   --  The string expression used to define the name of this named element.
158
159   overriding procedure Set_Name_Expression
160    (Self : not null access UML_Extend_Proxy;
161     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
162   --  Setter of NamedElement::nameExpression.
163   --
164   --  The string expression used to define the name of this named element.
165
166   overriding function Get_Namespace
167    (Self : not null access constant UML_Extend_Proxy)
168       return AMF.UML.Namespaces.UML_Namespace_Access;
169   --  Getter of NamedElement::namespace.
170   --
171   --  Specifies the namespace that owns the NamedElement.
172
173   overriding function Get_Qualified_Name
174    (Self : not null access constant UML_Extend_Proxy)
175       return AMF.Optional_String;
176   --  Getter of NamedElement::qualifiedName.
177   --
178   --  A name which allows the NamedElement to be identified within a
179   --  hierarchy of nested Namespaces. It is constructed from the names of the
180   --  containing namespaces starting at the root of the hierarchy and ending
181   --  with the name of the NamedElement itself.
182
183   overriding function All_Owning_Packages
184    (Self : not null access constant UML_Extend_Proxy)
185       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
186   --  Operation NamedElement::allOwningPackages.
187   --
188   --  The query allOwningPackages() returns all the directly or indirectly
189   --  owning packages.
190
191   overriding function Is_Distinguishable_From
192    (Self : not null access constant UML_Extend_Proxy;
193     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
194     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
195       return Boolean;
196   --  Operation NamedElement::isDistinguishableFrom.
197   --
198   --  The query isDistinguishableFrom() determines whether two NamedElements
199   --  may logically co-exist within a Namespace. By default, two named
200   --  elements are distinguishable if (a) they have unrelated types or (b)
201   --  they have related types but different names.
202
203   overriding function Namespace
204    (Self : not null access constant UML_Extend_Proxy)
205       return AMF.UML.Namespaces.UML_Namespace_Access;
206   --  Operation NamedElement::namespace.
207   --
208   --  Missing derivation for NamedElement::/namespace : Namespace
209
210   overriding procedure Enter_Element
211    (Self    : not null access constant UML_Extend_Proxy;
212     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
213     Control : in out AMF.Visitors.Traverse_Control);
214   --  Dispatch call to corresponding subprogram of visitor interface.
215
216   overriding procedure Leave_Element
217    (Self    : not null access constant UML_Extend_Proxy;
218     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
219     Control : in out AMF.Visitors.Traverse_Control);
220   --  Dispatch call to corresponding subprogram of visitor interface.
221
222   overriding procedure Visit_Element
223    (Self     : not null access constant UML_Extend_Proxy;
224     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
225     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
226     Control  : in out AMF.Visitors.Traverse_Control);
227   --  Dispatch call to corresponding subprogram of iterator interface.
228
229end AMF.Internals.UML_Extends;
230