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: 2967 $ $Date: 2012-05-12 10:21:56 +0400 (Sat, 12 May 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Internals.UML_Multiplicity_Elements; 45with AMF.Internals.UML_Named_Elements; 46with AMF.UML.Connectable_Element_Template_Parameters; 47with AMF.UML.Connector_Ends.Collections; 48with AMF.UML.Dependencies.Collections; 49with AMF.UML.Multiplicity_Elements; 50with AMF.UML.Named_Elements; 51with AMF.UML.Namespaces; 52with AMF.UML.Operations; 53with AMF.UML.Packages.Collections; 54with AMF.UML.Parameter_Sets.Collections; 55with AMF.UML.Parameterable_Elements; 56with AMF.UML.Parameters; 57with AMF.UML.String_Expressions; 58with AMF.UML.Template_Parameters; 59with AMF.UML.Types; 60with AMF.UML.Value_Specifications; 61with AMF.Visitors; 62 63package AMF.Internals.UML_Parameters is 64 65 package UML_Multiplicity_Elements is 66 new AMF.Internals.UML_Multiplicity_Elements 67 (AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy); 68 69 type UML_Parameter_Proxy is 70 limited new UML_Multiplicity_Elements.UML_Multiplicity_Element_Proxy 71 and AMF.UML.Parameters.UML_Parameter with null record; 72 73 overriding function Get_Default 74 (Self : not null access constant UML_Parameter_Proxy) 75 return AMF.Optional_String; 76 -- Getter of Parameter::default. 77 -- 78 -- Specifies a String that represents a value to be used when no argument 79 -- is supplied for the Parameter. 80 81 overriding procedure Set_Default 82 (Self : not null access UML_Parameter_Proxy; 83 To : AMF.Optional_String); 84 -- Setter of Parameter::default. 85 -- 86 -- Specifies a String that represents a value to be used when no argument 87 -- is supplied for the Parameter. 88 89 overriding function Get_Default_Value 90 (Self : not null access constant UML_Parameter_Proxy) 91 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 92 -- Getter of Parameter::defaultValue. 93 -- 94 -- Specifies a ValueSpecification that represents a value to be used when 95 -- no argument is supplied for the Parameter. 96 97 overriding procedure Set_Default_Value 98 (Self : not null access UML_Parameter_Proxy; 99 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 100 -- Setter of Parameter::defaultValue. 101 -- 102 -- Specifies a ValueSpecification that represents a value to be used when 103 -- no argument is supplied for the Parameter. 104 105 overriding function Get_Direction 106 (Self : not null access constant UML_Parameter_Proxy) 107 return AMF.UML.UML_Parameter_Direction_Kind; 108 -- Getter of Parameter::direction. 109 -- 110 -- Indicates whether a parameter is being sent into or out of a behavioral 111 -- element. 112 113 overriding procedure Set_Direction 114 (Self : not null access UML_Parameter_Proxy; 115 To : AMF.UML.UML_Parameter_Direction_Kind); 116 -- Setter of Parameter::direction. 117 -- 118 -- Indicates whether a parameter is being sent into or out of a behavioral 119 -- element. 120 121 overriding function Get_Effect 122 (Self : not null access constant UML_Parameter_Proxy) 123 return AMF.UML.Optional_UML_Parameter_Effect_Kind; 124 -- Getter of Parameter::effect. 125 -- 126 -- Specifies the effect that the owner of the parameter has on values 127 -- passed in or out of the parameter. 128 129 overriding procedure Set_Effect 130 (Self : not null access UML_Parameter_Proxy; 131 To : AMF.UML.Optional_UML_Parameter_Effect_Kind); 132 -- Setter of Parameter::effect. 133 -- 134 -- Specifies the effect that the owner of the parameter has on values 135 -- passed in or out of the parameter. 136 137 overriding function Get_Is_Exception 138 (Self : not null access constant UML_Parameter_Proxy) 139 return Boolean; 140 -- Getter of Parameter::isException. 141 -- 142 -- Tells whether an output parameter may emit a value to the exclusion of 143 -- the other outputs. 144 145 overriding procedure Set_Is_Exception 146 (Self : not null access UML_Parameter_Proxy; 147 To : Boolean); 148 -- Setter of Parameter::isException. 149 -- 150 -- Tells whether an output parameter may emit a value to the exclusion of 151 -- the other outputs. 152 153 overriding function Get_Is_Stream 154 (Self : not null access constant UML_Parameter_Proxy) 155 return Boolean; 156 -- Getter of Parameter::isStream. 157 -- 158 -- Tells whether an input parameter may accept values while its behavior 159 -- is executing, or whether an output parameter post values while the 160 -- behavior is executing. 161 162 overriding procedure Set_Is_Stream 163 (Self : not null access UML_Parameter_Proxy; 164 To : Boolean); 165 -- Setter of Parameter::isStream. 166 -- 167 -- Tells whether an input parameter may accept values while its behavior 168 -- is executing, or whether an output parameter post values while the 169 -- behavior is executing. 170 171 overriding function Get_Operation 172 (Self : not null access constant UML_Parameter_Proxy) 173 return AMF.UML.Operations.UML_Operation_Access; 174 -- Getter of Parameter::operation. 175 -- 176 -- References the Operation owning this parameter. 177 178 overriding procedure Set_Operation 179 (Self : not null access UML_Parameter_Proxy; 180 To : AMF.UML.Operations.UML_Operation_Access); 181 -- Setter of Parameter::operation. 182 -- 183 -- References the Operation owning this parameter. 184 185 overriding function Get_Parameter_Set 186 (Self : not null access constant UML_Parameter_Proxy) 187 return AMF.UML.Parameter_Sets.Collections.Set_Of_UML_Parameter_Set; 188 -- Getter of Parameter::parameterSet. 189 -- 190 -- The parameter sets containing the parameter. See ParameterSet. 191 192 overriding function Get_End 193 (Self : not null access constant UML_Parameter_Proxy) 194 return AMF.UML.Connector_Ends.Collections.Ordered_Set_Of_UML_Connector_End; 195 -- Getter of ConnectableElement::end. 196 -- 197 -- Denotes a set of connector ends that attaches to this connectable 198 -- element. 199 200 overriding function Get_Template_Parameter 201 (Self : not null access constant UML_Parameter_Proxy) 202 return AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access; 203 -- Getter of ConnectableElement::templateParameter. 204 -- 205 -- The ConnectableElementTemplateParameter for this ConnectableElement 206 -- parameter. 207 208 overriding procedure Set_Template_Parameter 209 (Self : not null access UML_Parameter_Proxy; 210 To : AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access); 211 -- Setter of ConnectableElement::templateParameter. 212 -- 213 -- The ConnectableElementTemplateParameter for this ConnectableElement 214 -- parameter. 215 216 overriding function Get_Type 217 (Self : not null access constant UML_Parameter_Proxy) 218 return AMF.UML.Types.UML_Type_Access; 219 -- Getter of TypedElement::type. 220 -- 221 -- The type of the TypedElement. 222 -- This information is derived from the return result for this Operation. 223 224 overriding procedure Set_Type 225 (Self : not null access UML_Parameter_Proxy; 226 To : AMF.UML.Types.UML_Type_Access); 227 -- Setter of TypedElement::type. 228 -- 229 -- The type of the TypedElement. 230 -- This information is derived from the return result for this Operation. 231 232 overriding function Get_Client_Dependency 233 (Self : not null access constant UML_Parameter_Proxy) 234 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 235 -- Getter of NamedElement::clientDependency. 236 -- 237 -- Indicates the dependencies that reference the client. 238 239 overriding function Get_Name_Expression 240 (Self : not null access constant UML_Parameter_Proxy) 241 return AMF.UML.String_Expressions.UML_String_Expression_Access; 242 -- Getter of NamedElement::nameExpression. 243 -- 244 -- The string expression used to define the name of this named element. 245 246 overriding procedure Set_Name_Expression 247 (Self : not null access UML_Parameter_Proxy; 248 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 249 -- Setter of NamedElement::nameExpression. 250 -- 251 -- The string expression used to define the name of this named element. 252 253 overriding function Get_Namespace 254 (Self : not null access constant UML_Parameter_Proxy) 255 return AMF.UML.Namespaces.UML_Namespace_Access; 256 -- Getter of NamedElement::namespace. 257 -- 258 -- Specifies the namespace that owns the NamedElement. 259 260 overriding function Get_Qualified_Name 261 (Self : not null access constant UML_Parameter_Proxy) 262 return AMF.Optional_String; 263 -- Getter of NamedElement::qualifiedName. 264 -- 265 -- A name which allows the NamedElement to be identified within a 266 -- hierarchy of nested Namespaces. It is constructed from the names of the 267 -- containing namespaces starting at the root of the hierarchy and ending 268 -- with the name of the NamedElement itself. 269 270 overriding function Get_Owning_Template_Parameter 271 (Self : not null access constant UML_Parameter_Proxy) 272 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 273 -- Getter of ParameterableElement::owningTemplateParameter. 274 -- 275 -- The formal template parameter that owns this element. 276 277 overriding procedure Set_Owning_Template_Parameter 278 (Self : not null access UML_Parameter_Proxy; 279 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 280 -- Setter of ParameterableElement::owningTemplateParameter. 281 -- 282 -- The formal template parameter that owns this element. 283 284 overriding function Get_Template_Parameter 285 (Self : not null access constant UML_Parameter_Proxy) 286 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 287 -- Getter of ParameterableElement::templateParameter. 288 -- 289 -- The template parameter that exposes this element as a formal parameter. 290 291 overriding procedure Set_Template_Parameter 292 (Self : not null access UML_Parameter_Proxy; 293 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 294 -- Setter of ParameterableElement::templateParameter. 295 -- 296 -- The template parameter that exposes this element as a formal parameter. 297 298 overriding function Default 299 (Self : not null access constant UML_Parameter_Proxy) 300 return AMF.Optional_String; 301 -- Operation Parameter::default. 302 -- 303 -- Missing derivation for Parameter::/default : String 304 305 overriding function Compatible_With 306 (Self : not null access constant UML_Parameter_Proxy; 307 Other : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access) 308 return Boolean; 309 -- Operation MultiplicityElement::compatibleWith. 310 -- 311 -- The operation compatibleWith takes another multiplicity as input. It 312 -- checks if one multiplicity is compatible with another. 313 314 overriding function Includes_Cardinality 315 (Self : not null access constant UML_Parameter_Proxy; 316 C : Integer) 317 return Boolean; 318 -- Operation MultiplicityElement::includesCardinality. 319 -- 320 -- The query includesCardinality() checks whether the specified 321 -- cardinality is valid for this multiplicity. 322 323 overriding function Includes_Multiplicity 324 (Self : not null access constant UML_Parameter_Proxy; 325 M : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access) 326 return Boolean; 327 -- Operation MultiplicityElement::includesMultiplicity. 328 -- 329 -- The query includesMultiplicity() checks whether this multiplicity 330 -- includes all the cardinalities allowed by the specified multiplicity. 331 332 overriding function Iss 333 (Self : not null access constant UML_Parameter_Proxy; 334 Lowerbound : Integer; 335 Upperbound : Integer) 336 return Boolean; 337 -- Operation MultiplicityElement::is. 338 -- 339 -- The operation is determines if the upper and lower bound of the ranges 340 -- are the ones given. 341 342 overriding function Ends 343 (Self : not null access constant UML_Parameter_Proxy) 344 return AMF.UML.Connector_Ends.Collections.Set_Of_UML_Connector_End; 345 -- Operation ConnectableElement::end. 346 -- 347 -- Missing derivation for ConnectableElement::/end : ConnectorEnd 348 349 overriding function All_Owning_Packages 350 (Self : not null access constant UML_Parameter_Proxy) 351 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 352 -- Operation NamedElement::allOwningPackages. 353 -- 354 -- The query allOwningPackages() returns all the directly or indirectly 355 -- owning packages. 356 357 overriding function Is_Distinguishable_From 358 (Self : not null access constant UML_Parameter_Proxy; 359 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 360 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 361 return Boolean; 362 -- Operation NamedElement::isDistinguishableFrom. 363 -- 364 -- The query isDistinguishableFrom() determines whether two NamedElements 365 -- may logically co-exist within a Namespace. By default, two named 366 -- elements are distinguishable if (a) they have unrelated types or (b) 367 -- they have related types but different names. 368 369 overriding function Namespace 370 (Self : not null access constant UML_Parameter_Proxy) 371 return AMF.UML.Namespaces.UML_Namespace_Access; 372 -- Operation NamedElement::namespace. 373 -- 374 -- Missing derivation for NamedElement::/namespace : Namespace 375 376 overriding function Is_Compatible_With 377 (Self : not null access constant UML_Parameter_Proxy; 378 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 379 return Boolean; 380 -- Operation ParameterableElement::isCompatibleWith. 381 -- 382 -- The query isCompatibleWith() determines if this parameterable element 383 -- is compatible with the specified parameterable element. By default 384 -- parameterable element P is compatible with parameterable element Q if 385 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 386 -- should override this operation to specify different compatibility 387 -- constraints. 388 389 overriding function Is_Template_Parameter 390 (Self : not null access constant UML_Parameter_Proxy) 391 return Boolean; 392 -- Operation ParameterableElement::isTemplateParameter. 393 -- 394 -- The query isTemplateParameter() determines if this parameterable 395 -- element is exposed as a formal template parameter. 396 397 overriding procedure Enter_Element 398 (Self : not null access constant UML_Parameter_Proxy; 399 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 400 Control : in out AMF.Visitors.Traverse_Control); 401 -- Dispatch call to corresponding subprogram of visitor interface. 402 403 overriding procedure Leave_Element 404 (Self : not null access constant UML_Parameter_Proxy; 405 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 406 Control : in out AMF.Visitors.Traverse_Control); 407 -- Dispatch call to corresponding subprogram of visitor interface. 408 409 overriding procedure Visit_Element 410 (Self : not null access constant UML_Parameter_Proxy; 411 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 412 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 413 Control : in out AMF.Visitors.Traverse_Control); 414 -- Dispatch call to corresponding subprogram of iterator interface. 415 416end AMF.Internals.UML_Parameters; 417