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; 49with AMF.UML.Activity_Partitions.Collections; 50with AMF.UML.Classifiers.Collections; 51with AMF.UML.Control_Flows; 52with AMF.UML.Dependencies.Collections; 53with AMF.UML.Interruptible_Activity_Regions; 54with AMF.UML.Named_Elements; 55with AMF.UML.Namespaces; 56with AMF.UML.Packages.Collections; 57with AMF.UML.Redefinable_Elements.Collections; 58with AMF.UML.String_Expressions; 59with AMF.UML.Structured_Activity_Nodes; 60with AMF.UML.Value_Specifications; 61with AMF.Visitors; 62 63package AMF.Internals.UML_Control_Flows is 64 65 type UML_Control_Flow_Proxy is 66 limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy 67 and AMF.UML.Control_Flows.UML_Control_Flow with null record; 68 69 overriding function Get_Activity 70 (Self : not null access constant UML_Control_Flow_Proxy) 71 return AMF.UML.Activities.UML_Activity_Access; 72 -- Getter of ActivityEdge::activity. 73 -- 74 -- Activity containing the edge. 75 76 overriding procedure Set_Activity 77 (Self : not null access UML_Control_Flow_Proxy; 78 To : AMF.UML.Activities.UML_Activity_Access); 79 -- Setter of ActivityEdge::activity. 80 -- 81 -- Activity containing the edge. 82 83 overriding function Get_Guard 84 (Self : not null access constant UML_Control_Flow_Proxy) 85 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 86 -- Getter of ActivityEdge::guard. 87 -- 88 -- Specification evaluated at runtime to determine if the edge can be 89 -- traversed. 90 91 overriding procedure Set_Guard 92 (Self : not null access UML_Control_Flow_Proxy; 93 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 94 -- Setter of ActivityEdge::guard. 95 -- 96 -- Specification evaluated at runtime to determine if the edge can be 97 -- traversed. 98 99 overriding function Get_In_Group 100 (Self : not null access constant UML_Control_Flow_Proxy) 101 return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group; 102 -- Getter of ActivityEdge::inGroup. 103 -- 104 -- Groups containing the edge. 105 106 overriding function Get_In_Partition 107 (Self : not null access constant UML_Control_Flow_Proxy) 108 return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition; 109 -- Getter of ActivityEdge::inPartition. 110 -- 111 -- Partitions containing the edge. 112 113 overriding function Get_In_Structured_Node 114 (Self : not null access constant UML_Control_Flow_Proxy) 115 return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access; 116 -- Getter of ActivityEdge::inStructuredNode. 117 -- 118 -- Structured activity node containing the edge. 119 120 overriding procedure Set_In_Structured_Node 121 (Self : not null access UML_Control_Flow_Proxy; 122 To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access); 123 -- Setter of ActivityEdge::inStructuredNode. 124 -- 125 -- Structured activity node containing the edge. 126 127 overriding function Get_Interrupts 128 (Self : not null access constant UML_Control_Flow_Proxy) 129 return AMF.UML.Interruptible_Activity_Regions.UML_Interruptible_Activity_Region_Access; 130 -- Getter of ActivityEdge::interrupts. 131 -- 132 -- Region that the edge can interrupt. 133 134 overriding procedure Set_Interrupts 135 (Self : not null access UML_Control_Flow_Proxy; 136 To : AMF.UML.Interruptible_Activity_Regions.UML_Interruptible_Activity_Region_Access); 137 -- Setter of ActivityEdge::interrupts. 138 -- 139 -- Region that the edge can interrupt. 140 141 overriding function Get_Redefined_Edge 142 (Self : not null access constant UML_Control_Flow_Proxy) 143 return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge; 144 -- Getter of ActivityEdge::redefinedEdge. 145 -- 146 -- Inherited edges replaced by this edge in a specialization of the 147 -- activity. 148 149 overriding function Get_Source 150 (Self : not null access constant UML_Control_Flow_Proxy) 151 return AMF.UML.Activity_Nodes.UML_Activity_Node_Access; 152 -- Getter of ActivityEdge::source. 153 -- 154 -- Node from which tokens are taken when they traverse the edge. 155 156 overriding procedure Set_Source 157 (Self : not null access UML_Control_Flow_Proxy; 158 To : AMF.UML.Activity_Nodes.UML_Activity_Node_Access); 159 -- Setter of ActivityEdge::source. 160 -- 161 -- Node from which tokens are taken when they traverse the edge. 162 163 overriding function Get_Target 164 (Self : not null access constant UML_Control_Flow_Proxy) 165 return AMF.UML.Activity_Nodes.UML_Activity_Node_Access; 166 -- Getter of ActivityEdge::target. 167 -- 168 -- Node to which tokens are put when they traverse the edge. 169 170 overriding procedure Set_Target 171 (Self : not null access UML_Control_Flow_Proxy; 172 To : AMF.UML.Activity_Nodes.UML_Activity_Node_Access); 173 -- Setter of ActivityEdge::target. 174 -- 175 -- Node to which tokens are put when they traverse the edge. 176 177 overriding function Get_Weight 178 (Self : not null access constant UML_Control_Flow_Proxy) 179 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 180 -- Getter of ActivityEdge::weight. 181 -- 182 -- The minimum number of tokens that must traverse the edge at the same 183 -- time. 184 185 overriding procedure Set_Weight 186 (Self : not null access UML_Control_Flow_Proxy; 187 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 188 -- Setter of ActivityEdge::weight. 189 -- 190 -- The minimum number of tokens that must traverse the edge at the same 191 -- time. 192 193 overriding function Get_Is_Leaf 194 (Self : not null access constant UML_Control_Flow_Proxy) 195 return Boolean; 196 -- Getter of RedefinableElement::isLeaf. 197 -- 198 -- Indicates whether it is possible to further redefine a 199 -- RedefinableElement. If the value is true, then it is not possible to 200 -- further redefine the RedefinableElement. Note that this property is 201 -- preserved through package merge operations; that is, the capability to 202 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 203 -- the resulting RedefinableElement of a package merge operation where a 204 -- RedefinableElement with isLeaf=false is merged with a matching 205 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 206 -- will have isLeaf=false. Default value is false. 207 208 overriding procedure Set_Is_Leaf 209 (Self : not null access UML_Control_Flow_Proxy; 210 To : Boolean); 211 -- Setter of RedefinableElement::isLeaf. 212 -- 213 -- Indicates whether it is possible to further redefine a 214 -- RedefinableElement. If the value is true, then it is not possible to 215 -- further redefine the RedefinableElement. Note that this property is 216 -- preserved through package merge operations; that is, the capability to 217 -- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in 218 -- the resulting RedefinableElement of a package merge operation where a 219 -- RedefinableElement with isLeaf=false is merged with a matching 220 -- RedefinableElement with isLeaf=true: the resulting RedefinableElement 221 -- will have isLeaf=false. Default value is false. 222 223 overriding function Get_Redefined_Element 224 (Self : not null access constant UML_Control_Flow_Proxy) 225 return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element; 226 -- Getter of RedefinableElement::redefinedElement. 227 -- 228 -- The redefinable element that is being redefined by this element. 229 230 overriding function Get_Redefinition_Context 231 (Self : not null access constant UML_Control_Flow_Proxy) 232 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier; 233 -- Getter of RedefinableElement::redefinitionContext. 234 -- 235 -- References the contexts that this element may be redefined from. 236 237 overriding function Get_Client_Dependency 238 (Self : not null access constant UML_Control_Flow_Proxy) 239 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 240 -- Getter of NamedElement::clientDependency. 241 -- 242 -- Indicates the dependencies that reference the client. 243 244 overriding function Get_Name_Expression 245 (Self : not null access constant UML_Control_Flow_Proxy) 246 return AMF.UML.String_Expressions.UML_String_Expression_Access; 247 -- Getter of NamedElement::nameExpression. 248 -- 249 -- The string expression used to define the name of this named element. 250 251 overriding procedure Set_Name_Expression 252 (Self : not null access UML_Control_Flow_Proxy; 253 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 254 -- Setter of NamedElement::nameExpression. 255 -- 256 -- The string expression used to define the name of this named element. 257 258 overriding function Get_Namespace 259 (Self : not null access constant UML_Control_Flow_Proxy) 260 return AMF.UML.Namespaces.UML_Namespace_Access; 261 -- Getter of NamedElement::namespace. 262 -- 263 -- Specifies the namespace that owns the NamedElement. 264 265 overriding function Get_Qualified_Name 266 (Self : not null access constant UML_Control_Flow_Proxy) 267 return AMF.Optional_String; 268 -- Getter of NamedElement::qualifiedName. 269 -- 270 -- A name which allows the NamedElement to be identified within a 271 -- hierarchy of nested Namespaces. It is constructed from the names of the 272 -- containing namespaces starting at the root of the hierarchy and ending 273 -- with the name of the NamedElement itself. 274 275 overriding function Is_Consistent_With 276 (Self : not null access constant UML_Control_Flow_Proxy; 277 Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 278 return Boolean; 279 -- Operation RedefinableElement::isConsistentWith. 280 -- 281 -- The query isConsistentWith() specifies, for any two RedefinableElements 282 -- in a context in which redefinition is possible, whether redefinition 283 -- would be logically consistent. By default, this is false; this 284 -- operation must be overridden for subclasses of RedefinableElement to 285 -- define the consistency conditions. 286 287 overriding function Is_Redefinition_Context_Valid 288 (Self : not null access constant UML_Control_Flow_Proxy; 289 Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 290 return Boolean; 291 -- Operation RedefinableElement::isRedefinitionContextValid. 292 -- 293 -- The query isRedefinitionContextValid() specifies whether the 294 -- redefinition contexts of this RedefinableElement are properly related 295 -- to the redefinition contexts of the specified RedefinableElement to 296 -- allow this element to redefine the other. By default at least one of 297 -- the redefinition contexts of this element must be a specialization of 298 -- at least one of the redefinition contexts of the specified element. 299 300 overriding function All_Owning_Packages 301 (Self : not null access constant UML_Control_Flow_Proxy) 302 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 303 -- Operation NamedElement::allOwningPackages. 304 -- 305 -- The query allOwningPackages() returns all the directly or indirectly 306 -- owning packages. 307 308 overriding function Is_Distinguishable_From 309 (Self : not null access constant UML_Control_Flow_Proxy; 310 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 311 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 312 return Boolean; 313 -- Operation NamedElement::isDistinguishableFrom. 314 -- 315 -- The query isDistinguishableFrom() determines whether two NamedElements 316 -- may logically co-exist within a Namespace. By default, two named 317 -- elements are distinguishable if (a) they have unrelated types or (b) 318 -- they have related types but different names. 319 320 overriding function Namespace 321 (Self : not null access constant UML_Control_Flow_Proxy) 322 return AMF.UML.Namespaces.UML_Namespace_Access; 323 -- Operation NamedElement::namespace. 324 -- 325 -- Missing derivation for NamedElement::/namespace : Namespace 326 327 overriding procedure Enter_Element 328 (Self : not null access constant UML_Control_Flow_Proxy; 329 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 330 Control : in out AMF.Visitors.Traverse_Control); 331 -- Dispatch call to corresponding subprogram of visitor interface. 332 333 overriding procedure Leave_Element 334 (Self : not null access constant UML_Control_Flow_Proxy; 335 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 336 Control : in out AMF.Visitors.Traverse_Control); 337 -- Dispatch call to corresponding subprogram of visitor interface. 338 339 overriding procedure Visit_Element 340 (Self : not null access constant UML_Control_Flow_Proxy; 341 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 342 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 343 Control : in out AMF.Visitors.Traverse_Control); 344 -- Dispatch call to corresponding subprogram of iterator interface. 345 346end AMF.Internals.UML_Control_Flows; 347