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_Input_Pins; 45with AMF.UML.Activities; 46with AMF.UML.Activity_Edges.Collections; 47with AMF.UML.Activity_Groups.Collections; 48with AMF.UML.Activity_Nodes.Collections; 49with AMF.UML.Activity_Partitions.Collections; 50with AMF.UML.Behaviors; 51with AMF.UML.Classifiers.Collections; 52with AMF.UML.Dependencies.Collections; 53with AMF.UML.Interruptible_Activity_Regions.Collections; 54with AMF.UML.Multiplicity_Elements; 55with AMF.UML.Named_Elements; 56with AMF.UML.Namespaces; 57with AMF.UML.Packages.Collections; 58with AMF.UML.Redefinable_Elements.Collections; 59with AMF.UML.States.Collections; 60with AMF.UML.String_Expressions; 61with AMF.UML.Structured_Activity_Nodes; 62with AMF.UML.Types; 63with AMF.UML.Value_Pins; 64with AMF.UML.Value_Specifications; 65with AMF.Visitors; 66 67package AMF.Internals.UML_Value_Pins is 68 69 type UML_Value_Pin_Proxy is 70 limited new AMF.Internals.UML_Input_Pins.UML_Input_Pin_Proxy 71 and AMF.UML.Value_Pins.UML_Value_Pin with null record; 72 73 overriding function Get_Value 74 (Self : not null access constant UML_Value_Pin_Proxy) 75 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 76 -- Getter of ValuePin::value. 77 -- 78 -- Value that the pin will provide. 79 80 overriding procedure Set_Value 81 (Self : not null access UML_Value_Pin_Proxy; 82 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 83 -- Setter of ValuePin::value. 84 -- 85 -- Value that the pin will provide. 86 87 overriding function Get_Is_Control 88 (Self : not null access constant UML_Value_Pin_Proxy) 89 return Boolean; 90 -- Getter of Pin::isControl. 91 -- 92 -- Tells whether the pins provide data to the actions, or just controls 93 -- when it executes it. 94 95 overriding procedure Set_Is_Control 96 (Self : not null access UML_Value_Pin_Proxy; 97 To : Boolean); 98 -- Setter of Pin::isControl. 99 -- 100 -- Tells whether the pins provide data to the actions, or just controls 101 -- when it executes it. 102 103 overriding function Get_In_State 104 (Self : not null access constant UML_Value_Pin_Proxy) 105 return AMF.UML.States.Collections.Set_Of_UML_State; 106 -- Getter of ObjectNode::inState. 107 -- 108 -- The required states of the object available at this point in the 109 -- activity. 110 111 overriding function Get_Is_Control_Type 112 (Self : not null access constant UML_Value_Pin_Proxy) 113 return Boolean; 114 -- Getter of ObjectNode::isControlType. 115 -- 116 -- Tells whether the type of the object node is to be treated as control. 117 118 overriding procedure Set_Is_Control_Type 119 (Self : not null access UML_Value_Pin_Proxy; 120 To : Boolean); 121 -- Setter of ObjectNode::isControlType. 122 -- 123 -- Tells whether the type of the object node is to be treated as control. 124 125 overriding function Get_Ordering 126 (Self : not null access constant UML_Value_Pin_Proxy) 127 return AMF.UML.UML_Object_Node_Ordering_Kind; 128 -- Getter of ObjectNode::ordering. 129 -- 130 -- Tells whether and how the tokens in the object node are ordered for 131 -- selection to traverse edges outgoing from the object node. 132 133 overriding procedure Set_Ordering 134 (Self : not null access UML_Value_Pin_Proxy; 135 To : AMF.UML.UML_Object_Node_Ordering_Kind); 136 -- Setter of ObjectNode::ordering. 137 -- 138 -- Tells whether and how the tokens in the object node are ordered for 139 -- selection to traverse edges outgoing from the object node. 140 141 overriding function Get_Selection 142 (Self : not null access constant UML_Value_Pin_Proxy) 143 return AMF.UML.Behaviors.UML_Behavior_Access; 144 -- Getter of ObjectNode::selection. 145 -- 146 -- Selects tokens for outgoing edges. 147 148 overriding procedure Set_Selection 149 (Self : not null access UML_Value_Pin_Proxy; 150 To : AMF.UML.Behaviors.UML_Behavior_Access); 151 -- Setter of ObjectNode::selection. 152 -- 153 -- Selects tokens for outgoing edges. 154 155 overriding function Get_Upper_Bound 156 (Self : not null access constant UML_Value_Pin_Proxy) 157 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 158 -- Getter of ObjectNode::upperBound. 159 -- 160 -- The maximum number of tokens allowed in the node. Objects cannot flow 161 -- into the node if the upper bound is reached. 162 163 overriding procedure Set_Upper_Bound 164 (Self : not null access UML_Value_Pin_Proxy; 165 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 166 -- Setter of ObjectNode::upperBound. 167 -- 168 -- The maximum number of tokens allowed in the node. Objects cannot flow 169 -- into the node if the upper bound is reached. 170 171 overriding function Get_Activity 172 (Self : not null access constant UML_Value_Pin_Proxy) 173 return AMF.UML.Activities.UML_Activity_Access; 174 -- Getter of ActivityNode::activity. 175 -- 176 -- Activity containing the node. 177 178 overriding procedure Set_Activity 179 (Self : not null access UML_Value_Pin_Proxy; 180 To : AMF.UML.Activities.UML_Activity_Access); 181 -- Setter of ActivityNode::activity. 182 -- 183 -- Activity containing the node. 184 185 overriding function Get_In_Group 186 (Self : not null access constant UML_Value_Pin_Proxy) 187 return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group; 188 -- Getter of ActivityNode::inGroup. 189 -- 190 -- Groups containing the node. 191 192 overriding function Get_In_Interruptible_Region 193 (Self : not null access constant UML_Value_Pin_Proxy) 194 return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region; 195 -- Getter of ActivityNode::inInterruptibleRegion. 196 -- 197 -- Interruptible regions containing the node. 198 199 overriding function Get_In_Partition 200 (Self : not null access constant UML_Value_Pin_Proxy) 201 return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition; 202 -- Getter of ActivityNode::inPartition. 203 -- 204 -- Partitions containing the node. 205 206 overriding function Get_In_Structured_Node 207 (Self : not null access constant UML_Value_Pin_Proxy) 208 return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access; 209 -- Getter of ActivityNode::inStructuredNode. 210 -- 211 -- Structured activity node containing the node. 212 213 overriding procedure Set_In_Structured_Node 214 (Self : not null access UML_Value_Pin_Proxy; 215 To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access); 216 -- Setter of ActivityNode::inStructuredNode. 217 -- 218 -- Structured activity node containing the node. 219 220 overriding function Get_Incoming 221 (Self : not null access constant UML_Value_Pin_Proxy) 222 return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; 223 -- Getter of ActivityNode::incoming. 224 -- 225 -- Edges that have the node as target. 226 227 overriding function Get_Outgoing 228 (Self : not null access constant UML_Value_Pin_Proxy) 229 return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; 230 -- Getter of ActivityNode::outgoing. 231 -- 232 -- Edges that have the node as source. 233 234 overriding function Get_Redefined_Node 235 (Self : not null access constant UML_Value_Pin_Proxy) 236 return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node; 237 -- Getter of ActivityNode::redefinedNode. 238 -- 239 -- Inherited nodes replaced by this node in a specialization of the 240 -- activity. 241 242 overriding function Get_Is_Leaf 243 (Self : not null access constant UML_Value_Pin_Proxy) 244 return Boolean; 245 -- Getter of RedefinableElement::isLeaf. 246 -- 247 -- Indicates whether it is possible to further redefine a 248 -- RedefinableElement. If the value is true, then it is not possible to 249 -- further redefine the RedefinableElement. Note that this property is 250 -- preserved through package merge operations; that is, the capability to 251 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 252 -- the resulting RedefinableElement of a package merge operation where a 253 -- RedefinableElement with isLeaf=false is merged with a matching 254 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 255 -- will have isLeaf=false. Default value is false. 256 257 overriding procedure Set_Is_Leaf 258 (Self : not null access UML_Value_Pin_Proxy; 259 To : Boolean); 260 -- Setter of RedefinableElement::isLeaf. 261 -- 262 -- Indicates whether it is possible to further redefine a 263 -- RedefinableElement. If the value is true, then it is not possible to 264 -- further redefine the RedefinableElement. Note that this property is 265 -- preserved through package merge operations; that is, the capability to 266 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 267 -- the resulting RedefinableElement of a package merge operation where a 268 -- RedefinableElement with isLeaf=false is merged with a matching 269 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 270 -- will have isLeaf=false. Default value is false. 271 272 overriding function Get_Redefined_Element 273 (Self : not null access constant UML_Value_Pin_Proxy) 274 return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; 275 -- Getter of RedefinableElement::redefinedElement. 276 -- 277 -- The redefinable element that is being redefined by this element. 278 279 overriding function Get_Redefinition_Context 280 (Self : not null access constant UML_Value_Pin_Proxy) 281 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; 282 -- Getter of RedefinableElement::redefinitionContext. 283 -- 284 -- References the contexts that this element may be redefined from. 285 286 overriding function Get_Client_Dependency 287 (Self : not null access constant UML_Value_Pin_Proxy) 288 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 289 -- Getter of NamedElement::clientDependency. 290 -- 291 -- Indicates the dependencies that reference the client. 292 293 overriding function Get_Name_Expression 294 (Self : not null access constant UML_Value_Pin_Proxy) 295 return AMF.UML.String_Expressions.UML_String_Expression_Access; 296 -- Getter of NamedElement::nameExpression. 297 -- 298 -- The string expression used to define the name of this named element. 299 300 overriding procedure Set_Name_Expression 301 (Self : not null access UML_Value_Pin_Proxy; 302 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 303 -- Setter of NamedElement::nameExpression. 304 -- 305 -- The string expression used to define the name of this named element. 306 307 overriding function Get_Namespace 308 (Self : not null access constant UML_Value_Pin_Proxy) 309 return AMF.UML.Namespaces.UML_Namespace_Access; 310 -- Getter of NamedElement::namespace. 311 -- 312 -- Specifies the namespace that owns the NamedElement. 313 314 overriding function Get_Qualified_Name 315 (Self : not null access constant UML_Value_Pin_Proxy) 316 return AMF.Optional_String; 317 -- Getter of NamedElement::qualifiedName. 318 -- 319 -- A name which allows the NamedElement to be identified within a 320 -- hierarchy of nested Namespaces. It is constructed from the names of the 321 -- containing namespaces starting at the root of the hierarchy and ending 322 -- with the name of the NamedElement itself. 323 324 overriding function Get_Type 325 (Self : not null access constant UML_Value_Pin_Proxy) 326 return AMF.UML.Types.UML_Type_Access; 327 -- Getter of TypedElement::type. 328 -- 329 -- The type of the TypedElement. 330 -- This information is derived from the return result for this Operation. 331 332 overriding procedure Set_Type 333 (Self : not null access UML_Value_Pin_Proxy; 334 To : AMF.UML.Types.UML_Type_Access); 335 -- Setter of TypedElement::type. 336 -- 337 -- The type of the TypedElement. 338 -- This information is derived from the return result for this Operation. 339 340 overriding function Is_Consistent_With 341 (Self : not null access constant UML_Value_Pin_Proxy; 342 Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 343 return Boolean; 344 -- Operation RedefinableElement::isConsistentWith. 345 -- 346 -- The query isConsistentWith() specifies, for any two RedefinableElements 347 -- in a context in which redefinition is possible, whether redefinition 348 -- would be logically consistent. By default, this is false; this 349 -- operation must be overridden for subclasses of RedefinableElement to 350 -- define the consistency conditions. 351 352 overriding function Is_Redefinition_Context_Valid 353 (Self : not null access constant UML_Value_Pin_Proxy; 354 Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 355 return Boolean; 356 -- Operation RedefinableElement::isRedefinitionContextValid. 357 -- 358 -- The query isRedefinitionContextValid() specifies whether the 359 -- redefinition contexts of this RedefinableElement are properly related 360 -- to the redefinition contexts of the specified RedefinableElement to 361 -- allow this element to redefine the other. By default at least one of 362 -- the redefinition contexts of this element must be a specialization of 363 -- at least one of the redefinition contexts of the specified element. 364 365 overriding function All_Owning_Packages 366 (Self : not null access constant UML_Value_Pin_Proxy) 367 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 368 -- Operation NamedElement::allOwningPackages. 369 -- 370 -- The query allOwningPackages() returns all the directly or indirectly 371 -- owning packages. 372 373 overriding function Is_Distinguishable_From 374 (Self : not null access constant UML_Value_Pin_Proxy; 375 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 376 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 377 return Boolean; 378 -- Operation NamedElement::isDistinguishableFrom. 379 -- 380 -- The query isDistinguishableFrom() determines whether two NamedElements 381 -- may logically co-exist within a Namespace. By default, two named 382 -- elements are distinguishable if (a) they have unrelated types or (b) 383 -- they have related types but different names. 384 385 overriding function Namespace 386 (Self : not null access constant UML_Value_Pin_Proxy) 387 return AMF.UML.Namespaces.UML_Namespace_Access; 388 -- Operation NamedElement::namespace. 389 -- 390 -- Missing derivation for NamedElement::/namespace : Namespace 391 392 overriding function Compatible_With 393 (Self : not null access constant UML_Value_Pin_Proxy; 394 Other : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access) 395 return Boolean; 396 -- Operation MultiplicityElement::compatibleWith. 397 -- 398 -- The operation compatibleWith takes another multiplicity as input. It 399 -- checks if one multiplicity is compatible with another. 400 401 overriding function Includes_Cardinality 402 (Self : not null access constant UML_Value_Pin_Proxy; 403 C : Integer) 404 return Boolean; 405 -- Operation MultiplicityElement::includesCardinality. 406 -- 407 -- The query includesCardinality() checks whether the specified 408 -- cardinality is valid for this multiplicity. 409 410 overriding function Includes_Multiplicity 411 (Self : not null access constant UML_Value_Pin_Proxy; 412 M : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access) 413 return Boolean; 414 -- Operation MultiplicityElement::includesMultiplicity. 415 -- 416 -- The query includesMultiplicity() checks whether this multiplicity 417 -- includes all the cardinalities allowed by the specified multiplicity. 418 419 overriding function Iss 420 (Self : not null access constant UML_Value_Pin_Proxy; 421 Lowerbound : Integer; 422 Upperbound : Integer) 423 return Boolean; 424 -- Operation MultiplicityElement::is. 425 -- 426 -- The operation is determines if the upper and lower bound of the ranges 427 -- are the ones given. 428 429 overriding procedure Enter_Element 430 (Self : not null access constant UML_Value_Pin_Proxy; 431 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 432 Control : in out AMF.Visitors.Traverse_Control); 433 -- Dispatch call to corresponding subprogram of visitor interface. 434 435 overriding procedure Leave_Element 436 (Self : not null access constant UML_Value_Pin_Proxy; 437 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 438 Control : in out AMF.Visitors.Traverse_Control); 439 -- Dispatch call to corresponding subprogram of visitor interface. 440 441 overriding procedure Visit_Element 442 (Self : not null access constant UML_Value_Pin_Proxy; 443 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 444 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 445 Control : in out AMF.Visitors.Traverse_Control); 446 -- Dispatch call to corresponding subprogram of iterator interface. 447 448end AMF.Internals.UML_Value_Pins; 449