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