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.Dependencies.Collections;
46with AMF.UML.Elements.Collections;
47with AMF.UML.Includes;
48with AMF.UML.Named_Elements;
49with AMF.UML.Namespaces;
50with AMF.UML.Packages.Collections;
51with AMF.UML.String_Expressions;
52with AMF.UML.Use_Cases;
53with AMF.Visitors;
54
55package AMF.Internals.UML_Includes is
56
57   type UML_Include_Proxy is
58     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
59       and AMF.UML.Includes.UML_Include with null record;
60
61   overriding function Get_Addition
62    (Self : not null access constant UML_Include_Proxy)
63       return AMF.UML.Use_Cases.UML_Use_Case_Access;
64   --  Getter of Include::addition.
65   --
66   --  References the use case that is to be included.
67
68   overriding procedure Set_Addition
69    (Self : not null access UML_Include_Proxy;
70     To   : AMF.UML.Use_Cases.UML_Use_Case_Access);
71   --  Setter of Include::addition.
72   --
73   --  References the use case that is to be included.
74
75   overriding function Get_Including_Case
76    (Self : not null access constant UML_Include_Proxy)
77       return AMF.UML.Use_Cases.UML_Use_Case_Access;
78   --  Getter of Include::includingCase.
79   --
80   --  References the use case which will include the addition and owns the
81   --  include relationship.
82
83   overriding procedure Set_Including_Case
84    (Self : not null access UML_Include_Proxy;
85     To   : AMF.UML.Use_Cases.UML_Use_Case_Access);
86   --  Setter of Include::includingCase.
87   --
88   --  References the use case which will include the addition and owns the
89   --  include relationship.
90
91   overriding function Get_Source
92    (Self : not null access constant UML_Include_Proxy)
93       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
94   --  Getter of DirectedRelationship::source.
95   --
96   --  Specifies the sources of the DirectedRelationship.
97
98   overriding function Get_Target
99    (Self : not null access constant UML_Include_Proxy)
100       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
101   --  Getter of DirectedRelationship::target.
102   --
103   --  Specifies the targets of the DirectedRelationship.
104
105   overriding function Get_Related_Element
106    (Self : not null access constant UML_Include_Proxy)
107       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
108   --  Getter of Relationship::relatedElement.
109   --
110   --  Specifies the elements related by the Relationship.
111
112   overriding function Get_Client_Dependency
113    (Self : not null access constant UML_Include_Proxy)
114       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
115   --  Getter of NamedElement::clientDependency.
116   --
117   --  Indicates the dependencies that reference the client.
118
119   overriding function Get_Name_Expression
120    (Self : not null access constant UML_Include_Proxy)
121       return AMF.UML.String_Expressions.UML_String_Expression_Access;
122   --  Getter of NamedElement::nameExpression.
123   --
124   --  The string expression used to define the name of this named element.
125
126   overriding procedure Set_Name_Expression
127    (Self : not null access UML_Include_Proxy;
128     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
129   --  Setter of NamedElement::nameExpression.
130   --
131   --  The string expression used to define the name of this named element.
132
133   overriding function Get_Namespace
134    (Self : not null access constant UML_Include_Proxy)
135       return AMF.UML.Namespaces.UML_Namespace_Access;
136   --  Getter of NamedElement::namespace.
137   --
138   --  Specifies the namespace that owns the NamedElement.
139
140   overriding function Get_Qualified_Name
141    (Self : not null access constant UML_Include_Proxy)
142       return AMF.Optional_String;
143   --  Getter of NamedElement::qualifiedName.
144   --
145   --  A name which allows the NamedElement to be identified within a
146   --  hierarchy of nested Namespaces. It is constructed from the names of the
147   --  containing namespaces starting at the root of the hierarchy and ending
148   --  with the name of the NamedElement itself.
149
150   overriding function All_Owning_Packages
151    (Self : not null access constant UML_Include_Proxy)
152       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
153   --  Operation NamedElement::allOwningPackages.
154   --
155   --  The query allOwningPackages() returns all the directly or indirectly
156   --  owning packages.
157
158   overriding function Is_Distinguishable_From
159    (Self : not null access constant UML_Include_Proxy;
160     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
161     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
162       return Boolean;
163   --  Operation NamedElement::isDistinguishableFrom.
164   --
165   --  The query isDistinguishableFrom() determines whether two NamedElements
166   --  may logically co-exist within a Namespace. By default, two named
167   --  elements are distinguishable if (a) they have unrelated types or (b)
168   --  they have related types but different names.
169
170   overriding function Namespace
171    (Self : not null access constant UML_Include_Proxy)
172       return AMF.UML.Namespaces.UML_Namespace_Access;
173   --  Operation NamedElement::namespace.
174   --
175   --  Missing derivation for NamedElement::/namespace : Namespace
176
177   overriding procedure Enter_Element
178    (Self    : not null access constant UML_Include_Proxy;
179     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
180     Control : in out AMF.Visitors.Traverse_Control);
181   --  Dispatch call to corresponding subprogram of visitor interface.
182
183   overriding procedure Leave_Element
184    (Self    : not null access constant UML_Include_Proxy;
185     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
186     Control : in out AMF.Visitors.Traverse_Control);
187   --  Dispatch call to corresponding subprogram of visitor interface.
188
189   overriding procedure Visit_Element
190    (Self     : not null access constant UML_Include_Proxy;
191     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
192     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
193     Control  : in out AMF.Visitors.Traverse_Control);
194   --  Dispatch call to corresponding subprogram of iterator interface.
195
196end AMF.Internals.UML_Includes;
197