1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 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: 3436 $ $Date: 2012-11-14 10:14:34 +0400 (Wed, 14 Nov 2012) $ 43------------------------------------------------------------------------------ 44with AMF.CMOF.Elements; 45with AMF.DI.Styles; 46with AMF.Internals.UMLDI_UML_Diagrams; 47with AMF.UML.Comments.Collections; 48with AMF.UML.Dependencies.Collections; 49with AMF.UML.Elements.Collections; 50with AMF.UML.Named_Elements; 51with AMF.UML.Namespaces.Collections; 52with AMF.UML.Packages.Collections; 53with AMF.UML.Parameterable_Elements; 54with AMF.UML.String_Expressions; 55with AMF.UML.Template_Parameters; 56with AMF.UMLDI.UML_Composite_Structure_Diagrams; 57with AMF.UMLDI.UML_Labels; 58with AMF.UMLDI.UML_Styles; 59with AMF.Visitors; 60with League.Strings; 61 62package AMF.Internals.UMLDI_UML_Composite_Structure_Diagrams is 63 64 type UMLDI_UML_Composite_Structure_Diagram_Proxy is 65 limited new AMF.Internals.UMLDI_UML_Diagrams.UMLDI_UML_Diagram_Proxy 66 and AMF.UMLDI.UML_Composite_Structure_Diagrams.UMLDI_UML_Composite_Structure_Diagram with null record; 67 68 overriding function Get_Is_Association_Dot_Shown 69 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 70 return Boolean; 71 -- Getter of UMLClassOrCompositeStructureDiagram::isAssociationDotShown. 72 -- 73 -- Indicates whether dot notation for associations shall be used. 74 75 overriding procedure Set_Is_Association_Dot_Shown 76 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 77 To : Boolean); 78 -- Setter of UMLClassOrCompositeStructureDiagram::isAssociationDotShown. 79 -- 80 -- Indicates whether dot notation for associations shall be used. 81 82 overriding function Get_Navigability_Notation 83 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 84 return AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind; 85 -- Getter of UMLClassOrCompositeStructureDiagram::navigabilityNotation. 86 -- 87 -- Indicates when to show navigability of associations or connectors typed 88 -- by associations. 89 90 overriding procedure Set_Navigability_Notation 91 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 92 To : AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind); 93 -- Setter of UMLClassOrCompositeStructureDiagram::navigabilityNotation. 94 -- 95 -- Indicates when to show navigability of associations or connectors typed 96 -- by associations. 97 98 overriding function Get_Non_Navigability_Notation 99 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 100 return AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind; 101 -- Getter of UMLClassOrCompositeStructureDiagram::nonNavigabilityNotation. 102 -- 103 -- Indicates when to show non-navigability of associations or connectors 104 -- typed by associations. 105 106 overriding procedure Set_Non_Navigability_Notation 107 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 108 To : AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind); 109 -- Setter of UMLClassOrCompositeStructureDiagram::nonNavigabilityNotation. 110 -- 111 -- Indicates when to show non-navigability of associations or connectors 112 -- typed by associations. 113 114 overriding function Get_Heading 115 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 116 return AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access; 117 -- Getter of UMLDiagram::heading. 118 -- 119 120 overriding procedure Set_Heading 121 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 122 To : AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access); 123 -- Setter of UMLDiagram::heading. 124 -- 125 126 overriding function Get_Is_Frame 127 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 128 return Boolean; 129 -- Getter of UMLDiagram::isFrame. 130 -- 131 -- Indicates when diagram frames shall be shown. 132 133 overriding procedure Set_Is_Frame 134 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 135 To : Boolean); 136 -- Setter of UMLDiagram::isFrame. 137 -- 138 -- Indicates when diagram frames shall be shown. 139 140 overriding function Get_Is_Iso 141 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 142 return Boolean; 143 -- Getter of UMLDiagram::isIso. 144 -- 145 -- Indicate when ISO notation rules shall be followed. 146 147 overriding procedure Set_Is_Iso 148 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 149 To : Boolean); 150 -- Setter of UMLDiagram::isIso. 151 -- 152 -- Indicate when ISO notation rules shall be followed. 153 154 overriding function Get_Is_Icon 155 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 156 return Boolean; 157 -- Getter of UMLDiagramElement::isIcon. 158 -- 159 -- For modelElements that have an option to be shown with shapes other 160 -- than rectangles, such as Actors, or with other identifying shapes 161 -- inside them, such as arrows distinguishing InputPins and OutputPins, or 162 -- edges that have an option to be shown with lines other than solid with 163 -- open arrow heads, such as Realization. A value of true for isIcon 164 -- indicates the alternative notation shall be shown. 165 166 overriding procedure Set_Is_Icon 167 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 168 To : Boolean); 169 -- Setter of UMLDiagramElement::isIcon. 170 -- 171 -- For modelElements that have an option to be shown with shapes other 172 -- than rectangles, such as Actors, or with other identifying shapes 173 -- inside them, such as arrows distinguishing InputPins and OutputPins, or 174 -- edges that have an option to be shown with lines other than solid with 175 -- open arrow heads, such as Realization. A value of true for isIcon 176 -- indicates the alternative notation shall be shown. 177 178 overriding function Get_Local_Style 179 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 180 return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access; 181 -- Getter of UMLDiagramElement::localStyle. 182 -- 183 -- Restricts owned styles to UMLStyles. 184 185 overriding procedure Set_Local_Style 186 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 187 To : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access); 188 -- Setter of UMLDiagramElement::localStyle. 189 -- 190 -- Restricts owned styles to UMLStyles. 191 192 overriding function Get_Model_Element 193 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 194 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 195 -- Getter of UMLDiagramElement::modelElement. 196 -- 197 -- Restricts UMLDiagramElements to show UML Elements, rather than other 198 -- language elements. 199 200 overriding function Get_Model_Element 201 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 202 return AMF.CMOF.Elements.CMOF_Element_Access; 203 -- Getter of DiagramElement::modelElement. 204 -- 205 -- a reference to a depicted model element, which can be any MOF-based 206 -- element 207 208 overriding function Get_Local_Style 209 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 210 return AMF.DI.Styles.DI_Style_Access; 211 -- Getter of DiagramElement::localStyle. 212 -- 213 -- a reference to an optional locally-owned style for this diagram element. 214 215 overriding procedure Set_Local_Style 216 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 217 To : AMF.DI.Styles.DI_Style_Access); 218 -- Setter of DiagramElement::localStyle. 219 -- 220 -- a reference to an optional locally-owned style for this diagram element. 221 222 overriding function Get_Name 223 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 224 return League.Strings.Universal_String; 225 -- Getter of Diagram::name. 226 -- 227 -- the name of the diagram. 228 229 overriding procedure Set_Name 230 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 231 To : League.Strings.Universal_String); 232 -- Setter of Diagram::name. 233 -- 234 -- the name of the diagram. 235 236 overriding function Get_Documentation 237 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 238 return League.Strings.Universal_String; 239 -- Getter of Diagram::documentation. 240 -- 241 -- the documentation of the diagram. 242 243 overriding procedure Set_Documentation 244 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 245 To : League.Strings.Universal_String); 246 -- Setter of Diagram::documentation. 247 -- 248 -- the documentation of the diagram. 249 250 overriding function Get_Resolution 251 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 252 return AMF.Real; 253 -- Getter of Diagram::resolution. 254 -- 255 -- the resolution of the diagram expressed in user units per inch. 256 257 overriding procedure Set_Resolution 258 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 259 To : AMF.Real); 260 -- Setter of Diagram::resolution. 261 -- 262 -- the resolution of the diagram expressed in user units per inch. 263 264 overriding function Get_Client_Dependency 265 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 266 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 267 -- Getter of NamedElement::clientDependency. 268 -- 269 -- Indicates the dependencies that reference the client. 270 271 overriding function Get_Name 272 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 273 return AMF.Optional_String; 274 -- Getter of NamedElement::name. 275 -- 276 -- The name of the NamedElement. 277 278 overriding procedure Set_Name 279 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 280 To : AMF.Optional_String); 281 -- Setter of NamedElement::name. 282 -- 283 -- The name of the NamedElement. 284 285 overriding function Get_Name_Expression 286 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 287 return AMF.UML.String_Expressions.UML_String_Expression_Access; 288 -- Getter of NamedElement::nameExpression. 289 -- 290 -- The string expression used to define the name of this named element. 291 292 overriding procedure Set_Name_Expression 293 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 294 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 295 -- Setter of NamedElement::nameExpression. 296 -- 297 -- The string expression used to define the name of this named element. 298 299 overriding function Get_Namespace 300 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 301 return AMF.UML.Namespaces.UML_Namespace_Access; 302 -- Getter of NamedElement::namespace. 303 -- 304 -- Specifies the namespace that owns the NamedElement. 305 306 overriding function Get_Qualified_Name 307 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 308 return AMF.Optional_String; 309 -- Getter of NamedElement::qualifiedName. 310 -- 311 -- A name which allows the NamedElement to be identified within a 312 -- hierarchy of nested Namespaces. It is constructed from the names of the 313 -- containing namespaces starting at the root of the hierarchy and ending 314 -- with the name of the NamedElement itself. 315 316 overriding function Get_Owned_Comment 317 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 318 return AMF.UML.Comments.Collections.Set_Of_UML_Comment; 319 -- Getter of Element::ownedComment. 320 -- 321 -- The Comments owned by this element. 322 323 overriding function Get_Owned_Element 324 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 325 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 326 -- Getter of Element::ownedElement. 327 -- 328 -- The Elements owned by this element. 329 330 overriding function Get_Owner 331 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 332 return AMF.UML.Elements.UML_Element_Access; 333 -- Getter of Element::owner. 334 -- 335 -- The Element that owns this element. 336 337 overriding function Get_Owning_Template_Parameter 338 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 339 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 340 -- Getter of ParameterableElement::owningTemplateParameter. 341 -- 342 -- The formal template parameter that owns this element. 343 344 overriding procedure Set_Owning_Template_Parameter 345 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 346 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 347 -- Setter of ParameterableElement::owningTemplateParameter. 348 -- 349 -- The formal template parameter that owns this element. 350 351 overriding function Get_Template_Parameter 352 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 353 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 354 -- Getter of ParameterableElement::templateParameter. 355 -- 356 -- The template parameter that exposes this element as a formal parameter. 357 358 overriding procedure Set_Template_Parameter 359 (Self : not null access UMLDI_UML_Composite_Structure_Diagram_Proxy; 360 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 361 -- Setter of ParameterableElement::templateParameter. 362 -- 363 -- The template parameter that exposes this element as a formal parameter. 364 365 overriding function All_Namespaces 366 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 367 return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace; 368 -- Operation NamedElement::allNamespaces. 369 -- 370 -- The query allNamespaces() gives the sequence of namespaces in which the 371 -- NamedElement is nested, working outwards. 372 373 overriding function All_Owning_Packages 374 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 375 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 376 -- Operation NamedElement::allOwningPackages. 377 -- 378 -- The query allOwningPackages() returns all the directly or indirectly 379 -- owning packages. 380 381 overriding function Is_Distinguishable_From 382 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy; 383 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 384 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 385 return Boolean; 386 -- Operation NamedElement::isDistinguishableFrom. 387 -- 388 -- The query isDistinguishableFrom() determines whether two NamedElements 389 -- may logically co-exist within a Namespace. By default, two named 390 -- elements are distinguishable if (a) they have unrelated types or (b) 391 -- they have related types but different names. 392 393 overriding function Namespace 394 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 395 return AMF.UML.Namespaces.UML_Namespace_Access; 396 -- Operation NamedElement::namespace. 397 -- 398 -- Missing derivation for NamedElement::/namespace : Namespace 399 400 overriding function Qualified_Name 401 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 402 return League.Strings.Universal_String; 403 -- Operation NamedElement::qualifiedName. 404 -- 405 -- When there is a name, and all of the containing namespaces have a name, 406 -- the qualified name is constructed from the names of the containing 407 -- namespaces. 408 409 overriding function Separator 410 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 411 return League.Strings.Universal_String; 412 -- Operation NamedElement::separator. 413 -- 414 -- The query separator() gives the string that is used to separate names 415 -- when constructing a qualified name. 416 417 overriding function All_Owned_Elements 418 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 419 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 420 -- Operation Element::allOwnedElements. 421 -- 422 -- The query allOwnedElements() gives all of the direct and indirect owned 423 -- elements of an element. 424 425 overriding function Is_Compatible_With 426 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy; 427 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 428 return Boolean; 429 -- Operation ParameterableElement::isCompatibleWith. 430 -- 431 -- The query isCompatibleWith() determines if this parameterable element 432 -- is compatible with the specified parameterable element. By default 433 -- parameterable element P is compatible with parameterable element Q if 434 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 435 -- should override this operation to specify different compatibility 436 -- constraints. 437 438 overriding function Is_Template_Parameter 439 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy) 440 return Boolean; 441 -- Operation ParameterableElement::isTemplateParameter. 442 -- 443 -- The query isTemplateParameter() determines if this parameterable 444 -- element is exposed as a formal template parameter. 445 446 overriding procedure Enter_Element 447 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy; 448 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 449 Control : in out AMF.Visitors.Traverse_Control); 450 451 overriding procedure Leave_Element 452 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy; 453 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 454 Control : in out AMF.Visitors.Traverse_Control); 455 456 overriding procedure Visit_Element 457 (Self : not null access constant UMLDI_UML_Composite_Structure_Diagram_Proxy; 458 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 459 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 460 Control : in out AMF.Visitors.Traverse_Control); 461 462end AMF.Internals.UMLDI_UML_Composite_Structure_Diagrams; 463