1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 2012-2013, 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: 3646 $ $Date: 2013-01-07 22:05:34 +0400 (Mon, 07 Jan 2013) $ 43------------------------------------------------------------------------------ 44-- This file is generated, don't edit it. 45------------------------------------------------------------------------------ 46with AMF.Internals.Elements; 47with AMF.Internals.Extents; 48with AMF.Internals.Helpers; 49with AMF.Internals.Links; 50with AMF.Internals.Listener_Registry; 51with AMF.Internals.Tables.OCL_Constructors; 52with AMF.Internals.Tables.OCL_Metamodel; 53with AMF.OCL.Holders.Collection_Kinds; 54 55package body AMF.Internals.Factories.OCL_Factories is 56 57 Collection_Img : constant League.Strings.Universal_String 58 := League.Strings.To_Universal_String ("Collection"); 59 Set_Img : constant League.Strings.Universal_String 60 := League.Strings.To_Universal_String ("Set"); 61 Ordered_Set_Img : constant League.Strings.Universal_String 62 := League.Strings.To_Universal_String ("OrderedSet"); 63 Bag_Img : constant League.Strings.Universal_String 64 := League.Strings.To_Universal_String ("Bag"); 65 Sequence_Img : constant League.Strings.Universal_String 66 := League.Strings.To_Universal_String ("Sequence"); 67 68 ----------------- 69 -- Constructor -- 70 ----------------- 71 72 function Constructor 73 (Extent : AMF.Internals.AMF_Extent) 74 return not null AMF.Factories.Factory_Access is 75 begin 76 return new OCL_Factory'(Extent => Extent); 77 end Constructor; 78 79 ----------------------- 80 -- Convert_To_String -- 81 ----------------------- 82 83 overriding function Convert_To_String 84 (Self : not null access OCL_Factory; 85 Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class; 86 Value : League.Holders.Holder) return League.Strings.Universal_String 87 is 88 pragma Unreferenced (Self); 89 90 DT : constant AMF.Internals.CMOF_Element 91 := AMF.Internals.Elements.Element_Base'Class (Data_Type.all).Element; 92 93 begin 94 if DT = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Kind then 95 declare 96 Item : constant AMF.OCL.OCL_Collection_Kind 97 := AMF.OCL.Holders.Collection_Kinds.Element (Value); 98 99 begin 100 case Item is 101 when AMF.OCL.Collection => 102 return Collection_Img; 103 104 when AMF.OCL.Set => 105 return Set_Img; 106 107 when AMF.OCL.Ordered_Set => 108 return Ordered_Set_Img; 109 110 when AMF.OCL.Bag => 111 return Bag_Img; 112 113 when AMF.OCL.Sequence => 114 return Sequence_Img; 115 end case; 116 end; 117 118 else 119 raise Program_Error; 120 end if; 121 end Convert_To_String; 122 123 ------------ 124 -- Create -- 125 ------------ 126 127 overriding function Create 128 (Self : not null access OCL_Factory; 129 Meta_Class : not null access AMF.CMOF.Classes.CMOF_Class'Class) 130 return not null AMF.Elements.Element_Access 131 is 132 MC : constant AMF.Internals.CMOF_Element 133 := AMF.Internals.Elements.Element_Base'Class (Meta_Class.all).Element; 134 Element : AMF.Internals.AMF_Element; 135 136 begin 137 if MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Any_Type then 138 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Any_Type; 139 140 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Association_Class_Call_Exp then 141 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Association_Class_Call_Exp; 142 143 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Bag_Type then 144 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Bag_Type; 145 146 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Boolean_Literal_Exp then 147 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Boolean_Literal_Exp; 148 149 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Item then 150 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Collection_Item; 151 152 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Literal_Exp then 153 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Collection_Literal_Exp; 154 155 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Range then 156 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Collection_Range; 157 158 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Type then 159 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Collection_Type; 160 161 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Enum_Literal_Exp then 162 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Enum_Literal_Exp; 163 164 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Expression_In_Ocl then 165 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Expression_In_Ocl; 166 167 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_If_Exp then 168 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_If_Exp; 169 170 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Integer_Literal_Exp then 171 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Integer_Literal_Exp; 172 173 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Invalid_Literal_Exp then 174 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Invalid_Literal_Exp; 175 176 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Invalid_Type then 177 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Invalid_Type; 178 179 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Iterate_Exp then 180 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Iterate_Exp; 181 182 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Iterator_Exp then 183 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Iterator_Exp; 184 185 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Let_Exp then 186 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Let_Exp; 187 188 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Message_Exp then 189 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Message_Exp; 190 191 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Message_Type then 192 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Message_Type; 193 194 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Null_Literal_Exp then 195 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Null_Literal_Exp; 196 197 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Operation_Call_Exp then 198 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Operation_Call_Exp; 199 200 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Ordered_Set_Type then 201 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Ordered_Set_Type; 202 203 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Property_Call_Exp then 204 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Property_Call_Exp; 205 206 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Real_Literal_Exp then 207 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Real_Literal_Exp; 208 209 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Sequence_Type then 210 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Sequence_Type; 211 212 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Set_Type then 213 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Set_Type; 214 215 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_State_Exp then 216 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_State_Exp; 217 218 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_String_Literal_Exp then 219 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_String_Literal_Exp; 220 221 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Template_Parameter_Type then 222 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Template_Parameter_Type; 223 224 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Literal_Exp then 225 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Tuple_Literal_Exp; 226 227 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Literal_Part then 228 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Tuple_Literal_Part; 229 230 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Type then 231 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Tuple_Type; 232 233 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Type_Exp then 234 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Type_Exp; 235 236 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Unlimited_Natural_Literal_Exp then 237 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Unlimited_Natural_Literal_Exp; 238 239 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Unspecified_Value_Exp then 240 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Unspecified_Value_Exp; 241 242 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Variable then 243 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Variable; 244 245 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Variable_Exp then 246 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Variable_Exp; 247 248 elsif MC = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Void_Type then 249 Element := AMF.Internals.Tables.OCL_Constructors.Create_OCL_Void_Type; 250 251 else 252 raise Program_Error; 253 end if; 254 255 AMF.Internals.Extents.Internal_Append (Self.Extent, Element); 256 AMF.Internals.Listener_Registry.Notify_Instance_Create 257 (AMF.Internals.Helpers.To_Element (Element)); 258 259 return AMF.Internals.Helpers.To_Element (Element); 260 end Create; 261 262 ------------------------ 263 -- Create_From_String -- 264 ------------------------ 265 266 overriding function Create_From_String 267 (Self : not null access OCL_Factory; 268 Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class; 269 Image : League.Strings.Universal_String) return League.Holders.Holder 270 is 271 pragma Unreferenced (Self); 272 273 use type League.Strings.Universal_String; 274 275 DT : constant AMF.Internals.CMOF_Element 276 := AMF.Internals.Elements.Element_Base'Class (Data_Type.all).Element; 277 278 begin 279 if DT = AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Kind then 280 if Image = Collection_Img then 281 return 282 AMF.OCL.Holders.Collection_Kinds.To_Holder 283 (AMF.OCL.Collection); 284 285 elsif Image = Set_Img then 286 return 287 AMF.OCL.Holders.Collection_Kinds.To_Holder 288 (AMF.OCL.Set); 289 290 elsif Image = Ordered_Set_Img then 291 return 292 AMF.OCL.Holders.Collection_Kinds.To_Holder 293 (AMF.OCL.Ordered_Set); 294 295 elsif Image = Bag_Img then 296 return 297 AMF.OCL.Holders.Collection_Kinds.To_Holder 298 (AMF.OCL.Bag); 299 300 elsif Image = Sequence_Img then 301 return 302 AMF.OCL.Holders.Collection_Kinds.To_Holder 303 (AMF.OCL.Sequence); 304 305 else 306 raise Constraint_Error; 307 end if; 308 309 else 310 raise Program_Error; 311 end if; 312 end Create_From_String; 313 314 ----------------- 315 -- Create_Link -- 316 ----------------- 317 318 overriding function Create_Link 319 (Self : not null access OCL_Factory; 320 Association : 321 not null access AMF.CMOF.Associations.CMOF_Association'Class; 322 First_Element : not null AMF.Elements.Element_Access; 323 Second_Element : not null AMF.Elements.Element_Access) 324 return not null AMF.Links.Link_Access 325 is 326 pragma Unreferenced (Self); 327 328 begin 329 return 330 AMF.Internals.Links.Proxy 331 (AMF.Internals.Links.Create_Link 332 (AMF.Internals.Elements.Element_Base'Class 333 (Association.all).Element, 334 AMF.Internals.Helpers.To_Element (First_Element), 335 AMF.Internals.Helpers.To_Element (Second_Element))); 336 end Create_Link; 337 338 ----------------- 339 -- Get_Package -- 340 ----------------- 341 342 overriding function Get_Package 343 (Self : not null access constant OCL_Factory) 344 return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package 345 is 346 pragma Unreferenced (Self); 347 348 begin 349 return Result : AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package do 350 Result.Add (Get_Package); 351 end return; 352 end Get_Package; 353 354 ----------------- 355 -- Get_Package -- 356 ----------------- 357 358 function Get_Package return not null AMF.CMOF.Packages.CMOF_Package_Access is 359 begin 360 return 361 AMF.CMOF.Packages.CMOF_Package_Access 362 (AMF.Internals.Helpers.To_Element 363 (AMF.Internals.Tables.OCL_Metamodel.MM_OCL_OCL)); 364 end Get_Package; 365 366 --------------------- 367 -- Create_Any_Type -- 368 --------------------- 369 370 overriding function Create_Any_Type 371 (Self : not null access OCL_Factory) 372 return AMF.OCL.Any_Types.OCL_Any_Type_Access is 373 begin 374 return 375 AMF.OCL.Any_Types.OCL_Any_Type_Access 376 (Self.Create 377 (AMF.CMOF.Classes.CMOF_Class_Access 378 (AMF.Internals.Helpers.To_Element 379 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Any_Type)))); 380 end Create_Any_Type; 381 382 --------------------------------------- 383 -- Create_Association_Class_Call_Exp -- 384 --------------------------------------- 385 386 overriding function Create_Association_Class_Call_Exp 387 (Self : not null access OCL_Factory) 388 return AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access is 389 begin 390 return 391 AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access 392 (Self.Create 393 (AMF.CMOF.Classes.CMOF_Class_Access 394 (AMF.Internals.Helpers.To_Element 395 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Association_Class_Call_Exp)))); 396 end Create_Association_Class_Call_Exp; 397 398 --------------------- 399 -- Create_Bag_Type -- 400 --------------------- 401 402 overriding function Create_Bag_Type 403 (Self : not null access OCL_Factory) 404 return AMF.OCL.Bag_Types.OCL_Bag_Type_Access is 405 begin 406 return 407 AMF.OCL.Bag_Types.OCL_Bag_Type_Access 408 (Self.Create 409 (AMF.CMOF.Classes.CMOF_Class_Access 410 (AMF.Internals.Helpers.To_Element 411 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Bag_Type)))); 412 end Create_Bag_Type; 413 414 -------------------------------- 415 -- Create_Boolean_Literal_Exp -- 416 -------------------------------- 417 418 overriding function Create_Boolean_Literal_Exp 419 (Self : not null access OCL_Factory) 420 return AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access is 421 begin 422 return 423 AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access 424 (Self.Create 425 (AMF.CMOF.Classes.CMOF_Class_Access 426 (AMF.Internals.Helpers.To_Element 427 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Boolean_Literal_Exp)))); 428 end Create_Boolean_Literal_Exp; 429 430 ---------------------------- 431 -- Create_Collection_Item -- 432 ---------------------------- 433 434 overriding function Create_Collection_Item 435 (Self : not null access OCL_Factory) 436 return AMF.OCL.Collection_Items.OCL_Collection_Item_Access is 437 begin 438 return 439 AMF.OCL.Collection_Items.OCL_Collection_Item_Access 440 (Self.Create 441 (AMF.CMOF.Classes.CMOF_Class_Access 442 (AMF.Internals.Helpers.To_Element 443 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Item)))); 444 end Create_Collection_Item; 445 446 ----------------------------------- 447 -- Create_Collection_Literal_Exp -- 448 ----------------------------------- 449 450 overriding function Create_Collection_Literal_Exp 451 (Self : not null access OCL_Factory) 452 return AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access is 453 begin 454 return 455 AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access 456 (Self.Create 457 (AMF.CMOF.Classes.CMOF_Class_Access 458 (AMF.Internals.Helpers.To_Element 459 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Literal_Exp)))); 460 end Create_Collection_Literal_Exp; 461 462 ----------------------------- 463 -- Create_Collection_Range -- 464 ----------------------------- 465 466 overriding function Create_Collection_Range 467 (Self : not null access OCL_Factory) 468 return AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access is 469 begin 470 return 471 AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access 472 (Self.Create 473 (AMF.CMOF.Classes.CMOF_Class_Access 474 (AMF.Internals.Helpers.To_Element 475 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Range)))); 476 end Create_Collection_Range; 477 478 ---------------------------- 479 -- Create_Collection_Type -- 480 ---------------------------- 481 482 overriding function Create_Collection_Type 483 (Self : not null access OCL_Factory) 484 return AMF.OCL.Collection_Types.OCL_Collection_Type_Access is 485 begin 486 return 487 AMF.OCL.Collection_Types.OCL_Collection_Type_Access 488 (Self.Create 489 (AMF.CMOF.Classes.CMOF_Class_Access 490 (AMF.Internals.Helpers.To_Element 491 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Collection_Type)))); 492 end Create_Collection_Type; 493 494 ----------------------------- 495 -- Create_Enum_Literal_Exp -- 496 ----------------------------- 497 498 overriding function Create_Enum_Literal_Exp 499 (Self : not null access OCL_Factory) 500 return AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access is 501 begin 502 return 503 AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access 504 (Self.Create 505 (AMF.CMOF.Classes.CMOF_Class_Access 506 (AMF.Internals.Helpers.To_Element 507 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Enum_Literal_Exp)))); 508 end Create_Enum_Literal_Exp; 509 510 ------------------------------ 511 -- Create_Expression_In_Ocl -- 512 ------------------------------ 513 514 overriding function Create_Expression_In_Ocl 515 (Self : not null access OCL_Factory) 516 return AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access is 517 begin 518 return 519 AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access 520 (Self.Create 521 (AMF.CMOF.Classes.CMOF_Class_Access 522 (AMF.Internals.Helpers.To_Element 523 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Expression_In_Ocl)))); 524 end Create_Expression_In_Ocl; 525 526 ------------------- 527 -- Create_If_Exp -- 528 ------------------- 529 530 overriding function Create_If_Exp 531 (Self : not null access OCL_Factory) 532 return AMF.OCL.If_Exps.OCL_If_Exp_Access is 533 begin 534 return 535 AMF.OCL.If_Exps.OCL_If_Exp_Access 536 (Self.Create 537 (AMF.CMOF.Classes.CMOF_Class_Access 538 (AMF.Internals.Helpers.To_Element 539 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_If_Exp)))); 540 end Create_If_Exp; 541 542 -------------------------------- 543 -- Create_Integer_Literal_Exp -- 544 -------------------------------- 545 546 overriding function Create_Integer_Literal_Exp 547 (Self : not null access OCL_Factory) 548 return AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access is 549 begin 550 return 551 AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access 552 (Self.Create 553 (AMF.CMOF.Classes.CMOF_Class_Access 554 (AMF.Internals.Helpers.To_Element 555 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Integer_Literal_Exp)))); 556 end Create_Integer_Literal_Exp; 557 558 -------------------------------- 559 -- Create_Invalid_Literal_Exp -- 560 -------------------------------- 561 562 overriding function Create_Invalid_Literal_Exp 563 (Self : not null access OCL_Factory) 564 return AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access is 565 begin 566 return 567 AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access 568 (Self.Create 569 (AMF.CMOF.Classes.CMOF_Class_Access 570 (AMF.Internals.Helpers.To_Element 571 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Invalid_Literal_Exp)))); 572 end Create_Invalid_Literal_Exp; 573 574 ------------------------- 575 -- Create_Invalid_Type -- 576 ------------------------- 577 578 overriding function Create_Invalid_Type 579 (Self : not null access OCL_Factory) 580 return AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access is 581 begin 582 return 583 AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access 584 (Self.Create 585 (AMF.CMOF.Classes.CMOF_Class_Access 586 (AMF.Internals.Helpers.To_Element 587 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Invalid_Type)))); 588 end Create_Invalid_Type; 589 590 ------------------------ 591 -- Create_Iterate_Exp -- 592 ------------------------ 593 594 overriding function Create_Iterate_Exp 595 (Self : not null access OCL_Factory) 596 return AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access is 597 begin 598 return 599 AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access 600 (Self.Create 601 (AMF.CMOF.Classes.CMOF_Class_Access 602 (AMF.Internals.Helpers.To_Element 603 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Iterate_Exp)))); 604 end Create_Iterate_Exp; 605 606 ------------------------- 607 -- Create_Iterator_Exp -- 608 ------------------------- 609 610 overriding function Create_Iterator_Exp 611 (Self : not null access OCL_Factory) 612 return AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access is 613 begin 614 return 615 AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access 616 (Self.Create 617 (AMF.CMOF.Classes.CMOF_Class_Access 618 (AMF.Internals.Helpers.To_Element 619 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Iterator_Exp)))); 620 end Create_Iterator_Exp; 621 622 -------------------- 623 -- Create_Let_Exp -- 624 -------------------- 625 626 overriding function Create_Let_Exp 627 (Self : not null access OCL_Factory) 628 return AMF.OCL.Let_Exps.OCL_Let_Exp_Access is 629 begin 630 return 631 AMF.OCL.Let_Exps.OCL_Let_Exp_Access 632 (Self.Create 633 (AMF.CMOF.Classes.CMOF_Class_Access 634 (AMF.Internals.Helpers.To_Element 635 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Let_Exp)))); 636 end Create_Let_Exp; 637 638 ------------------------ 639 -- Create_Message_Exp -- 640 ------------------------ 641 642 overriding function Create_Message_Exp 643 (Self : not null access OCL_Factory) 644 return AMF.OCL.Message_Exps.OCL_Message_Exp_Access is 645 begin 646 return 647 AMF.OCL.Message_Exps.OCL_Message_Exp_Access 648 (Self.Create 649 (AMF.CMOF.Classes.CMOF_Class_Access 650 (AMF.Internals.Helpers.To_Element 651 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Message_Exp)))); 652 end Create_Message_Exp; 653 654 ------------------------- 655 -- Create_Message_Type -- 656 ------------------------- 657 658 overriding function Create_Message_Type 659 (Self : not null access OCL_Factory) 660 return AMF.OCL.Message_Types.OCL_Message_Type_Access is 661 begin 662 return 663 AMF.OCL.Message_Types.OCL_Message_Type_Access 664 (Self.Create 665 (AMF.CMOF.Classes.CMOF_Class_Access 666 (AMF.Internals.Helpers.To_Element 667 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Message_Type)))); 668 end Create_Message_Type; 669 670 ----------------------------- 671 -- Create_Null_Literal_Exp -- 672 ----------------------------- 673 674 overriding function Create_Null_Literal_Exp 675 (Self : not null access OCL_Factory) 676 return AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access is 677 begin 678 return 679 AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access 680 (Self.Create 681 (AMF.CMOF.Classes.CMOF_Class_Access 682 (AMF.Internals.Helpers.To_Element 683 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Null_Literal_Exp)))); 684 end Create_Null_Literal_Exp; 685 686 ------------------------------- 687 -- Create_Operation_Call_Exp -- 688 ------------------------------- 689 690 overriding function Create_Operation_Call_Exp 691 (Self : not null access OCL_Factory) 692 return AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access is 693 begin 694 return 695 AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access 696 (Self.Create 697 (AMF.CMOF.Classes.CMOF_Class_Access 698 (AMF.Internals.Helpers.To_Element 699 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Operation_Call_Exp)))); 700 end Create_Operation_Call_Exp; 701 702 ----------------------------- 703 -- Create_Ordered_Set_Type -- 704 ----------------------------- 705 706 overriding function Create_Ordered_Set_Type 707 (Self : not null access OCL_Factory) 708 return AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access is 709 begin 710 return 711 AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access 712 (Self.Create 713 (AMF.CMOF.Classes.CMOF_Class_Access 714 (AMF.Internals.Helpers.To_Element 715 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Ordered_Set_Type)))); 716 end Create_Ordered_Set_Type; 717 718 ------------------------------ 719 -- Create_Property_Call_Exp -- 720 ------------------------------ 721 722 overriding function Create_Property_Call_Exp 723 (Self : not null access OCL_Factory) 724 return AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access is 725 begin 726 return 727 AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access 728 (Self.Create 729 (AMF.CMOF.Classes.CMOF_Class_Access 730 (AMF.Internals.Helpers.To_Element 731 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Property_Call_Exp)))); 732 end Create_Property_Call_Exp; 733 734 ----------------------------- 735 -- Create_Real_Literal_Exp -- 736 ----------------------------- 737 738 overriding function Create_Real_Literal_Exp 739 (Self : not null access OCL_Factory) 740 return AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access is 741 begin 742 return 743 AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access 744 (Self.Create 745 (AMF.CMOF.Classes.CMOF_Class_Access 746 (AMF.Internals.Helpers.To_Element 747 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Real_Literal_Exp)))); 748 end Create_Real_Literal_Exp; 749 750 -------------------------- 751 -- Create_Sequence_Type -- 752 -------------------------- 753 754 overriding function Create_Sequence_Type 755 (Self : not null access OCL_Factory) 756 return AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access is 757 begin 758 return 759 AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access 760 (Self.Create 761 (AMF.CMOF.Classes.CMOF_Class_Access 762 (AMF.Internals.Helpers.To_Element 763 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Sequence_Type)))); 764 end Create_Sequence_Type; 765 766 --------------------- 767 -- Create_Set_Type -- 768 --------------------- 769 770 overriding function Create_Set_Type 771 (Self : not null access OCL_Factory) 772 return AMF.OCL.Set_Types.OCL_Set_Type_Access is 773 begin 774 return 775 AMF.OCL.Set_Types.OCL_Set_Type_Access 776 (Self.Create 777 (AMF.CMOF.Classes.CMOF_Class_Access 778 (AMF.Internals.Helpers.To_Element 779 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Set_Type)))); 780 end Create_Set_Type; 781 782 ---------------------- 783 -- Create_State_Exp -- 784 ---------------------- 785 786 overriding function Create_State_Exp 787 (Self : not null access OCL_Factory) 788 return AMF.OCL.State_Exps.OCL_State_Exp_Access is 789 begin 790 return 791 AMF.OCL.State_Exps.OCL_State_Exp_Access 792 (Self.Create 793 (AMF.CMOF.Classes.CMOF_Class_Access 794 (AMF.Internals.Helpers.To_Element 795 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_State_Exp)))); 796 end Create_State_Exp; 797 798 ------------------------------- 799 -- Create_String_Literal_Exp -- 800 ------------------------------- 801 802 overriding function Create_String_Literal_Exp 803 (Self : not null access OCL_Factory) 804 return AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access is 805 begin 806 return 807 AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access 808 (Self.Create 809 (AMF.CMOF.Classes.CMOF_Class_Access 810 (AMF.Internals.Helpers.To_Element 811 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_String_Literal_Exp)))); 812 end Create_String_Literal_Exp; 813 814 ------------------------------------ 815 -- Create_Template_Parameter_Type -- 816 ------------------------------------ 817 818 overriding function Create_Template_Parameter_Type 819 (Self : not null access OCL_Factory) 820 return AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access is 821 begin 822 return 823 AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access 824 (Self.Create 825 (AMF.CMOF.Classes.CMOF_Class_Access 826 (AMF.Internals.Helpers.To_Element 827 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Template_Parameter_Type)))); 828 end Create_Template_Parameter_Type; 829 830 ------------------------------ 831 -- Create_Tuple_Literal_Exp -- 832 ------------------------------ 833 834 overriding function Create_Tuple_Literal_Exp 835 (Self : not null access OCL_Factory) 836 return AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access is 837 begin 838 return 839 AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access 840 (Self.Create 841 (AMF.CMOF.Classes.CMOF_Class_Access 842 (AMF.Internals.Helpers.To_Element 843 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Literal_Exp)))); 844 end Create_Tuple_Literal_Exp; 845 846 ------------------------------- 847 -- Create_Tuple_Literal_Part -- 848 ------------------------------- 849 850 overriding function Create_Tuple_Literal_Part 851 (Self : not null access OCL_Factory) 852 return AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access is 853 begin 854 return 855 AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access 856 (Self.Create 857 (AMF.CMOF.Classes.CMOF_Class_Access 858 (AMF.Internals.Helpers.To_Element 859 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Literal_Part)))); 860 end Create_Tuple_Literal_Part; 861 862 ----------------------- 863 -- Create_Tuple_Type -- 864 ----------------------- 865 866 overriding function Create_Tuple_Type 867 (Self : not null access OCL_Factory) 868 return AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access is 869 begin 870 return 871 AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access 872 (Self.Create 873 (AMF.CMOF.Classes.CMOF_Class_Access 874 (AMF.Internals.Helpers.To_Element 875 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Tuple_Type)))); 876 end Create_Tuple_Type; 877 878 --------------------- 879 -- Create_Type_Exp -- 880 --------------------- 881 882 overriding function Create_Type_Exp 883 (Self : not null access OCL_Factory) 884 return AMF.OCL.Type_Exps.OCL_Type_Exp_Access is 885 begin 886 return 887 AMF.OCL.Type_Exps.OCL_Type_Exp_Access 888 (Self.Create 889 (AMF.CMOF.Classes.CMOF_Class_Access 890 (AMF.Internals.Helpers.To_Element 891 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Type_Exp)))); 892 end Create_Type_Exp; 893 894 ------------------------------------------ 895 -- Create_Unlimited_Natural_Literal_Exp -- 896 ------------------------------------------ 897 898 overriding function Create_Unlimited_Natural_Literal_Exp 899 (Self : not null access OCL_Factory) 900 return AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access is 901 begin 902 return 903 AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access 904 (Self.Create 905 (AMF.CMOF.Classes.CMOF_Class_Access 906 (AMF.Internals.Helpers.To_Element 907 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Unlimited_Natural_Literal_Exp)))); 908 end Create_Unlimited_Natural_Literal_Exp; 909 910 ---------------------------------- 911 -- Create_Unspecified_Value_Exp -- 912 ---------------------------------- 913 914 overriding function Create_Unspecified_Value_Exp 915 (Self : not null access OCL_Factory) 916 return AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access is 917 begin 918 return 919 AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access 920 (Self.Create 921 (AMF.CMOF.Classes.CMOF_Class_Access 922 (AMF.Internals.Helpers.To_Element 923 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Unspecified_Value_Exp)))); 924 end Create_Unspecified_Value_Exp; 925 926 --------------------- 927 -- Create_Variable -- 928 --------------------- 929 930 overriding function Create_Variable 931 (Self : not null access OCL_Factory) 932 return AMF.OCL.Variables.OCL_Variable_Access is 933 begin 934 return 935 AMF.OCL.Variables.OCL_Variable_Access 936 (Self.Create 937 (AMF.CMOF.Classes.CMOF_Class_Access 938 (AMF.Internals.Helpers.To_Element 939 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Variable)))); 940 end Create_Variable; 941 942 ------------------------- 943 -- Create_Variable_Exp -- 944 ------------------------- 945 946 overriding function Create_Variable_Exp 947 (Self : not null access OCL_Factory) 948 return AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access is 949 begin 950 return 951 AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access 952 (Self.Create 953 (AMF.CMOF.Classes.CMOF_Class_Access 954 (AMF.Internals.Helpers.To_Element 955 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Variable_Exp)))); 956 end Create_Variable_Exp; 957 958 ---------------------- 959 -- Create_Void_Type -- 960 ---------------------- 961 962 overriding function Create_Void_Type 963 (Self : not null access OCL_Factory) 964 return AMF.OCL.Void_Types.OCL_Void_Type_Access is 965 begin 966 return 967 AMF.OCL.Void_Types.OCL_Void_Type_Access 968 (Self.Create 969 (AMF.CMOF.Classes.CMOF_Class_Access 970 (AMF.Internals.Helpers.To_Element 971 (AMF.Internals.Tables.OCL_Metamodel.MC_OCL_Void_Type)))); 972 end Create_Void_Type; 973 974end AMF.Internals.Factories.OCL_Factories; 975