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.Elements; 45with AMF.Internals.Element_Collections; 46with AMF.Internals.Helpers; 47with AMF.Internals.Tables.UML_Attributes; 48with AMF.Visitors.UML_Iterators; 49with AMF.Visitors.UML_Visitors; 50with League.Strings.Internals; 51with Matreshka.Internals.Strings; 52 53package body AMF.Internals.UML_Artifacts is 54 55 ------------------- 56 -- Enter_Element -- 57 ------------------- 58 59 overriding procedure Enter_Element 60 (Self : not null access constant UML_Artifact_Proxy; 61 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 62 Control : in out AMF.Visitors.Traverse_Control) is 63 begin 64 if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then 65 AMF.Visitors.UML_Visitors.UML_Visitor'Class 66 (Visitor).Enter_Artifact 67 (AMF.UML.Artifacts.UML_Artifact_Access (Self), 68 Control); 69 end if; 70 end Enter_Element; 71 72 ------------------- 73 -- Leave_Element -- 74 ------------------- 75 76 overriding procedure Leave_Element 77 (Self : not null access constant UML_Artifact_Proxy; 78 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 79 Control : in out AMF.Visitors.Traverse_Control) is 80 begin 81 if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then 82 AMF.Visitors.UML_Visitors.UML_Visitor'Class 83 (Visitor).Leave_Artifact 84 (AMF.UML.Artifacts.UML_Artifact_Access (Self), 85 Control); 86 end if; 87 end Leave_Element; 88 89 ------------------- 90 -- Visit_Element -- 91 ------------------- 92 93 overriding procedure Visit_Element 94 (Self : not null access constant UML_Artifact_Proxy; 95 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 96 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 97 Control : in out AMF.Visitors.Traverse_Control) is 98 begin 99 if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then 100 AMF.Visitors.UML_Iterators.UML_Iterator'Class 101 (Iterator).Visit_Artifact 102 (Visitor, 103 AMF.UML.Artifacts.UML_Artifact_Access (Self), 104 Control); 105 end if; 106 end Visit_Element; 107 108 ------------------- 109 -- Get_File_Name -- 110 ------------------- 111 112 overriding function Get_File_Name 113 (Self : not null access constant UML_Artifact_Proxy) 114 return AMF.Optional_String is 115 begin 116 declare 117 use type Matreshka.Internals.Strings.Shared_String_Access; 118 119 Aux : constant Matreshka.Internals.Strings.Shared_String_Access 120 := AMF.Internals.Tables.UML_Attributes.Internal_Get_File_Name (Self.Element); 121 122 begin 123 if Aux = null then 124 return (Is_Empty => True); 125 126 else 127 return (False, League.Strings.Internals.Create (Aux)); 128 end if; 129 end; 130 end Get_File_Name; 131 132 ------------------- 133 -- Set_File_Name -- 134 ------------------- 135 136 overriding procedure Set_File_Name 137 (Self : not null access UML_Artifact_Proxy; 138 To : AMF.Optional_String) is 139 begin 140 if To.Is_Empty then 141 AMF.Internals.Tables.UML_Attributes.Internal_Set_File_Name 142 (Self.Element, null); 143 144 else 145 AMF.Internals.Tables.UML_Attributes.Internal_Set_File_Name 146 (Self.Element, 147 League.Strings.Internals.Internal (To.Value)); 148 end if; 149 end Set_File_Name; 150 151 ----------------------- 152 -- Get_Manifestation -- 153 ----------------------- 154 155 overriding function Get_Manifestation 156 (Self : not null access constant UML_Artifact_Proxy) 157 return AMF.UML.Manifestations.Collections.Set_Of_UML_Manifestation is 158 begin 159 return 160 AMF.UML.Manifestations.Collections.Wrap 161 (AMF.Internals.Element_Collections.Wrap 162 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Manifestation 163 (Self.Element))); 164 end Get_Manifestation; 165 166 ------------------------- 167 -- Get_Nested_Artifact -- 168 ------------------------- 169 170 overriding function Get_Nested_Artifact 171 (Self : not null access constant UML_Artifact_Proxy) 172 return AMF.UML.Artifacts.Collections.Set_Of_UML_Artifact is 173 begin 174 return 175 AMF.UML.Artifacts.Collections.Wrap 176 (AMF.Internals.Element_Collections.Wrap 177 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Nested_Artifact 178 (Self.Element))); 179 end Get_Nested_Artifact; 180 181 ------------------------- 182 -- Get_Owned_Attribute -- 183 ------------------------- 184 185 overriding function Get_Owned_Attribute 186 (Self : not null access constant UML_Artifact_Proxy) 187 return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property is 188 begin 189 return 190 AMF.UML.Properties.Collections.Wrap 191 (AMF.Internals.Element_Collections.Wrap 192 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Attribute 193 (Self.Element))); 194 end Get_Owned_Attribute; 195 196 ------------------------- 197 -- Get_Owned_Operation -- 198 ------------------------- 199 200 overriding function Get_Owned_Operation 201 (Self : not null access constant UML_Artifact_Proxy) 202 return AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation is 203 begin 204 return 205 AMF.UML.Operations.Collections.Wrap 206 (AMF.Internals.Element_Collections.Wrap 207 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Operation 208 (Self.Element))); 209 end Get_Owned_Operation; 210 211 ------------------- 212 -- Get_Attribute -- 213 ------------------- 214 215 overriding function Get_Attribute 216 (Self : not null access constant UML_Artifact_Proxy) 217 return AMF.UML.Properties.Collections.Set_Of_UML_Property is 218 begin 219 return 220 AMF.UML.Properties.Collections.Wrap 221 (AMF.Internals.Element_Collections.Wrap 222 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Attribute 223 (Self.Element))); 224 end Get_Attribute; 225 226 --------------------------- 227 -- Get_Collaboration_Use -- 228 --------------------------- 229 230 overriding function Get_Collaboration_Use 231 (Self : not null access constant UML_Artifact_Proxy) 232 return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use is 233 begin 234 return 235 AMF.UML.Collaboration_Uses.Collections.Wrap 236 (AMF.Internals.Element_Collections.Wrap 237 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Collaboration_Use 238 (Self.Element))); 239 end Get_Collaboration_Use; 240 241 ----------------- 242 -- Get_Feature -- 243 ----------------- 244 245 overriding function Get_Feature 246 (Self : not null access constant UML_Artifact_Proxy) 247 return AMF.UML.Features.Collections.Set_Of_UML_Feature is 248 begin 249 return 250 AMF.UML.Features.Collections.Wrap 251 (AMF.Internals.Element_Collections.Wrap 252 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Feature 253 (Self.Element))); 254 end Get_Feature; 255 256 ----------------- 257 -- Get_General -- 258 ----------------- 259 260 overriding function Get_General 261 (Self : not null access constant UML_Artifact_Proxy) 262 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is 263 begin 264 return 265 AMF.UML.Classifiers.Collections.Wrap 266 (AMF.Internals.Element_Collections.Wrap 267 (AMF.Internals.Tables.UML_Attributes.Internal_Get_General 268 (Self.Element))); 269 end Get_General; 270 271 ------------------------ 272 -- Get_Generalization -- 273 ------------------------ 274 275 overriding function Get_Generalization 276 (Self : not null access constant UML_Artifact_Proxy) 277 return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization is 278 begin 279 return 280 AMF.UML.Generalizations.Collections.Wrap 281 (AMF.Internals.Element_Collections.Wrap 282 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Generalization 283 (Self.Element))); 284 end Get_Generalization; 285 286 -------------------------- 287 -- Get_Inherited_Member -- 288 -------------------------- 289 290 overriding function Get_Inherited_Member 291 (Self : not null access constant UML_Artifact_Proxy) 292 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 293 begin 294 return 295 AMF.UML.Named_Elements.Collections.Wrap 296 (AMF.Internals.Element_Collections.Wrap 297 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Inherited_Member 298 (Self.Element))); 299 end Get_Inherited_Member; 300 301 --------------------- 302 -- Get_Is_Abstract -- 303 --------------------- 304 305 overriding function Get_Is_Abstract 306 (Self : not null access constant UML_Artifact_Proxy) 307 return Boolean is 308 begin 309 return 310 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Abstract 311 (Self.Element); 312 end Get_Is_Abstract; 313 314 --------------------------------- 315 -- Get_Is_Final_Specialization -- 316 --------------------------------- 317 318 overriding function Get_Is_Final_Specialization 319 (Self : not null access constant UML_Artifact_Proxy) 320 return Boolean is 321 begin 322 return 323 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Final_Specialization 324 (Self.Element); 325 end Get_Is_Final_Specialization; 326 327 --------------------------------- 328 -- Set_Is_Final_Specialization -- 329 --------------------------------- 330 331 overriding procedure Set_Is_Final_Specialization 332 (Self : not null access UML_Artifact_Proxy; 333 To : Boolean) is 334 begin 335 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Final_Specialization 336 (Self.Element, To); 337 end Set_Is_Final_Specialization; 338 339 ---------------------------------- 340 -- Get_Owned_Template_Signature -- 341 ---------------------------------- 342 343 overriding function Get_Owned_Template_Signature 344 (Self : not null access constant UML_Artifact_Proxy) 345 return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access is 346 begin 347 return 348 AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access 349 (AMF.Internals.Helpers.To_Element 350 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Template_Signature 351 (Self.Element))); 352 end Get_Owned_Template_Signature; 353 354 ---------------------------------- 355 -- Set_Owned_Template_Signature -- 356 ---------------------------------- 357 358 overriding procedure Set_Owned_Template_Signature 359 (Self : not null access UML_Artifact_Proxy; 360 To : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access) is 361 begin 362 AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Template_Signature 363 (Self.Element, 364 AMF.Internals.Helpers.To_Element 365 (AMF.Elements.Element_Access (To))); 366 end Set_Owned_Template_Signature; 367 368 ------------------------ 369 -- Get_Owned_Use_Case -- 370 ------------------------ 371 372 overriding function Get_Owned_Use_Case 373 (Self : not null access constant UML_Artifact_Proxy) 374 return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is 375 begin 376 return 377 AMF.UML.Use_Cases.Collections.Wrap 378 (AMF.Internals.Element_Collections.Wrap 379 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Use_Case 380 (Self.Element))); 381 end Get_Owned_Use_Case; 382 383 -------------------------- 384 -- Get_Powertype_Extent -- 385 -------------------------- 386 387 overriding function Get_Powertype_Extent 388 (Self : not null access constant UML_Artifact_Proxy) 389 return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set is 390 begin 391 return 392 AMF.UML.Generalization_Sets.Collections.Wrap 393 (AMF.Internals.Element_Collections.Wrap 394 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Powertype_Extent 395 (Self.Element))); 396 end Get_Powertype_Extent; 397 398 ------------------------------ 399 -- Get_Redefined_Classifier -- 400 ------------------------------ 401 402 overriding function Get_Redefined_Classifier 403 (Self : not null access constant UML_Artifact_Proxy) 404 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is 405 begin 406 return 407 AMF.UML.Classifiers.Collections.Wrap 408 (AMF.Internals.Element_Collections.Wrap 409 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Classifier 410 (Self.Element))); 411 end Get_Redefined_Classifier; 412 413 ------------------------ 414 -- Get_Representation -- 415 ------------------------ 416 417 overriding function Get_Representation 418 (Self : not null access constant UML_Artifact_Proxy) 419 return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access is 420 begin 421 return 422 AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access 423 (AMF.Internals.Helpers.To_Element 424 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Representation 425 (Self.Element))); 426 end Get_Representation; 427 428 ------------------------ 429 -- Set_Representation -- 430 ------------------------ 431 432 overriding procedure Set_Representation 433 (Self : not null access UML_Artifact_Proxy; 434 To : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access) is 435 begin 436 AMF.Internals.Tables.UML_Attributes.Internal_Set_Representation 437 (Self.Element, 438 AMF.Internals.Helpers.To_Element 439 (AMF.Elements.Element_Access (To))); 440 end Set_Representation; 441 442 ---------------------- 443 -- Get_Substitution -- 444 ---------------------- 445 446 overriding function Get_Substitution 447 (Self : not null access constant UML_Artifact_Proxy) 448 return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution is 449 begin 450 return 451 AMF.UML.Substitutions.Collections.Wrap 452 (AMF.Internals.Element_Collections.Wrap 453 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Substitution 454 (Self.Element))); 455 end Get_Substitution; 456 457 ---------------------------- 458 -- Get_Template_Parameter -- 459 ---------------------------- 460 461 overriding function Get_Template_Parameter 462 (Self : not null access constant UML_Artifact_Proxy) 463 return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access is 464 begin 465 return 466 AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access 467 (AMF.Internals.Helpers.To_Element 468 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter 469 (Self.Element))); 470 end Get_Template_Parameter; 471 472 ---------------------------- 473 -- Set_Template_Parameter -- 474 ---------------------------- 475 476 overriding procedure Set_Template_Parameter 477 (Self : not null access UML_Artifact_Proxy; 478 To : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access) is 479 begin 480 AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter 481 (Self.Element, 482 AMF.Internals.Helpers.To_Element 483 (AMF.Elements.Element_Access (To))); 484 end Set_Template_Parameter; 485 486 ------------------ 487 -- Get_Use_Case -- 488 ------------------ 489 490 overriding function Get_Use_Case 491 (Self : not null access constant UML_Artifact_Proxy) 492 return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is 493 begin 494 return 495 AMF.UML.Use_Cases.Collections.Wrap 496 (AMF.Internals.Element_Collections.Wrap 497 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Use_Case 498 (Self.Element))); 499 end Get_Use_Case; 500 501 ------------------------ 502 -- Get_Element_Import -- 503 ------------------------ 504 505 overriding function Get_Element_Import 506 (Self : not null access constant UML_Artifact_Proxy) 507 return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is 508 begin 509 return 510 AMF.UML.Element_Imports.Collections.Wrap 511 (AMF.Internals.Element_Collections.Wrap 512 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Element_Import 513 (Self.Element))); 514 end Get_Element_Import; 515 516 ------------------------- 517 -- Get_Imported_Member -- 518 ------------------------- 519 520 overriding function Get_Imported_Member 521 (Self : not null access constant UML_Artifact_Proxy) 522 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is 523 begin 524 return 525 AMF.UML.Packageable_Elements.Collections.Wrap 526 (AMF.Internals.Element_Collections.Wrap 527 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Imported_Member 528 (Self.Element))); 529 end Get_Imported_Member; 530 531 ---------------- 532 -- Get_Member -- 533 ---------------- 534 535 overriding function Get_Member 536 (Self : not null access constant UML_Artifact_Proxy) 537 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 538 begin 539 return 540 AMF.UML.Named_Elements.Collections.Wrap 541 (AMF.Internals.Element_Collections.Wrap 542 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Member 543 (Self.Element))); 544 end Get_Member; 545 546 ---------------------- 547 -- Get_Owned_Member -- 548 ---------------------- 549 550 overriding function Get_Owned_Member 551 (Self : not null access constant UML_Artifact_Proxy) 552 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 553 begin 554 return 555 AMF.UML.Named_Elements.Collections.Wrap 556 (AMF.Internals.Element_Collections.Wrap 557 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Member 558 (Self.Element))); 559 end Get_Owned_Member; 560 561 -------------------- 562 -- Get_Owned_Rule -- 563 -------------------- 564 565 overriding function Get_Owned_Rule 566 (Self : not null access constant UML_Artifact_Proxy) 567 return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is 568 begin 569 return 570 AMF.UML.Constraints.Collections.Wrap 571 (AMF.Internals.Element_Collections.Wrap 572 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Rule 573 (Self.Element))); 574 end Get_Owned_Rule; 575 576 ------------------------ 577 -- Get_Package_Import -- 578 ------------------------ 579 580 overriding function Get_Package_Import 581 (Self : not null access constant UML_Artifact_Proxy) 582 return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is 583 begin 584 return 585 AMF.UML.Package_Imports.Collections.Wrap 586 (AMF.Internals.Element_Collections.Wrap 587 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package_Import 588 (Self.Element))); 589 end Get_Package_Import; 590 591 --------------------------- 592 -- Get_Client_Dependency -- 593 --------------------------- 594 595 overriding function Get_Client_Dependency 596 (Self : not null access constant UML_Artifact_Proxy) 597 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is 598 begin 599 return 600 AMF.UML.Dependencies.Collections.Wrap 601 (AMF.Internals.Element_Collections.Wrap 602 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency 603 (Self.Element))); 604 end Get_Client_Dependency; 605 606 ------------------------- 607 -- Get_Name_Expression -- 608 ------------------------- 609 610 overriding function Get_Name_Expression 611 (Self : not null access constant UML_Artifact_Proxy) 612 return AMF.UML.String_Expressions.UML_String_Expression_Access is 613 begin 614 return 615 AMF.UML.String_Expressions.UML_String_Expression_Access 616 (AMF.Internals.Helpers.To_Element 617 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression 618 (Self.Element))); 619 end Get_Name_Expression; 620 621 ------------------------- 622 -- Set_Name_Expression -- 623 ------------------------- 624 625 overriding procedure Set_Name_Expression 626 (Self : not null access UML_Artifact_Proxy; 627 To : AMF.UML.String_Expressions.UML_String_Expression_Access) is 628 begin 629 AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression 630 (Self.Element, 631 AMF.Internals.Helpers.To_Element 632 (AMF.Elements.Element_Access (To))); 633 end Set_Name_Expression; 634 635 ------------------- 636 -- Get_Namespace -- 637 ------------------- 638 639 overriding function Get_Namespace 640 (Self : not null access constant UML_Artifact_Proxy) 641 return AMF.UML.Namespaces.UML_Namespace_Access is 642 begin 643 return 644 AMF.UML.Namespaces.UML_Namespace_Access 645 (AMF.Internals.Helpers.To_Element 646 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace 647 (Self.Element))); 648 end Get_Namespace; 649 650 ------------------------ 651 -- Get_Qualified_Name -- 652 ------------------------ 653 654 overriding function Get_Qualified_Name 655 (Self : not null access constant UML_Artifact_Proxy) 656 return AMF.Optional_String is 657 begin 658 declare 659 use type Matreshka.Internals.Strings.Shared_String_Access; 660 661 Aux : constant Matreshka.Internals.Strings.Shared_String_Access 662 := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element); 663 664 begin 665 if Aux = null then 666 return (Is_Empty => True); 667 668 else 669 return (False, League.Strings.Internals.Create (Aux)); 670 end if; 671 end; 672 end Get_Qualified_Name; 673 674 ----------------- 675 -- Get_Package -- 676 ----------------- 677 678 overriding function Get_Package 679 (Self : not null access constant UML_Artifact_Proxy) 680 return AMF.UML.Packages.UML_Package_Access is 681 begin 682 return 683 AMF.UML.Packages.UML_Package_Access 684 (AMF.Internals.Helpers.To_Element 685 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Package 686 (Self.Element))); 687 end Get_Package; 688 689 ----------------- 690 -- Set_Package -- 691 ----------------- 692 693 overriding procedure Set_Package 694 (Self : not null access UML_Artifact_Proxy; 695 To : AMF.UML.Packages.UML_Package_Access) is 696 begin 697 AMF.Internals.Tables.UML_Attributes.Internal_Set_Package 698 (Self.Element, 699 AMF.Internals.Helpers.To_Element 700 (AMF.Elements.Element_Access (To))); 701 end Set_Package; 702 703 ----------------------------------- 704 -- Get_Owning_Template_Parameter -- 705 ----------------------------------- 706 707 overriding function Get_Owning_Template_Parameter 708 (Self : not null access constant UML_Artifact_Proxy) 709 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is 710 begin 711 return 712 AMF.UML.Template_Parameters.UML_Template_Parameter_Access 713 (AMF.Internals.Helpers.To_Element 714 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter 715 (Self.Element))); 716 end Get_Owning_Template_Parameter; 717 718 ----------------------------------- 719 -- Set_Owning_Template_Parameter -- 720 ----------------------------------- 721 722 overriding procedure Set_Owning_Template_Parameter 723 (Self : not null access UML_Artifact_Proxy; 724 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is 725 begin 726 AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter 727 (Self.Element, 728 AMF.Internals.Helpers.To_Element 729 (AMF.Elements.Element_Access (To))); 730 end Set_Owning_Template_Parameter; 731 732 ---------------------------- 733 -- Get_Template_Parameter -- 734 ---------------------------- 735 736 overriding function Get_Template_Parameter 737 (Self : not null access constant UML_Artifact_Proxy) 738 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is 739 begin 740 return 741 AMF.UML.Template_Parameters.UML_Template_Parameter_Access 742 (AMF.Internals.Helpers.To_Element 743 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter 744 (Self.Element))); 745 end Get_Template_Parameter; 746 747 ---------------------------- 748 -- Set_Template_Parameter -- 749 ---------------------------- 750 751 overriding procedure Set_Template_Parameter 752 (Self : not null access UML_Artifact_Proxy; 753 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is 754 begin 755 AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter 756 (Self.Element, 757 AMF.Internals.Helpers.To_Element 758 (AMF.Elements.Element_Access (To))); 759 end Set_Template_Parameter; 760 761 ---------------------------------- 762 -- Get_Owned_Template_Signature -- 763 ---------------------------------- 764 765 overriding function Get_Owned_Template_Signature 766 (Self : not null access constant UML_Artifact_Proxy) 767 return AMF.UML.Template_Signatures.UML_Template_Signature_Access is 768 begin 769 return 770 AMF.UML.Template_Signatures.UML_Template_Signature_Access 771 (AMF.Internals.Helpers.To_Element 772 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Template_Signature 773 (Self.Element))); 774 end Get_Owned_Template_Signature; 775 776 ---------------------------------- 777 -- Set_Owned_Template_Signature -- 778 ---------------------------------- 779 780 overriding procedure Set_Owned_Template_Signature 781 (Self : not null access UML_Artifact_Proxy; 782 To : AMF.UML.Template_Signatures.UML_Template_Signature_Access) is 783 begin 784 AMF.Internals.Tables.UML_Attributes.Internal_Set_Owned_Template_Signature 785 (Self.Element, 786 AMF.Internals.Helpers.To_Element 787 (AMF.Elements.Element_Access (To))); 788 end Set_Owned_Template_Signature; 789 790 -------------------------- 791 -- Get_Template_Binding -- 792 -------------------------- 793 794 overriding function Get_Template_Binding 795 (Self : not null access constant UML_Artifact_Proxy) 796 return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding is 797 begin 798 return 799 AMF.UML.Template_Bindings.Collections.Wrap 800 (AMF.Internals.Element_Collections.Wrap 801 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Binding 802 (Self.Element))); 803 end Get_Template_Binding; 804 805 ----------------- 806 -- Get_Is_Leaf -- 807 ----------------- 808 809 overriding function Get_Is_Leaf 810 (Self : not null access constant UML_Artifact_Proxy) 811 return Boolean is 812 begin 813 return 814 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf 815 (Self.Element); 816 end Get_Is_Leaf; 817 818 ----------------- 819 -- Set_Is_Leaf -- 820 ----------------- 821 822 overriding procedure Set_Is_Leaf 823 (Self : not null access UML_Artifact_Proxy; 824 To : Boolean) is 825 begin 826 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf 827 (Self.Element, To); 828 end Set_Is_Leaf; 829 830 --------------------------- 831 -- Get_Redefined_Element -- 832 --------------------------- 833 834 overriding function Get_Redefined_Element 835 (Self : not null access constant UML_Artifact_Proxy) 836 return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is 837 begin 838 return 839 AMF.UML.Redefinable_Elements.Collections.Wrap 840 (AMF.Internals.Element_Collections.Wrap 841 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element 842 (Self.Element))); 843 end Get_Redefined_Element; 844 845 ------------------------------ 846 -- Get_Redefinition_Context -- 847 ------------------------------ 848 849 overriding function Get_Redefinition_Context 850 (Self : not null access constant UML_Artifact_Proxy) 851 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is 852 begin 853 return 854 AMF.UML.Classifiers.Collections.Wrap 855 (AMF.Internals.Element_Collections.Wrap 856 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context 857 (Self.Element))); 858 end Get_Redefinition_Context; 859 860 ------------------ 861 -- All_Features -- 862 ------------------ 863 864 overriding function All_Features 865 (Self : not null access constant UML_Artifact_Proxy) 866 return AMF.UML.Features.Collections.Set_Of_UML_Feature is 867 begin 868 -- Generated stub: replace with real body! 869 pragma Compile_Time_Warning (Standard.True, "All_Features unimplemented"); 870 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.All_Features"; 871 return All_Features (Self); 872 end All_Features; 873 874 ----------------- 875 -- Conforms_To -- 876 ----------------- 877 878 overriding function Conforms_To 879 (Self : not null access constant UML_Artifact_Proxy; 880 Other : AMF.UML.Classifiers.UML_Classifier_Access) 881 return Boolean is 882 begin 883 -- Generated stub: replace with real body! 884 pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented"); 885 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Conforms_To"; 886 return Conforms_To (Self, Other); 887 end Conforms_To; 888 889 ------------- 890 -- General -- 891 ------------- 892 893 overriding function General 894 (Self : not null access constant UML_Artifact_Proxy) 895 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is 896 begin 897 -- Generated stub: replace with real body! 898 pragma Compile_Time_Warning (Standard.True, "General unimplemented"); 899 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.General"; 900 return General (Self); 901 end General; 902 903 ----------------------- 904 -- Has_Visibility_Of -- 905 ----------------------- 906 907 overriding function Has_Visibility_Of 908 (Self : not null access constant UML_Artifact_Proxy; 909 N : AMF.UML.Named_Elements.UML_Named_Element_Access) 910 return Boolean is 911 begin 912 -- Generated stub: replace with real body! 913 pragma Compile_Time_Warning (Standard.True, "Has_Visibility_Of unimplemented"); 914 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Has_Visibility_Of"; 915 return Has_Visibility_Of (Self, N); 916 end Has_Visibility_Of; 917 918 ------------- 919 -- Inherit -- 920 ------------- 921 922 overriding function Inherit 923 (Self : not null access constant UML_Artifact_Proxy; 924 Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element) 925 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 926 begin 927 -- Generated stub: replace with real body! 928 pragma Compile_Time_Warning (Standard.True, "Inherit unimplemented"); 929 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Inherit"; 930 return Inherit (Self, Inhs); 931 end Inherit; 932 933 ------------------------- 934 -- Inheritable_Members -- 935 ------------------------- 936 937 overriding function Inheritable_Members 938 (Self : not null access constant UML_Artifact_Proxy; 939 C : AMF.UML.Classifiers.UML_Classifier_Access) 940 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 941 begin 942 -- Generated stub: replace with real body! 943 pragma Compile_Time_Warning (Standard.True, "Inheritable_Members unimplemented"); 944 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Inheritable_Members"; 945 return Inheritable_Members (Self, C); 946 end Inheritable_Members; 947 948 ---------------------- 949 -- Inherited_Member -- 950 ---------------------- 951 952 overriding function Inherited_Member 953 (Self : not null access constant UML_Artifact_Proxy) 954 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 955 begin 956 -- Generated stub: replace with real body! 957 pragma Compile_Time_Warning (Standard.True, "Inherited_Member unimplemented"); 958 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Inherited_Member"; 959 return Inherited_Member (Self); 960 end Inherited_Member; 961 962 ----------------- 963 -- Is_Template -- 964 ----------------- 965 966 overriding function Is_Template 967 (Self : not null access constant UML_Artifact_Proxy) 968 return Boolean is 969 begin 970 -- Generated stub: replace with real body! 971 pragma Compile_Time_Warning (Standard.True, "Is_Template unimplemented"); 972 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Is_Template"; 973 return Is_Template (Self); 974 end Is_Template; 975 976 ------------------------- 977 -- May_Specialize_Type -- 978 ------------------------- 979 980 overriding function May_Specialize_Type 981 (Self : not null access constant UML_Artifact_Proxy; 982 C : AMF.UML.Classifiers.UML_Classifier_Access) 983 return Boolean is 984 begin 985 -- Generated stub: replace with real body! 986 pragma Compile_Time_Warning (Standard.True, "May_Specialize_Type unimplemented"); 987 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.May_Specialize_Type"; 988 return May_Specialize_Type (Self, C); 989 end May_Specialize_Type; 990 991 ------------------------ 992 -- Exclude_Collisions -- 993 ------------------------ 994 995 overriding function Exclude_Collisions 996 (Self : not null access constant UML_Artifact_Proxy; 997 Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element) 998 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is 999 begin 1000 -- Generated stub: replace with real body! 1001 pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented"); 1002 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Exclude_Collisions"; 1003 return Exclude_Collisions (Self, Imps); 1004 end Exclude_Collisions; 1005 1006 ------------------------- 1007 -- Get_Names_Of_Member -- 1008 ------------------------- 1009 1010 overriding function Get_Names_Of_Member 1011 (Self : not null access constant UML_Artifact_Proxy; 1012 Element : AMF.UML.Named_Elements.UML_Named_Element_Access) 1013 return AMF.String_Collections.Set_Of_String is 1014 begin 1015 -- Generated stub: replace with real body! 1016 pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented"); 1017 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Get_Names_Of_Member"; 1018 return Get_Names_Of_Member (Self, Element); 1019 end Get_Names_Of_Member; 1020 1021 -------------------- 1022 -- Import_Members -- 1023 -------------------- 1024 1025 overriding function Import_Members 1026 (Self : not null access constant UML_Artifact_Proxy; 1027 Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element) 1028 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is 1029 begin 1030 -- Generated stub: replace with real body! 1031 pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented"); 1032 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Import_Members"; 1033 return Import_Members (Self, Imps); 1034 end Import_Members; 1035 1036 --------------------- 1037 -- Imported_Member -- 1038 --------------------- 1039 1040 overriding function Imported_Member 1041 (Self : not null access constant UML_Artifact_Proxy) 1042 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is 1043 begin 1044 -- Generated stub: replace with real body! 1045 pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented"); 1046 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Imported_Member"; 1047 return Imported_Member (Self); 1048 end Imported_Member; 1049 1050 --------------------------------- 1051 -- Members_Are_Distinguishable -- 1052 --------------------------------- 1053 1054 overriding function Members_Are_Distinguishable 1055 (Self : not null access constant UML_Artifact_Proxy) 1056 return Boolean is 1057 begin 1058 -- Generated stub: replace with real body! 1059 pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented"); 1060 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Members_Are_Distinguishable"; 1061 return Members_Are_Distinguishable (Self); 1062 end Members_Are_Distinguishable; 1063 1064 ------------------ 1065 -- Owned_Member -- 1066 ------------------ 1067 1068 overriding function Owned_Member 1069 (Self : not null access constant UML_Artifact_Proxy) 1070 return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is 1071 begin 1072 -- Generated stub: replace with real body! 1073 pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented"); 1074 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Owned_Member"; 1075 return Owned_Member (Self); 1076 end Owned_Member; 1077 1078 ------------------------- 1079 -- All_Owning_Packages -- 1080 ------------------------- 1081 1082 overriding function All_Owning_Packages 1083 (Self : not null access constant UML_Artifact_Proxy) 1084 return AMF.UML.Packages.Collections.Set_Of_UML_Package is 1085 begin 1086 -- Generated stub: replace with real body! 1087 pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); 1088 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.All_Owning_Packages"; 1089 return All_Owning_Packages (Self); 1090 end All_Owning_Packages; 1091 1092 ----------------------------- 1093 -- Is_Distinguishable_From -- 1094 ----------------------------- 1095 1096 overriding function Is_Distinguishable_From 1097 (Self : not null access constant UML_Artifact_Proxy; 1098 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 1099 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 1100 return Boolean is 1101 begin 1102 -- Generated stub: replace with real body! 1103 pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); 1104 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Is_Distinguishable_From"; 1105 return Is_Distinguishable_From (Self, N, Ns); 1106 end Is_Distinguishable_From; 1107 1108 --------------- 1109 -- Namespace -- 1110 --------------- 1111 1112 overriding function Namespace 1113 (Self : not null access constant UML_Artifact_Proxy) 1114 return AMF.UML.Namespaces.UML_Namespace_Access is 1115 begin 1116 -- Generated stub: replace with real body! 1117 pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); 1118 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Namespace"; 1119 return Namespace (Self); 1120 end Namespace; 1121 1122 ----------------- 1123 -- Conforms_To -- 1124 ----------------- 1125 1126 overriding function Conforms_To 1127 (Self : not null access constant UML_Artifact_Proxy; 1128 Other : AMF.UML.Types.UML_Type_Access) 1129 return Boolean is 1130 begin 1131 -- Generated stub: replace with real body! 1132 pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented"); 1133 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Conforms_To"; 1134 return Conforms_To (Self, Other); 1135 end Conforms_To; 1136 1137 ------------------------ 1138 -- Is_Compatible_With -- 1139 ------------------------ 1140 1141 overriding function Is_Compatible_With 1142 (Self : not null access constant UML_Artifact_Proxy; 1143 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 1144 return Boolean is 1145 begin 1146 -- Generated stub: replace with real body! 1147 pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented"); 1148 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Is_Compatible_With"; 1149 return Is_Compatible_With (Self, P); 1150 end Is_Compatible_With; 1151 1152 --------------------------- 1153 -- Is_Template_Parameter -- 1154 --------------------------- 1155 1156 overriding function Is_Template_Parameter 1157 (Self : not null access constant UML_Artifact_Proxy) 1158 return Boolean is 1159 begin 1160 -- Generated stub: replace with real body! 1161 pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented"); 1162 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Is_Template_Parameter"; 1163 return Is_Template_Parameter (Self); 1164 end Is_Template_Parameter; 1165 1166 ---------------------------- 1167 -- Parameterable_Elements -- 1168 ---------------------------- 1169 1170 overriding function Parameterable_Elements 1171 (Self : not null access constant UML_Artifact_Proxy) 1172 return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element is 1173 begin 1174 -- Generated stub: replace with real body! 1175 pragma Compile_Time_Warning (Standard.True, "Parameterable_Elements unimplemented"); 1176 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Parameterable_Elements"; 1177 return Parameterable_Elements (Self); 1178 end Parameterable_Elements; 1179 1180 ------------------------ 1181 -- Is_Consistent_With -- 1182 ------------------------ 1183 1184 overriding function Is_Consistent_With 1185 (Self : not null access constant UML_Artifact_Proxy; 1186 Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 1187 return Boolean is 1188 begin 1189 -- Generated stub: replace with real body! 1190 pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented"); 1191 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Is_Consistent_With"; 1192 return Is_Consistent_With (Self, Redefinee); 1193 end Is_Consistent_With; 1194 1195 ----------------------------------- 1196 -- Is_Redefinition_Context_Valid -- 1197 ----------------------------------- 1198 1199 overriding function Is_Redefinition_Context_Valid 1200 (Self : not null access constant UML_Artifact_Proxy; 1201 Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 1202 return Boolean is 1203 begin 1204 -- Generated stub: replace with real body! 1205 pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented"); 1206 raise Program_Error with "Unimplemented procedure UML_Artifact_Proxy.Is_Redefinition_Context_Valid"; 1207 return Is_Redefinition_Context_Valid (Self, Redefined); 1208 end Is_Redefinition_Context_Valid; 1209 1210end AMF.Internals.UML_Artifacts; 1211