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_Observations;
53with AMF.Visitors;
54
55package AMF.Internals.UML_Time_Observations is
56
57   type UML_Time_Observation_Proxy is
58     limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy
59       and AMF.UML.Time_Observations.UML_Time_Observation with null record;
60
61   overriding function Get_Event
62    (Self : not null access constant UML_Time_Observation_Proxy)
63       return AMF.UML.Named_Elements.UML_Named_Element_Access;
64   --  Getter of TimeObservation::event.
65   --
66   --  The observation is determined by the entering or exiting of the event
67   --  element during execution.
68
69   overriding procedure Set_Event
70    (Self : not null access UML_Time_Observation_Proxy;
71     To   : AMF.UML.Named_Elements.UML_Named_Element_Access);
72   --  Setter of TimeObservation::event.
73   --
74   --  The observation is determined by the entering or exiting of the event
75   --  element during execution.
76
77   overriding function Get_First_Event
78    (Self : not null access constant UML_Time_Observation_Proxy)
79       return Boolean;
80   --  Getter of TimeObservation::firstEvent.
81   --
82   --  The value of firstEvent is related to event. If firstEvent is true,
83   --  then the corresponding observation event is the first time instant the
84   --  execution enters event. If firstEvent is false, then the corresponding
85   --  observation event is the time instant the execution exits event.
86
87   overriding procedure Set_First_Event
88    (Self : not null access UML_Time_Observation_Proxy;
89     To   : Boolean);
90   --  Setter of TimeObservation::firstEvent.
91   --
92   --  The value of firstEvent is related to event. If firstEvent is true,
93   --  then the corresponding observation event is the first time instant the
94   --  execution enters event. If firstEvent is false, then the corresponding
95   --  observation event is the time instant the execution exits event.
96
97   overriding function Get_Client_Dependency
98    (Self : not null access constant UML_Time_Observation_Proxy)
99       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
100   --  Getter of NamedElement::clientDependency.
101   --
102   --  Indicates the dependencies that reference the client.
103
104   overriding function Get_Name_Expression
105    (Self : not null access constant UML_Time_Observation_Proxy)
106       return AMF.UML.String_Expressions.UML_String_Expression_Access;
107   --  Getter of NamedElement::nameExpression.
108   --
109   --  The string expression used to define the name of this named element.
110
111   overriding procedure Set_Name_Expression
112    (Self : not null access UML_Time_Observation_Proxy;
113     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
114   --  Setter of NamedElement::nameExpression.
115   --
116   --  The string expression used to define the name of this named element.
117
118   overriding function Get_Namespace
119    (Self : not null access constant UML_Time_Observation_Proxy)
120       return AMF.UML.Namespaces.UML_Namespace_Access;
121   --  Getter of NamedElement::namespace.
122   --
123   --  Specifies the namespace that owns the NamedElement.
124
125   overriding function Get_Qualified_Name
126    (Self : not null access constant UML_Time_Observation_Proxy)
127       return AMF.Optional_String;
128   --  Getter of NamedElement::qualifiedName.
129   --
130   --  A name which allows the NamedElement to be identified within a
131   --  hierarchy of nested Namespaces. It is constructed from the names of the
132   --  containing namespaces starting at the root of the hierarchy and ending
133   --  with the name of the NamedElement itself.
134
135   overriding function Get_Owning_Template_Parameter
136    (Self : not null access constant UML_Time_Observation_Proxy)
137       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
138   --  Getter of ParameterableElement::owningTemplateParameter.
139   --
140   --  The formal template parameter that owns this element.
141
142   overriding procedure Set_Owning_Template_Parameter
143    (Self : not null access UML_Time_Observation_Proxy;
144     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
145   --  Setter of ParameterableElement::owningTemplateParameter.
146   --
147   --  The formal template parameter that owns this element.
148
149   overriding function Get_Template_Parameter
150    (Self : not null access constant UML_Time_Observation_Proxy)
151       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
152   --  Getter of ParameterableElement::templateParameter.
153   --
154   --  The template parameter that exposes this element as a formal parameter.
155
156   overriding procedure Set_Template_Parameter
157    (Self : not null access UML_Time_Observation_Proxy;
158     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
159   --  Setter of ParameterableElement::templateParameter.
160   --
161   --  The template parameter that exposes this element as a formal parameter.
162
163   overriding function All_Owning_Packages
164    (Self : not null access constant UML_Time_Observation_Proxy)
165       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
166   --  Operation NamedElement::allOwningPackages.
167   --
168   --  The query allOwningPackages() returns all the directly or indirectly
169   --  owning packages.
170
171   overriding function Is_Distinguishable_From
172    (Self : not null access constant UML_Time_Observation_Proxy;
173     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
174     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
175       return Boolean;
176   --  Operation NamedElement::isDistinguishableFrom.
177   --
178   --  The query isDistinguishableFrom() determines whether two NamedElements
179   --  may logically co-exist within a Namespace. By default, two named
180   --  elements are distinguishable if (a) they have unrelated types or (b)
181   --  they have related types but different names.
182
183   overriding function Namespace
184    (Self : not null access constant UML_Time_Observation_Proxy)
185       return AMF.UML.Namespaces.UML_Namespace_Access;
186   --  Operation NamedElement::namespace.
187   --
188   --  Missing derivation for NamedElement::/namespace : Namespace
189
190   overriding function Is_Compatible_With
191    (Self : not null access constant UML_Time_Observation_Proxy;
192     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
193       return Boolean;
194   --  Operation ParameterableElement::isCompatibleWith.
195   --
196   --  The query isCompatibleWith() determines if this parameterable element
197   --  is compatible with the specified parameterable element. By default
198   --  parameterable element P is compatible with parameterable element Q if
199   --  the kind of P is the same or a subtype as the kind of Q. Subclasses
200   --  should override this operation to specify different compatibility
201   --  constraints.
202
203   overriding function Is_Template_Parameter
204    (Self : not null access constant UML_Time_Observation_Proxy)
205       return Boolean;
206   --  Operation ParameterableElement::isTemplateParameter.
207   --
208   --  The query isTemplateParameter() determines if this parameterable
209   --  element is exposed as a formal template parameter.
210
211   overriding procedure Enter_Element
212    (Self    : not null access constant UML_Time_Observation_Proxy;
213     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
214     Control : in out AMF.Visitors.Traverse_Control);
215   --  Dispatch call to corresponding subprogram of visitor interface.
216
217   overriding procedure Leave_Element
218    (Self    : not null access constant UML_Time_Observation_Proxy;
219     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
220     Control : in out AMF.Visitors.Traverse_Control);
221   --  Dispatch call to corresponding subprogram of visitor interface.
222
223   overriding procedure Visit_Element
224    (Self     : not null access constant UML_Time_Observation_Proxy;
225     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
226     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
227     Control  : in out AMF.Visitors.Traverse_Control);
228   --  Dispatch call to corresponding subprogram of iterator interface.
229
230end AMF.Internals.UML_Time_Observations;
231