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