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