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.Named_Elements;
47with AMF.UML.Namespaces;
48with AMF.UML.Packages.Collections;
49with AMF.UML.Parameterable_Elements;
50with AMF.UML.String_Expressions;
51with AMF.UML.Template_Parameters;
52with AMF.UML.Time_Expressions;
53with AMF.UML.Time_Intervals;
54with AMF.UML.Types;
55with AMF.UML.Value_Specifications;
56with AMF.Visitors;
57
58package AMF.Internals.UML_Time_Intervals is
59
60   type UML_Time_Interval_Proxy is
61     limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy
62       and AMF.UML.Time_Intervals.UML_Time_Interval with null record;
63
64   overriding function Get_Max
65    (Self : not null access constant UML_Time_Interval_Proxy)
66       return AMF.UML.Time_Expressions.UML_Time_Expression_Access;
67   --  Getter of TimeInterval::max.
68   --
69   --  Refers to the TimeExpression denoting the maximum value of the range.
70
71   overriding procedure Set_Max
72    (Self : not null access UML_Time_Interval_Proxy;
73     To   : AMF.UML.Time_Expressions.UML_Time_Expression_Access);
74   --  Setter of TimeInterval::max.
75   --
76   --  Refers to the TimeExpression denoting the maximum value of the range.
77
78   overriding function Get_Min
79    (Self : not null access constant UML_Time_Interval_Proxy)
80       return AMF.UML.Time_Expressions.UML_Time_Expression_Access;
81   --  Getter of TimeInterval::min.
82   --
83   --  Refers to the TimeExpression denoting the minimum value of the range.
84
85   overriding procedure Set_Min
86    (Self : not null access UML_Time_Interval_Proxy;
87     To   : AMF.UML.Time_Expressions.UML_Time_Expression_Access);
88   --  Setter of TimeInterval::min.
89   --
90   --  Refers to the TimeExpression denoting the minimum value of the range.
91
92   overriding function Get_Max
93    (Self : not null access constant UML_Time_Interval_Proxy)
94       return AMF.UML.Value_Specifications.UML_Value_Specification_Access;
95   --  Getter of Interval::max.
96   --
97   --  Refers to the ValueSpecification denoting the maximum value of the
98   --  range.
99
100   overriding procedure Set_Max
101    (Self : not null access UML_Time_Interval_Proxy;
102     To   : AMF.UML.Value_Specifications.UML_Value_Specification_Access);
103   --  Setter of Interval::max.
104   --
105   --  Refers to the ValueSpecification denoting the maximum value of the
106   --  range.
107
108   overriding function Get_Min
109    (Self : not null access constant UML_Time_Interval_Proxy)
110       return AMF.UML.Value_Specifications.UML_Value_Specification_Access;
111   --  Getter of Interval::min.
112   --
113   --  Refers to the ValueSpecification denoting the minimum value of the
114   --  range.
115
116   overriding procedure Set_Min
117    (Self : not null access UML_Time_Interval_Proxy;
118     To   : AMF.UML.Value_Specifications.UML_Value_Specification_Access);
119   --  Setter of Interval::min.
120   --
121   --  Refers to the ValueSpecification denoting the minimum value of the
122   --  range.
123
124   overriding function Get_Type
125    (Self : not null access constant UML_Time_Interval_Proxy)
126       return AMF.UML.Types.UML_Type_Access;
127   --  Getter of TypedElement::type.
128   --
129   --  The type of the TypedElement.
130   --  This information is derived from the return result for this Operation.
131
132   overriding procedure Set_Type
133    (Self : not null access UML_Time_Interval_Proxy;
134     To   : AMF.UML.Types.UML_Type_Access);
135   --  Setter of TypedElement::type.
136   --
137   --  The type of the TypedElement.
138   --  This information is derived from the return result for this Operation.
139
140   overriding function Get_Client_Dependency
141    (Self : not null access constant UML_Time_Interval_Proxy)
142       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
143   --  Getter of NamedElement::clientDependency.
144   --
145   --  Indicates the dependencies that reference the client.
146
147   overriding function Get_Name_Expression
148    (Self : not null access constant UML_Time_Interval_Proxy)
149       return AMF.UML.String_Expressions.UML_String_Expression_Access;
150   --  Getter of NamedElement::nameExpression.
151   --
152   --  The string expression used to define the name of this named element.
153
154   overriding procedure Set_Name_Expression
155    (Self : not null access UML_Time_Interval_Proxy;
156     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
157   --  Setter of NamedElement::nameExpression.
158   --
159   --  The string expression used to define the name of this named element.
160
161   overriding function Get_Namespace
162    (Self : not null access constant UML_Time_Interval_Proxy)
163       return AMF.UML.Namespaces.UML_Namespace_Access;
164   --  Getter of NamedElement::namespace.
165   --
166   --  Specifies the namespace that owns the NamedElement.
167
168   overriding function Get_Qualified_Name
169    (Self : not null access constant UML_Time_Interval_Proxy)
170       return AMF.Optional_String;
171   --  Getter of NamedElement::qualifiedName.
172   --
173   --  A name which allows the NamedElement to be identified within a
174   --  hierarchy of nested Namespaces. It is constructed from the names of the
175   --  containing namespaces starting at the root of the hierarchy and ending
176   --  with the name of the NamedElement itself.
177
178   overriding function Get_Owning_Template_Parameter
179    (Self : not null access constant UML_Time_Interval_Proxy)
180       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
181   --  Getter of ParameterableElement::owningTemplateParameter.
182   --
183   --  The formal template parameter that owns this element.
184
185   overriding procedure Set_Owning_Template_Parameter
186    (Self : not null access UML_Time_Interval_Proxy;
187     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
188   --  Setter of ParameterableElement::owningTemplateParameter.
189   --
190   --  The formal template parameter that owns this element.
191
192   overriding function Get_Template_Parameter
193    (Self : not null access constant UML_Time_Interval_Proxy)
194       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
195   --  Getter of ParameterableElement::templateParameter.
196   --
197   --  The template parameter that exposes this element as a formal parameter.
198
199   overriding procedure Set_Template_Parameter
200    (Self : not null access UML_Time_Interval_Proxy;
201     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
202   --  Setter of ParameterableElement::templateParameter.
203   --
204   --  The template parameter that exposes this element as a formal parameter.
205
206   overriding function Boolean_Value
207    (Self : not null access constant UML_Time_Interval_Proxy)
208       return AMF.Optional_Boolean;
209   --  Operation ValueSpecification::booleanValue.
210   --
211   --  The query booleanValue() gives a single Boolean value when one can be
212   --  computed.
213
214   overriding function Integer_Value
215    (Self : not null access constant UML_Time_Interval_Proxy)
216       return AMF.Optional_Integer;
217   --  Operation ValueSpecification::integerValue.
218   --
219   --  The query integerValue() gives a single Integer value when one can be
220   --  computed.
221
222   overriding function Is_Compatible_With
223    (Self : not null access constant UML_Time_Interval_Proxy;
224     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
225       return Boolean;
226   --  Operation ValueSpecification::isCompatibleWith.
227   --
228   --  The query isCompatibleWith() determines if this parameterable element
229   --  is compatible with the specified parameterable element. By default
230   --  parameterable element P is compatible with parameterable element Q if
231   --  the kind of P is the same or a subtype as the kind of Q. In addition,
232   --  for ValueSpecification, the type must be conformant with the type of
233   --  the specified parameterable element.
234
235   overriding function Is_Computable
236    (Self : not null access constant UML_Time_Interval_Proxy)
237       return Boolean;
238   --  Operation ValueSpecification::isComputable.
239   --
240   --  The query isComputable() determines whether a value specification can
241   --  be computed in a model. This operation cannot be fully defined in OCL.
242   --  A conforming implementation is expected to deliver true for this
243   --  operation for all value specifications that it can compute, and to
244   --  compute all of those for which the operation is true. A conforming
245   --  implementation is expected to be able to compute the value of all
246   --  literals.
247
248   overriding function Is_Null
249    (Self : not null access constant UML_Time_Interval_Proxy)
250       return Boolean;
251   --  Operation ValueSpecification::isNull.
252   --
253   --  The query isNull() returns true when it can be computed that the value
254   --  is null.
255
256   overriding function Real_Value
257    (Self : not null access constant UML_Time_Interval_Proxy)
258       return AMF.Optional_Real;
259   --  Operation ValueSpecification::realValue.
260   --
261   --  The query realValue() gives a single Real value when one can be
262   --  computed.
263
264   overriding function String_Value
265    (Self : not null access constant UML_Time_Interval_Proxy)
266       return AMF.Optional_String;
267   --  Operation ValueSpecification::stringValue.
268   --
269   --  The query stringValue() gives a single String value when one can be
270   --  computed.
271
272   overriding function Unlimited_Value
273    (Self : not null access constant UML_Time_Interval_Proxy)
274       return AMF.Optional_Unlimited_Natural;
275   --  Operation ValueSpecification::unlimitedValue.
276   --
277   --  The query unlimitedValue() gives a single UnlimitedNatural value when
278   --  one can be computed.
279
280   overriding function All_Owning_Packages
281    (Self : not null access constant UML_Time_Interval_Proxy)
282       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
283   --  Operation NamedElement::allOwningPackages.
284   --
285   --  The query allOwningPackages() returns all the directly or indirectly
286   --  owning packages.
287
288   overriding function Is_Distinguishable_From
289    (Self : not null access constant UML_Time_Interval_Proxy;
290     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
291     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
292       return Boolean;
293   --  Operation NamedElement::isDistinguishableFrom.
294   --
295   --  The query isDistinguishableFrom() determines whether two NamedElements
296   --  may logically co-exist within a Namespace. By default, two named
297   --  elements are distinguishable if (a) they have unrelated types or (b)
298   --  they have related types but different names.
299
300   overriding function Namespace
301    (Self : not null access constant UML_Time_Interval_Proxy)
302       return AMF.UML.Namespaces.UML_Namespace_Access;
303   --  Operation NamedElement::namespace.
304   --
305   --  Missing derivation for NamedElement::/namespace : Namespace
306
307   overriding function Is_Template_Parameter
308    (Self : not null access constant UML_Time_Interval_Proxy)
309       return Boolean;
310   --  Operation ParameterableElement::isTemplateParameter.
311   --
312   --  The query isTemplateParameter() determines if this parameterable
313   --  element is exposed as a formal template parameter.
314
315   overriding procedure Enter_Element
316    (Self    : not null access constant UML_Time_Interval_Proxy;
317     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
318     Control : in out AMF.Visitors.Traverse_Control);
319   --  Dispatch call to corresponding subprogram of visitor interface.
320
321   overriding procedure Leave_Element
322    (Self    : not null access constant UML_Time_Interval_Proxy;
323     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
324     Control : in out AMF.Visitors.Traverse_Control);
325   --  Dispatch call to corresponding subprogram of visitor interface.
326
327   overriding procedure Visit_Element
328    (Self     : not null access constant UML_Time_Interval_Proxy;
329     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
330     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
331     Control  : in out AMF.Visitors.Traverse_Control);
332   --  Dispatch call to corresponding subprogram of iterator interface.
333
334end AMF.Internals.UML_Time_Intervals;
335