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