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.Call_Behavior_Actions; 52with AMF.UML.Classifiers.Collections; 53with AMF.UML.Constraints.Collections; 54with AMF.UML.Dependencies.Collections; 55with AMF.UML.Exception_Handlers.Collections; 56with AMF.UML.Input_Pins.Collections; 57with AMF.UML.Interruptible_Activity_Regions.Collections; 58with AMF.UML.Named_Elements; 59with AMF.UML.Namespaces; 60with AMF.UML.Output_Pins.Collections; 61with AMF.UML.Packages.Collections; 62with AMF.UML.Ports; 63with AMF.UML.Redefinable_Elements.Collections; 64with AMF.UML.String_Expressions; 65with AMF.UML.Structured_Activity_Nodes; 66with AMF.Visitors; 67 68package AMF.Internals.UML_Call_Behavior_Actions is 69 70 type UML_Call_Behavior_Action_Proxy is 71 limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy 72 and AMF.UML.Call_Behavior_Actions.UML_Call_Behavior_Action with null record; 73 74 overriding function Get_Behavior 75 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 76 return AMF.UML.Behaviors.UML_Behavior_Access; 77 -- Getter of CallBehaviorAction::behavior. 78 -- 79 -- The invoked behavior. It must be capable of accepting and returning 80 -- control. 81 82 overriding procedure Set_Behavior 83 (Self : not null access UML_Call_Behavior_Action_Proxy; 84 To : AMF.UML.Behaviors.UML_Behavior_Access); 85 -- Setter of CallBehaviorAction::behavior. 86 -- 87 -- The invoked behavior. It must be capable of accepting and returning 88 -- control. 89 90 overriding function Get_Is_Synchronous 91 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 92 return Boolean; 93 -- Getter of CallAction::isSynchronous. 94 -- 95 -- If true, the call is synchronous and the caller waits for completion of 96 -- the invoked behavior. If false, the call is asynchronous and the caller 97 -- proceeds immediately and does not expect a return values. 98 99 overriding procedure Set_Is_Synchronous 100 (Self : not null access UML_Call_Behavior_Action_Proxy; 101 To : Boolean); 102 -- Setter of CallAction::isSynchronous. 103 -- 104 -- If true, the call is synchronous and the caller waits for completion of 105 -- the invoked behavior. If false, the call is asynchronous and the caller 106 -- proceeds immediately and does not expect a return values. 107 108 overriding function Get_Result 109 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 110 return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin; 111 -- Getter of CallAction::result. 112 -- 113 -- A list of output pins where the results of performing the invocation 114 -- are placed. 115 116 overriding function Get_Argument 117 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 118 return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin; 119 -- Getter of InvocationAction::argument. 120 -- 121 -- Specification of the ordered set of argument values that appears during 122 -- execution. 123 124 overriding function Get_On_Port 125 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 126 return AMF.UML.Ports.UML_Port_Access; 127 -- Getter of InvocationAction::onPort. 128 -- 129 -- A optional port of the receiver object on which the behavioral feature 130 -- is invoked. 131 132 overriding procedure Set_On_Port 133 (Self : not null access UML_Call_Behavior_Action_Proxy; 134 To : AMF.UML.Ports.UML_Port_Access); 135 -- Setter of InvocationAction::onPort. 136 -- 137 -- A optional port of the receiver object on which the behavioral feature 138 -- is invoked. 139 140 overriding function Get_Context 141 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 142 return AMF.UML.Classifiers.UML_Classifier_Access; 143 -- Getter of Action::context. 144 -- 145 -- The classifier that owns the behavior of which this action is a part. 146 147 overriding function Get_Input 148 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 149 return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin; 150 -- Getter of Action::input. 151 -- 152 -- The ordered set of input pins connected to the Action. These are among 153 -- the total set of inputs. 154 155 overriding function Get_Is_Locally_Reentrant 156 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 157 return Boolean; 158 -- Getter of Action::isLocallyReentrant. 159 -- 160 -- If true, the action can begin a new, concurrent execution, even if 161 -- there is already another execution of the action ongoing. If false, the 162 -- action cannot begin a new execution until any previous execution has 163 -- completed. 164 165 overriding procedure Set_Is_Locally_Reentrant 166 (Self : not null access UML_Call_Behavior_Action_Proxy; 167 To : Boolean); 168 -- Setter of Action::isLocallyReentrant. 169 -- 170 -- If true, the action can begin a new, concurrent execution, even if 171 -- there is already another execution of the action ongoing. If false, the 172 -- action cannot begin a new execution until any previous execution has 173 -- completed. 174 175 overriding function Get_Local_Postcondition 176 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 177 return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint; 178 -- Getter of Action::localPostcondition. 179 -- 180 -- Constraint that must be satisfied when executed is completed. 181 182 overriding function Get_Local_Precondition 183 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 184 return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint; 185 -- Getter of Action::localPrecondition. 186 -- 187 -- Constraint that must be satisfied when execution is started. 188 189 overriding function Get_Output 190 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 191 return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin; 192 -- Getter of Action::output. 193 -- 194 -- The ordered set of output pins connected to the Action. The action 195 -- places its results onto pins in this set. 196 197 overriding function Get_Handler 198 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 199 return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler; 200 -- Getter of ExecutableNode::handler. 201 -- 202 -- A set of exception handlers that are examined if an uncaught exception 203 -- propagates to the outer level of the executable node. 204 205 overriding function Get_Activity 206 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 207 return AMF.UML.Activities.UML_Activity_Access; 208 -- Getter of ActivityNode::activity. 209 -- 210 -- Activity containing the node. 211 212 overriding procedure Set_Activity 213 (Self : not null access UML_Call_Behavior_Action_Proxy; 214 To : AMF.UML.Activities.UML_Activity_Access); 215 -- Setter of ActivityNode::activity. 216 -- 217 -- Activity containing the node. 218 219 overriding function Get_In_Group 220 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 221 return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group; 222 -- Getter of ActivityNode::inGroup. 223 -- 224 -- Groups containing the node. 225 226 overriding function Get_In_Interruptible_Region 227 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 228 return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region; 229 -- Getter of ActivityNode::inInterruptibleRegion. 230 -- 231 -- Interruptible regions containing the node. 232 233 overriding function Get_In_Partition 234 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 235 return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition; 236 -- Getter of ActivityNode::inPartition. 237 -- 238 -- Partitions containing the node. 239 240 overriding function Get_In_Structured_Node 241 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 242 return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access; 243 -- Getter of ActivityNode::inStructuredNode. 244 -- 245 -- Structured activity node containing the node. 246 247 overriding procedure Set_In_Structured_Node 248 (Self : not null access UML_Call_Behavior_Action_Proxy; 249 To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access); 250 -- Setter of ActivityNode::inStructuredNode. 251 -- 252 -- Structured activity node containing the node. 253 254 overriding function Get_Incoming 255 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 256 return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; 257 -- Getter of ActivityNode::incoming. 258 -- 259 -- Edges that have the node as target. 260 261 overriding function Get_Outgoing 262 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 263 return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; 264 -- Getter of ActivityNode::outgoing. 265 -- 266 -- Edges that have the node as source. 267 268 overriding function Get_Redefined_Node 269 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 270 return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node; 271 -- Getter of ActivityNode::redefinedNode. 272 -- 273 -- Inherited nodes replaced by this node in a specialization of the 274 -- activity. 275 276 overriding function Get_Is_Leaf 277 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 278 return Boolean; 279 -- Getter of RedefinableElement::isLeaf. 280 -- 281 -- Indicates whether it is possible to further redefine a 282 -- RedefinableElement. If the value is true, then it is not possible to 283 -- further redefine the RedefinableElement. Note that this property is 284 -- preserved through package merge operations; that is, the capability to 285 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 286 -- the resulting RedefinableElement of a package merge operation where a 287 -- RedefinableElement with isLeaf=false is merged with a matching 288 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 289 -- will have isLeaf=false. Default value is false. 290 291 overriding procedure Set_Is_Leaf 292 (Self : not null access UML_Call_Behavior_Action_Proxy; 293 To : Boolean); 294 -- Setter of RedefinableElement::isLeaf. 295 -- 296 -- Indicates whether it is possible to further redefine a 297 -- RedefinableElement. If the value is true, then it is not possible to 298 -- further redefine the RedefinableElement. Note that this property is 299 -- preserved through package merge operations; that is, the capability to 300 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 301 -- the resulting RedefinableElement of a package merge operation where a 302 -- RedefinableElement with isLeaf=false is merged with a matching 303 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 304 -- will have isLeaf=false. Default value is false. 305 306 overriding function Get_Redefined_Element 307 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 308 return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; 309 -- Getter of RedefinableElement::redefinedElement. 310 -- 311 -- The redefinable element that is being redefined by this element. 312 313 overriding function Get_Redefinition_Context 314 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 315 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; 316 -- Getter of RedefinableElement::redefinitionContext. 317 -- 318 -- References the contexts that this element may be redefined from. 319 320 overriding function Get_Client_Dependency 321 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 322 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 323 -- Getter of NamedElement::clientDependency. 324 -- 325 -- Indicates the dependencies that reference the client. 326 327 overriding function Get_Name_Expression 328 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 329 return AMF.UML.String_Expressions.UML_String_Expression_Access; 330 -- Getter of NamedElement::nameExpression. 331 -- 332 -- The string expression used to define the name of this named element. 333 334 overriding procedure Set_Name_Expression 335 (Self : not null access UML_Call_Behavior_Action_Proxy; 336 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 337 -- Setter of NamedElement::nameExpression. 338 -- 339 -- The string expression used to define the name of this named element. 340 341 overriding function Get_Namespace 342 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 343 return AMF.UML.Namespaces.UML_Namespace_Access; 344 -- Getter of NamedElement::namespace. 345 -- 346 -- Specifies the namespace that owns the NamedElement. 347 348 overriding function Get_Qualified_Name 349 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 350 return AMF.Optional_String; 351 -- Getter of NamedElement::qualifiedName. 352 -- 353 -- A name which allows the NamedElement to be identified within a 354 -- hierarchy of nested Namespaces. It is constructed from the names of the 355 -- containing namespaces starting at the root of the hierarchy and ending 356 -- with the name of the NamedElement itself. 357 358 overriding function Context 359 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 360 return AMF.UML.Classifiers.UML_Classifier_Access; 361 -- Operation Action::context. 362 -- 363 -- Missing derivation for Action::/context : Classifier 364 365 overriding function Is_Consistent_With 366 (Self : not null access constant UML_Call_Behavior_Action_Proxy; 367 Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 368 return Boolean; 369 -- Operation RedefinableElement::isConsistentWith. 370 -- 371 -- The query isConsistentWith() specifies, for any two RedefinableElements 372 -- in a context in which redefinition is possible, whether redefinition 373 -- would be logically consistent. By default, this is false; this 374 -- operation must be overridden for subclasses of RedefinableElement to 375 -- define the consistency conditions. 376 377 overriding function Is_Redefinition_Context_Valid 378 (Self : not null access constant UML_Call_Behavior_Action_Proxy; 379 Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 380 return Boolean; 381 -- Operation RedefinableElement::isRedefinitionContextValid. 382 -- 383 -- The query isRedefinitionContextValid() specifies whether the 384 -- redefinition contexts of this RedefinableElement are properly related 385 -- to the redefinition contexts of the specified RedefinableElement to 386 -- allow this element to redefine the other. By default at least one of 387 -- the redefinition contexts of this element must be a specialization of 388 -- at least one of the redefinition contexts of the specified element. 389 390 overriding function All_Owning_Packages 391 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 392 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 393 -- Operation NamedElement::allOwningPackages. 394 -- 395 -- The query allOwningPackages() returns all the directly or indirectly 396 -- owning packages. 397 398 overriding function Is_Distinguishable_From 399 (Self : not null access constant UML_Call_Behavior_Action_Proxy; 400 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 401 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 402 return Boolean; 403 -- Operation NamedElement::isDistinguishableFrom. 404 -- 405 -- The query isDistinguishableFrom() determines whether two NamedElements 406 -- may logically co-exist within a Namespace. By default, two named 407 -- elements are distinguishable if (a) they have unrelated types or (b) 408 -- they have related types but different names. 409 410 overriding function Namespace 411 (Self : not null access constant UML_Call_Behavior_Action_Proxy) 412 return AMF.UML.Namespaces.UML_Namespace_Access; 413 -- Operation NamedElement::namespace. 414 -- 415 -- Missing derivation for NamedElement::/namespace : Namespace 416 417 overriding procedure Enter_Element 418 (Self : not null access constant UML_Call_Behavior_Action_Proxy; 419 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 420 Control : in out AMF.Visitors.Traverse_Control); 421 -- Dispatch call to corresponding subprogram of visitor interface. 422 423 overriding procedure Leave_Element 424 (Self : not null access constant UML_Call_Behavior_Action_Proxy; 425 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 426 Control : in out AMF.Visitors.Traverse_Control); 427 -- Dispatch call to corresponding subprogram of visitor interface. 428 429 overriding procedure Visit_Element 430 (Self : not null access constant UML_Call_Behavior_Action_Proxy; 431 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 432 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 433 Control : in out AMF.Visitors.Traverse_Control); 434 -- Dispatch call to corresponding subprogram of iterator interface. 435 436end AMF.Internals.UML_Call_Behavior_Actions; 437