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