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