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: 2981 $ $Date: 2012-05-15 20:56:15 +0400 (Tue, 15 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_Extension_Ends is 54 55 ------------------- 56 -- Enter_Element -- 57 ------------------- 58 59 overriding procedure Enter_Element 60 (Self : not null access constant UML_Extension_End_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_Extension_End 67 (AMF.UML.Extension_Ends.UML_Extension_End_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_Extension_End_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_Extension_End 84 (AMF.UML.Extension_Ends.UML_Extension_End_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_Extension_End_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_Extension_End 102 (Visitor, 103 AMF.UML.Extension_Ends.UML_Extension_End_Access (Self), 104 Control); 105 end if; 106 end Visit_Element; 107 108 --------------- 109 -- Set_Lower -- 110 --------------- 111 112 overriding procedure Set_Lower 113 (Self : not null access UML_Extension_End_Proxy; 114 To : AMF.Optional_Integer) is 115 begin 116 AMF.Internals.Tables.UML_Attributes.Internal_Set_Lower 117 (Self.Element, To); 118 end Set_Lower; 119 120 -------------- 121 -- Get_Type -- 122 -------------- 123 124 overriding function Get_Type 125 (Self : not null access constant UML_Extension_End_Proxy) 126 return AMF.UML.Stereotypes.UML_Stereotype_Access is 127 begin 128 return 129 AMF.UML.Stereotypes.UML_Stereotype_Access 130 (AMF.Internals.Helpers.To_Element 131 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Type 132 (Self.Element))); 133 end Get_Type; 134 135 -------------- 136 -- Set_Type -- 137 -------------- 138 139 overriding procedure Set_Type 140 (Self : not null access UML_Extension_End_Proxy; 141 To : AMF.UML.Stereotypes.UML_Stereotype_Access) is 142 begin 143 AMF.Internals.Tables.UML_Attributes.Internal_Set_Type 144 (Self.Element, 145 AMF.Internals.Helpers.To_Element 146 (AMF.Elements.Element_Access (To))); 147 end Set_Type; 148 149 --------------------- 150 -- Get_Aggregation -- 151 --------------------- 152 153 overriding function Get_Aggregation 154 (Self : not null access constant UML_Extension_End_Proxy) 155 return AMF.UML.UML_Aggregation_Kind is 156 begin 157 return 158 AMF.Internals.Tables.UML_Attributes.Internal_Get_Aggregation 159 (Self.Element); 160 end Get_Aggregation; 161 162 --------------------- 163 -- Set_Aggregation -- 164 --------------------- 165 166 overriding procedure Set_Aggregation 167 (Self : not null access UML_Extension_End_Proxy; 168 To : AMF.UML.UML_Aggregation_Kind) is 169 begin 170 AMF.Internals.Tables.UML_Attributes.Internal_Set_Aggregation 171 (Self.Element, To); 172 end Set_Aggregation; 173 174 --------------------- 175 -- Get_Association -- 176 --------------------- 177 178 overriding function Get_Association 179 (Self : not null access constant UML_Extension_End_Proxy) 180 return AMF.UML.Associations.UML_Association_Access is 181 begin 182 return 183 AMF.UML.Associations.UML_Association_Access 184 (AMF.Internals.Helpers.To_Element 185 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Association 186 (Self.Element))); 187 end Get_Association; 188 189 --------------------- 190 -- Set_Association -- 191 --------------------- 192 193 overriding procedure Set_Association 194 (Self : not null access UML_Extension_End_Proxy; 195 To : AMF.UML.Associations.UML_Association_Access) is 196 begin 197 AMF.Internals.Tables.UML_Attributes.Internal_Set_Association 198 (Self.Element, 199 AMF.Internals.Helpers.To_Element 200 (AMF.Elements.Element_Access (To))); 201 end Set_Association; 202 203 ------------------------- 204 -- Get_Association_End -- 205 ------------------------- 206 207 overriding function Get_Association_End 208 (Self : not null access constant UML_Extension_End_Proxy) 209 return AMF.UML.Properties.UML_Property_Access is 210 begin 211 return 212 AMF.UML.Properties.UML_Property_Access 213 (AMF.Internals.Helpers.To_Element 214 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Association_End 215 (Self.Element))); 216 end Get_Association_End; 217 218 ------------------------- 219 -- Set_Association_End -- 220 ------------------------- 221 222 overriding procedure Set_Association_End 223 (Self : not null access UML_Extension_End_Proxy; 224 To : AMF.UML.Properties.UML_Property_Access) is 225 begin 226 AMF.Internals.Tables.UML_Attributes.Internal_Set_Association_End 227 (Self.Element, 228 AMF.Internals.Helpers.To_Element 229 (AMF.Elements.Element_Access (To))); 230 end Set_Association_End; 231 232 --------------- 233 -- Get_Class -- 234 --------------- 235 236 overriding function Get_Class 237 (Self : not null access constant UML_Extension_End_Proxy) 238 return AMF.UML.Classes.UML_Class_Access is 239 begin 240 return 241 AMF.UML.Classes.UML_Class_Access 242 (AMF.Internals.Helpers.To_Element 243 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Class 244 (Self.Element))); 245 end Get_Class; 246 247 --------------- 248 -- Set_Class -- 249 --------------- 250 251 overriding procedure Set_Class 252 (Self : not null access UML_Extension_End_Proxy; 253 To : AMF.UML.Classes.UML_Class_Access) is 254 begin 255 AMF.Internals.Tables.UML_Attributes.Internal_Set_Class 256 (Self.Element, 257 AMF.Internals.Helpers.To_Element 258 (AMF.Elements.Element_Access (To))); 259 end Set_Class; 260 261 ------------------ 262 -- Get_Datatype -- 263 ------------------ 264 265 overriding function Get_Datatype 266 (Self : not null access constant UML_Extension_End_Proxy) 267 return AMF.UML.Data_Types.UML_Data_Type_Access is 268 begin 269 return 270 AMF.UML.Data_Types.UML_Data_Type_Access 271 (AMF.Internals.Helpers.To_Element 272 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Datatype 273 (Self.Element))); 274 end Get_Datatype; 275 276 ------------------ 277 -- Set_Datatype -- 278 ------------------ 279 280 overriding procedure Set_Datatype 281 (Self : not null access UML_Extension_End_Proxy; 282 To : AMF.UML.Data_Types.UML_Data_Type_Access) is 283 begin 284 AMF.Internals.Tables.UML_Attributes.Internal_Set_Datatype 285 (Self.Element, 286 AMF.Internals.Helpers.To_Element 287 (AMF.Elements.Element_Access (To))); 288 end Set_Datatype; 289 290 ----------------- 291 -- Get_Default -- 292 ----------------- 293 294 overriding function Get_Default 295 (Self : not null access constant UML_Extension_End_Proxy) 296 return AMF.Optional_String is 297 begin 298 declare 299 use type Matreshka.Internals.Strings.Shared_String_Access; 300 301 Aux : constant Matreshka.Internals.Strings.Shared_String_Access 302 := AMF.Internals.Tables.UML_Attributes.Internal_Get_Default (Self.Element); 303 304 begin 305 if Aux = null then 306 return (Is_Empty => True); 307 308 else 309 return (False, League.Strings.Internals.Create (Aux)); 310 end if; 311 end; 312 end Get_Default; 313 314 ----------------- 315 -- Set_Default -- 316 ----------------- 317 318 overriding procedure Set_Default 319 (Self : not null access UML_Extension_End_Proxy; 320 To : AMF.Optional_String) is 321 begin 322 if To.Is_Empty then 323 AMF.Internals.Tables.UML_Attributes.Internal_Set_Default 324 (Self.Element, null); 325 326 else 327 AMF.Internals.Tables.UML_Attributes.Internal_Set_Default 328 (Self.Element, 329 League.Strings.Internals.Internal (To.Value)); 330 end if; 331 end Set_Default; 332 333 ----------------------- 334 -- Get_Default_Value -- 335 ----------------------- 336 337 overriding function Get_Default_Value 338 (Self : not null access constant UML_Extension_End_Proxy) 339 return AMF.UML.Value_Specifications.UML_Value_Specification_Access is 340 begin 341 return 342 AMF.UML.Value_Specifications.UML_Value_Specification_Access 343 (AMF.Internals.Helpers.To_Element 344 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Default_Value 345 (Self.Element))); 346 end Get_Default_Value; 347 348 ----------------------- 349 -- Set_Default_Value -- 350 ----------------------- 351 352 overriding procedure Set_Default_Value 353 (Self : not null access UML_Extension_End_Proxy; 354 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access) is 355 begin 356 AMF.Internals.Tables.UML_Attributes.Internal_Set_Default_Value 357 (Self.Element, 358 AMF.Internals.Helpers.To_Element 359 (AMF.Elements.Element_Access (To))); 360 end Set_Default_Value; 361 362 ------------------- 363 -- Get_Interface -- 364 ------------------- 365 366 overriding function Get_Interface 367 (Self : not null access constant UML_Extension_End_Proxy) 368 return AMF.UML.Interfaces.UML_Interface_Access is 369 begin 370 return 371 AMF.UML.Interfaces.UML_Interface_Access 372 (AMF.Internals.Helpers.To_Element 373 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Interface 374 (Self.Element))); 375 end Get_Interface; 376 377 ------------------- 378 -- Set_Interface -- 379 ------------------- 380 381 overriding procedure Set_Interface 382 (Self : not null access UML_Extension_End_Proxy; 383 To : AMF.UML.Interfaces.UML_Interface_Access) is 384 begin 385 AMF.Internals.Tables.UML_Attributes.Internal_Set_Interface 386 (Self.Element, 387 AMF.Internals.Helpers.To_Element 388 (AMF.Elements.Element_Access (To))); 389 end Set_Interface; 390 391 -------------------- 392 -- Get_Is_Derived -- 393 -------------------- 394 395 overriding function Get_Is_Derived 396 (Self : not null access constant UML_Extension_End_Proxy) 397 return Boolean is 398 begin 399 return 400 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Derived 401 (Self.Element); 402 end Get_Is_Derived; 403 404 -------------------- 405 -- Set_Is_Derived -- 406 -------------------- 407 408 overriding procedure Set_Is_Derived 409 (Self : not null access UML_Extension_End_Proxy; 410 To : Boolean) is 411 begin 412 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Derived 413 (Self.Element, To); 414 end Set_Is_Derived; 415 416 -------------------------- 417 -- Get_Is_Derived_Union -- 418 -------------------------- 419 420 overriding function Get_Is_Derived_Union 421 (Self : not null access constant UML_Extension_End_Proxy) 422 return Boolean is 423 begin 424 return 425 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Derived_Union 426 (Self.Element); 427 end Get_Is_Derived_Union; 428 429 -------------------------- 430 -- Set_Is_Derived_Union -- 431 -------------------------- 432 433 overriding procedure Set_Is_Derived_Union 434 (Self : not null access UML_Extension_End_Proxy; 435 To : Boolean) is 436 begin 437 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Derived_Union 438 (Self.Element, To); 439 end Set_Is_Derived_Union; 440 441 --------------- 442 -- Get_Is_ID -- 443 --------------- 444 445 overriding function Get_Is_ID 446 (Self : not null access constant UML_Extension_End_Proxy) 447 return Boolean is 448 begin 449 return 450 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_ID 451 (Self.Element); 452 end Get_Is_ID; 453 454 --------------- 455 -- Set_Is_ID -- 456 --------------- 457 458 overriding procedure Set_Is_ID 459 (Self : not null access UML_Extension_End_Proxy; 460 To : Boolean) is 461 begin 462 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_ID 463 (Self.Element, To); 464 end Set_Is_ID; 465 466 ---------------------- 467 -- Get_Is_Read_Only -- 468 ---------------------- 469 470 overriding function Get_Is_Read_Only 471 (Self : not null access constant UML_Extension_End_Proxy) 472 return Boolean is 473 begin 474 return 475 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Read_Only 476 (Self.Element); 477 end Get_Is_Read_Only; 478 479 ---------------------- 480 -- Set_Is_Read_Only -- 481 ---------------------- 482 483 overriding procedure Set_Is_Read_Only 484 (Self : not null access UML_Extension_End_Proxy; 485 To : Boolean) is 486 begin 487 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Read_Only 488 (Self.Element, To); 489 end Set_Is_Read_Only; 490 491 ------------------ 492 -- Get_Opposite -- 493 ------------------ 494 495 overriding function Get_Opposite 496 (Self : not null access constant UML_Extension_End_Proxy) 497 return AMF.UML.Properties.UML_Property_Access is 498 begin 499 return 500 AMF.UML.Properties.UML_Property_Access 501 (AMF.Internals.Helpers.To_Element 502 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Opposite 503 (Self.Element))); 504 end Get_Opposite; 505 506 ------------------ 507 -- Set_Opposite -- 508 ------------------ 509 510 overriding procedure Set_Opposite 511 (Self : not null access UML_Extension_End_Proxy; 512 To : AMF.UML.Properties.UML_Property_Access) is 513 begin 514 AMF.Internals.Tables.UML_Attributes.Internal_Set_Opposite 515 (Self.Element, 516 AMF.Internals.Helpers.To_Element 517 (AMF.Elements.Element_Access (To))); 518 end Set_Opposite; 519 520 ---------------------------- 521 -- Get_Owning_Association -- 522 ---------------------------- 523 524 overriding function Get_Owning_Association 525 (Self : not null access constant UML_Extension_End_Proxy) 526 return AMF.UML.Associations.UML_Association_Access is 527 begin 528 return 529 AMF.UML.Associations.UML_Association_Access 530 (AMF.Internals.Helpers.To_Element 531 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Association 532 (Self.Element))); 533 end Get_Owning_Association; 534 535 ---------------------------- 536 -- Set_Owning_Association -- 537 ---------------------------- 538 539 overriding procedure Set_Owning_Association 540 (Self : not null access UML_Extension_End_Proxy; 541 To : AMF.UML.Associations.UML_Association_Access) is 542 begin 543 AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Association 544 (Self.Element, 545 AMF.Internals.Helpers.To_Element 546 (AMF.Elements.Element_Access (To))); 547 end Set_Owning_Association; 548 549 ------------------- 550 -- Get_Qualifier -- 551 ------------------- 552 553 overriding function Get_Qualifier 554 (Self : not null access constant UML_Extension_End_Proxy) 555 return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property is 556 begin 557 return 558 AMF.UML.Properties.Collections.Wrap 559 (AMF.Internals.Element_Collections.Wrap 560 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualifier 561 (Self.Element))); 562 end Get_Qualifier; 563 564 ---------------------------- 565 -- Get_Redefined_Property -- 566 ---------------------------- 567 568 overriding function Get_Redefined_Property 569 (Self : not null access constant UML_Extension_End_Proxy) 570 return AMF.UML.Properties.Collections.Set_Of_UML_Property is 571 begin 572 return 573 AMF.UML.Properties.Collections.Wrap 574 (AMF.Internals.Element_Collections.Wrap 575 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Property 576 (Self.Element))); 577 end Get_Redefined_Property; 578 579 ---------------------------- 580 -- Get_Subsetted_Property -- 581 ---------------------------- 582 583 overriding function Get_Subsetted_Property 584 (Self : not null access constant UML_Extension_End_Proxy) 585 return AMF.UML.Properties.Collections.Set_Of_UML_Property is 586 begin 587 return 588 AMF.UML.Properties.Collections.Wrap 589 (AMF.Internals.Element_Collections.Wrap 590 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Subsetted_Property 591 (Self.Element))); 592 end Get_Subsetted_Property; 593 594 ------------- 595 -- Get_End -- 596 ------------- 597 598 overriding function Get_End 599 (Self : not null access constant UML_Extension_End_Proxy) 600 return AMF.UML.Connector_Ends.Collections.Ordered_Set_Of_UML_Connector_End is 601 begin 602 return 603 AMF.UML.Connector_Ends.Collections.Wrap 604 (AMF.Internals.Element_Collections.Wrap 605 (AMF.Internals.Tables.UML_Attributes.Internal_Get_End 606 (Self.Element))); 607 end Get_End; 608 609 ---------------------------- 610 -- Get_Template_Parameter -- 611 ---------------------------- 612 613 overriding function Get_Template_Parameter 614 (Self : not null access constant UML_Extension_End_Proxy) 615 return AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access is 616 begin 617 return 618 AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access 619 (AMF.Internals.Helpers.To_Element 620 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter 621 (Self.Element))); 622 end Get_Template_Parameter; 623 624 ---------------------------- 625 -- Set_Template_Parameter -- 626 ---------------------------- 627 628 overriding procedure Set_Template_Parameter 629 (Self : not null access UML_Extension_End_Proxy; 630 To : AMF.UML.Connectable_Element_Template_Parameters.UML_Connectable_Element_Template_Parameter_Access) is 631 begin 632 AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter 633 (Self.Element, 634 AMF.Internals.Helpers.To_Element 635 (AMF.Elements.Element_Access (To))); 636 end Set_Template_Parameter; 637 638 -------------- 639 -- Get_Type -- 640 -------------- 641 642 overriding function Get_Type 643 (Self : not null access constant UML_Extension_End_Proxy) 644 return AMF.UML.Types.UML_Type_Access is 645 begin 646 return 647 AMF.UML.Types.UML_Type_Access 648 (AMF.Internals.Helpers.To_Element 649 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Type 650 (Self.Element))); 651 end Get_Type; 652 653 -------------- 654 -- Set_Type -- 655 -------------- 656 657 overriding procedure Set_Type 658 (Self : not null access UML_Extension_End_Proxy; 659 To : AMF.UML.Types.UML_Type_Access) is 660 begin 661 AMF.Internals.Tables.UML_Attributes.Internal_Set_Type 662 (Self.Element, 663 AMF.Internals.Helpers.To_Element 664 (AMF.Elements.Element_Access (To))); 665 end Set_Type; 666 667 --------------------------- 668 -- Get_Client_Dependency -- 669 --------------------------- 670 671 overriding function Get_Client_Dependency 672 (Self : not null access constant UML_Extension_End_Proxy) 673 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is 674 begin 675 return 676 AMF.UML.Dependencies.Collections.Wrap 677 (AMF.Internals.Element_Collections.Wrap 678 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency 679 (Self.Element))); 680 end Get_Client_Dependency; 681 682 ------------------------- 683 -- Get_Name_Expression -- 684 ------------------------- 685 686 overriding function Get_Name_Expression 687 (Self : not null access constant UML_Extension_End_Proxy) 688 return AMF.UML.String_Expressions.UML_String_Expression_Access is 689 begin 690 return 691 AMF.UML.String_Expressions.UML_String_Expression_Access 692 (AMF.Internals.Helpers.To_Element 693 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression 694 (Self.Element))); 695 end Get_Name_Expression; 696 697 ------------------------- 698 -- Set_Name_Expression -- 699 ------------------------- 700 701 overriding procedure Set_Name_Expression 702 (Self : not null access UML_Extension_End_Proxy; 703 To : AMF.UML.String_Expressions.UML_String_Expression_Access) is 704 begin 705 AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression 706 (Self.Element, 707 AMF.Internals.Helpers.To_Element 708 (AMF.Elements.Element_Access (To))); 709 end Set_Name_Expression; 710 711 ------------------- 712 -- Get_Namespace -- 713 ------------------- 714 715 overriding function Get_Namespace 716 (Self : not null access constant UML_Extension_End_Proxy) 717 return AMF.UML.Namespaces.UML_Namespace_Access is 718 begin 719 return 720 AMF.UML.Namespaces.UML_Namespace_Access 721 (AMF.Internals.Helpers.To_Element 722 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace 723 (Self.Element))); 724 end Get_Namespace; 725 726 ------------------------ 727 -- Get_Qualified_Name -- 728 ------------------------ 729 730 overriding function Get_Qualified_Name 731 (Self : not null access constant UML_Extension_End_Proxy) 732 return AMF.Optional_String is 733 begin 734 declare 735 use type Matreshka.Internals.Strings.Shared_String_Access; 736 737 Aux : constant Matreshka.Internals.Strings.Shared_String_Access 738 := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element); 739 740 begin 741 if Aux = null then 742 return (Is_Empty => True); 743 744 else 745 return (False, League.Strings.Internals.Create (Aux)); 746 end if; 747 end; 748 end Get_Qualified_Name; 749 750 ----------------------------------- 751 -- Get_Owning_Template_Parameter -- 752 ----------------------------------- 753 754 overriding function Get_Owning_Template_Parameter 755 (Self : not null access constant UML_Extension_End_Proxy) 756 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is 757 begin 758 return 759 AMF.UML.Template_Parameters.UML_Template_Parameter_Access 760 (AMF.Internals.Helpers.To_Element 761 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter 762 (Self.Element))); 763 end Get_Owning_Template_Parameter; 764 765 ----------------------------------- 766 -- Set_Owning_Template_Parameter -- 767 ----------------------------------- 768 769 overriding procedure Set_Owning_Template_Parameter 770 (Self : not null access UML_Extension_End_Proxy; 771 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is 772 begin 773 AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter 774 (Self.Element, 775 AMF.Internals.Helpers.To_Element 776 (AMF.Elements.Element_Access (To))); 777 end Set_Owning_Template_Parameter; 778 779 ---------------------------- 780 -- Get_Template_Parameter -- 781 ---------------------------- 782 783 overriding function Get_Template_Parameter 784 (Self : not null access constant UML_Extension_End_Proxy) 785 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is 786 begin 787 return 788 AMF.UML.Template_Parameters.UML_Template_Parameter_Access 789 (AMF.Internals.Helpers.To_Element 790 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter 791 (Self.Element))); 792 end Get_Template_Parameter; 793 794 ---------------------------- 795 -- Set_Template_Parameter -- 796 ---------------------------- 797 798 overriding procedure Set_Template_Parameter 799 (Self : not null access UML_Extension_End_Proxy; 800 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is 801 begin 802 AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter 803 (Self.Element, 804 AMF.Internals.Helpers.To_Element 805 (AMF.Elements.Element_Access (To))); 806 end Set_Template_Parameter; 807 808 -------------------------- 809 -- Get_Deployed_Element -- 810 -------------------------- 811 812 overriding function Get_Deployed_Element 813 (Self : not null access constant UML_Extension_End_Proxy) 814 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is 815 begin 816 return 817 AMF.UML.Packageable_Elements.Collections.Wrap 818 (AMF.Internals.Element_Collections.Wrap 819 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Deployed_Element 820 (Self.Element))); 821 end Get_Deployed_Element; 822 823 -------------------- 824 -- Get_Deployment -- 825 -------------------- 826 827 overriding function Get_Deployment 828 (Self : not null access constant UML_Extension_End_Proxy) 829 return AMF.UML.Deployments.Collections.Set_Of_UML_Deployment is 830 begin 831 return 832 AMF.UML.Deployments.Collections.Wrap 833 (AMF.Internals.Element_Collections.Wrap 834 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Deployment 835 (Self.Element))); 836 end Get_Deployment; 837 838 ------------------------------ 839 -- Get_Featuring_Classifier -- 840 ------------------------------ 841 842 overriding function Get_Featuring_Classifier 843 (Self : not null access constant UML_Extension_End_Proxy) 844 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is 845 begin 846 return 847 AMF.UML.Classifiers.Collections.Wrap 848 (AMF.Internals.Element_Collections.Wrap 849 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Featuring_Classifier 850 (Self.Element))); 851 end Get_Featuring_Classifier; 852 853 ------------------- 854 -- Get_Is_Static -- 855 ------------------- 856 857 overriding function Get_Is_Static 858 (Self : not null access constant UML_Extension_End_Proxy) 859 return Boolean is 860 begin 861 return 862 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Static 863 (Self.Element); 864 end Get_Is_Static; 865 866 ------------------- 867 -- Set_Is_Static -- 868 ------------------- 869 870 overriding procedure Set_Is_Static 871 (Self : not null access UML_Extension_End_Proxy; 872 To : Boolean) is 873 begin 874 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Static 875 (Self.Element, To); 876 end Set_Is_Static; 877 878 ----------------- 879 -- Get_Is_Leaf -- 880 ----------------- 881 882 overriding function Get_Is_Leaf 883 (Self : not null access constant UML_Extension_End_Proxy) 884 return Boolean is 885 begin 886 return 887 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf 888 (Self.Element); 889 end Get_Is_Leaf; 890 891 ----------------- 892 -- Set_Is_Leaf -- 893 ----------------- 894 895 overriding procedure Set_Is_Leaf 896 (Self : not null access UML_Extension_End_Proxy; 897 To : Boolean) is 898 begin 899 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf 900 (Self.Element, To); 901 end Set_Is_Leaf; 902 903 --------------------------- 904 -- Get_Redefined_Element -- 905 --------------------------- 906 907 overriding function Get_Redefined_Element 908 (Self : not null access constant UML_Extension_End_Proxy) 909 return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is 910 begin 911 return 912 AMF.UML.Redefinable_Elements.Collections.Wrap 913 (AMF.Internals.Element_Collections.Wrap 914 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element 915 (Self.Element))); 916 end Get_Redefined_Element; 917 918 ------------------------------ 919 -- Get_Redefinition_Context -- 920 ------------------------------ 921 922 overriding function Get_Redefinition_Context 923 (Self : not null access constant UML_Extension_End_Proxy) 924 return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is 925 begin 926 return 927 AMF.UML.Classifiers.Collections.Wrap 928 (AMF.Internals.Element_Collections.Wrap 929 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context 930 (Self.Element))); 931 end Get_Redefinition_Context; 932 933 ----------------- 934 -- Lower_Bound -- 935 ----------------- 936 937 overriding function Lower_Bound 938 (Self : not null access constant UML_Extension_End_Proxy) 939 return AMF.Optional_Integer 940 is 941 -- 18.3.3 ExtensionEnd (from Profiles) 942 -- 943 -- The query lowerBound() returns the lower bound of the multiplicity as 944 -- an Integer. This is a redefinition of the default lower bound, which, 945 -- if empty, normally evaluates to 1 for MulticplicityElements. 946 -- 947 -- ExtensionEnd::lowerBound() : Set(Integer); 948 -- 949 -- lowerBound = 950 -- if lowerValue->isEmpty() then 0 951 -- else lowerValue->IntegerValue() endif 952 953 use type AMF.UML.Value_Specifications.UML_Value_Specification_Access; 954 955 Lower_Value : constant 956 AMF.UML.Value_Specifications.UML_Value_Specification_Access 957 := UML_Extension_End_Proxy'Class (Self.all).Get_Lower_Value; 958 959 begin 960 if Lower_Value = null then 961 return (False, 0); 962 963 else 964 return Lower_Value.Integer_Value; 965 end if; 966 end Lower_Bound; 967 968 ------------- 969 -- Default -- 970 ------------- 971 972 overriding function Default 973 (Self : not null access constant UML_Extension_End_Proxy) 974 return AMF.Optional_String is 975 begin 976 -- Generated stub: replace with real body! 977 pragma Compile_Time_Warning (Standard.True, "Default unimplemented"); 978 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Default"; 979 return Default (Self); 980 end Default; 981 982 ------------------ 983 -- Is_Attribute -- 984 ------------------ 985 986 overriding function Is_Attribute 987 (Self : not null access constant UML_Extension_End_Proxy; 988 P : AMF.UML.Properties.UML_Property_Access) 989 return Boolean is 990 begin 991 -- Generated stub: replace with real body! 992 pragma Compile_Time_Warning (Standard.True, "Is_Attribute unimplemented"); 993 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Attribute"; 994 return Is_Attribute (Self, P); 995 end Is_Attribute; 996 997 ------------------------ 998 -- Is_Compatible_With -- 999 ------------------------ 1000 1001 overriding function Is_Compatible_With 1002 (Self : not null access constant UML_Extension_End_Proxy; 1003 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 1004 return Boolean is 1005 begin 1006 -- Generated stub: replace with real body! 1007 pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented"); 1008 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Compatible_With"; 1009 return Is_Compatible_With (Self, P); 1010 end Is_Compatible_With; 1011 1012 ------------------ 1013 -- Is_Composite -- 1014 ------------------ 1015 1016 overriding function Is_Composite 1017 (Self : not null access constant UML_Extension_End_Proxy) 1018 return Boolean is 1019 begin 1020 -- Generated stub: replace with real body! 1021 pragma Compile_Time_Warning (Standard.True, "Is_Composite unimplemented"); 1022 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Composite"; 1023 return Is_Composite (Self); 1024 end Is_Composite; 1025 1026 ------------------------ 1027 -- Is_Consistent_With -- 1028 ------------------------ 1029 1030 overriding function Is_Consistent_With 1031 (Self : not null access constant UML_Extension_End_Proxy; 1032 Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 1033 return Boolean is 1034 begin 1035 -- Generated stub: replace with real body! 1036 pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented"); 1037 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Consistent_With"; 1038 return Is_Consistent_With (Self, Redefinee); 1039 end Is_Consistent_With; 1040 1041 ------------------ 1042 -- Is_Navigable -- 1043 ------------------ 1044 1045 overriding function Is_Navigable 1046 (Self : not null access constant UML_Extension_End_Proxy) 1047 return Boolean is 1048 begin 1049 -- Generated stub: replace with real body! 1050 pragma Compile_Time_Warning (Standard.True, "Is_Navigable unimplemented"); 1051 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Navigable"; 1052 return Is_Navigable (Self); 1053 end Is_Navigable; 1054 1055 -------------- 1056 -- Opposite -- 1057 -------------- 1058 1059 overriding function Opposite 1060 (Self : not null access constant UML_Extension_End_Proxy) 1061 return AMF.UML.Properties.UML_Property_Access is 1062 begin 1063 -- Generated stub: replace with real body! 1064 pragma Compile_Time_Warning (Standard.True, "Opposite unimplemented"); 1065 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Opposite"; 1066 return Opposite (Self); 1067 end Opposite; 1068 1069 ------------------------ 1070 -- Subsetting_Context -- 1071 ------------------------ 1072 1073 overriding function Subsetting_Context 1074 (Self : not null access constant UML_Extension_End_Proxy) 1075 return AMF.UML.Types.Collections.Set_Of_UML_Type is 1076 begin 1077 -- Generated stub: replace with real body! 1078 pragma Compile_Time_Warning (Standard.True, "Subsetting_Context unimplemented"); 1079 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Subsetting_Context"; 1080 return Subsetting_Context (Self); 1081 end Subsetting_Context; 1082 1083 ---------- 1084 -- Ends -- 1085 ---------- 1086 1087 overriding function Ends 1088 (Self : not null access constant UML_Extension_End_Proxy) 1089 return AMF.UML.Connector_Ends.Collections.Set_Of_UML_Connector_End is 1090 begin 1091 -- Generated stub: replace with real body! 1092 pragma Compile_Time_Warning (Standard.True, "Ends unimplemented"); 1093 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Ends"; 1094 return Ends (Self); 1095 end Ends; 1096 1097 ------------------------- 1098 -- All_Owning_Packages -- 1099 ------------------------- 1100 1101 overriding function All_Owning_Packages 1102 (Self : not null access constant UML_Extension_End_Proxy) 1103 return AMF.UML.Packages.Collections.Set_Of_UML_Package is 1104 begin 1105 -- Generated stub: replace with real body! 1106 pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); 1107 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.All_Owning_Packages"; 1108 return All_Owning_Packages (Self); 1109 end All_Owning_Packages; 1110 1111 ----------------------------- 1112 -- Is_Distinguishable_From -- 1113 ----------------------------- 1114 1115 overriding function Is_Distinguishable_From 1116 (Self : not null access constant UML_Extension_End_Proxy; 1117 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 1118 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 1119 return Boolean is 1120 begin 1121 -- Generated stub: replace with real body! 1122 pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); 1123 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Distinguishable_From"; 1124 return Is_Distinguishable_From (Self, N, Ns); 1125 end Is_Distinguishable_From; 1126 1127 --------------- 1128 -- Namespace -- 1129 --------------- 1130 1131 overriding function Namespace 1132 (Self : not null access constant UML_Extension_End_Proxy) 1133 return AMF.UML.Namespaces.UML_Namespace_Access is 1134 begin 1135 -- Generated stub: replace with real body! 1136 pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); 1137 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Namespace"; 1138 return Namespace (Self); 1139 end Namespace; 1140 1141 --------------------------- 1142 -- Is_Template_Parameter -- 1143 --------------------------- 1144 1145 overriding function Is_Template_Parameter 1146 (Self : not null access constant UML_Extension_End_Proxy) 1147 return Boolean is 1148 begin 1149 -- Generated stub: replace with real body! 1150 pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented"); 1151 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Template_Parameter"; 1152 return Is_Template_Parameter (Self); 1153 end Is_Template_Parameter; 1154 1155 ---------------------- 1156 -- Deployed_Element -- 1157 ---------------------- 1158 1159 overriding function Deployed_Element 1160 (Self : not null access constant UML_Extension_End_Proxy) 1161 return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is 1162 begin 1163 -- Generated stub: replace with real body! 1164 pragma Compile_Time_Warning (Standard.True, "Deployed_Element unimplemented"); 1165 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Deployed_Element"; 1166 return Deployed_Element (Self); 1167 end Deployed_Element; 1168 1169 --------------------- 1170 -- Compatible_With -- 1171 --------------------- 1172 1173 overriding function Compatible_With 1174 (Self : not null access constant UML_Extension_End_Proxy; 1175 Other : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access) 1176 return Boolean is 1177 begin 1178 -- Generated stub: replace with real body! 1179 pragma Compile_Time_Warning (Standard.True, "Compatible_With unimplemented"); 1180 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Compatible_With"; 1181 return Compatible_With (Self, Other); 1182 end Compatible_With; 1183 1184 -------------------------- 1185 -- Includes_Cardinality -- 1186 -------------------------- 1187 1188 overriding function Includes_Cardinality 1189 (Self : not null access constant UML_Extension_End_Proxy; 1190 C : Integer) 1191 return Boolean is 1192 begin 1193 -- Generated stub: replace with real body! 1194 pragma Compile_Time_Warning (Standard.True, "Includes_Cardinality unimplemented"); 1195 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Includes_Cardinality"; 1196 return Includes_Cardinality (Self, C); 1197 end Includes_Cardinality; 1198 1199 --------------------------- 1200 -- Includes_Multiplicity -- 1201 --------------------------- 1202 1203 overriding function Includes_Multiplicity 1204 (Self : not null access constant UML_Extension_End_Proxy; 1205 M : AMF.UML.Multiplicity_Elements.UML_Multiplicity_Element_Access) 1206 return Boolean is 1207 begin 1208 -- Generated stub: replace with real body! 1209 pragma Compile_Time_Warning (Standard.True, "Includes_Multiplicity unimplemented"); 1210 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Includes_Multiplicity"; 1211 return Includes_Multiplicity (Self, M); 1212 end Includes_Multiplicity; 1213 1214 --------- 1215 -- Iss -- 1216 --------- 1217 1218 overriding function Iss 1219 (Self : not null access constant UML_Extension_End_Proxy; 1220 Lowerbound : Integer; 1221 Upperbound : Integer) 1222 return Boolean is 1223 begin 1224 -- Generated stub: replace with real body! 1225 pragma Compile_Time_Warning (Standard.True, "Iss unimplemented"); 1226 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Iss"; 1227 return Iss (Self, Lowerbound, Upperbound); 1228 end Iss; 1229 1230 ----------------------------------- 1231 -- Is_Redefinition_Context_Valid -- 1232 ----------------------------------- 1233 1234 overriding function Is_Redefinition_Context_Valid 1235 (Self : not null access constant UML_Extension_End_Proxy; 1236 Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) 1237 return Boolean is 1238 begin 1239 -- Generated stub: replace with real body! 1240 pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented"); 1241 raise Program_Error with "Unimplemented procedure UML_Extension_End_Proxy.Is_Redefinition_Context_Valid"; 1242 return Is_Redefinition_Context_Valid (Self, Redefined); 1243 end Is_Redefinition_Context_Valid; 1244 1245end AMF.Internals.UML_Extension_Ends; 1246