1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 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: 2671 $ $Date: 2012-03-23 00:51:37 +0400 (Fri, 23 Mar 2012) $ 43------------------------------------------------------------------------------ 44-- This file is generated, don't edit it. 45------------------------------------------------------------------------------ 46with AMF.Elements; 47with AMF.Internals.Element_Collections; 48with AMF.Internals.Helpers; 49with AMF.Internals.Tables.OCL_Attributes; 50with AMF.OCL.Ocl_Expressions.Collections; 51with AMF.UML.Call_Operation_Actions; 52with AMF.UML.Comments.Collections; 53with AMF.UML.Dependencies.Collections; 54with AMF.UML.Elements.Collections; 55with AMF.UML.Named_Elements; 56with AMF.UML.Namespaces.Collections; 57with AMF.UML.Packages.Collections; 58with AMF.UML.Send_Signal_Actions; 59with AMF.UML.String_Expressions; 60with AMF.UML.Types; 61with AMF.Visitors.OCL_Iterators; 62with AMF.Visitors.OCL_Visitors; 63with League.Strings.Internals; 64with Matreshka.Internals.Strings; 65 66package body AMF.Internals.OCL_Message_Exps is 67 68 ---------------- 69 -- Get_Target -- 70 ---------------- 71 72 overriding function Get_Target 73 (Self : not null access constant OCL_Message_Exp_Proxy) 74 return AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access is 75 begin 76 return 77 AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access 78 (AMF.Internals.Helpers.To_Element 79 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Target 80 (Self.Element))); 81 end Get_Target; 82 83 ---------------- 84 -- Set_Target -- 85 ---------------- 86 87 overriding procedure Set_Target 88 (Self : not null access OCL_Message_Exp_Proxy; 89 To : AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access) is 90 begin 91 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Target 92 (Self.Element, 93 AMF.Internals.Helpers.To_Element 94 (AMF.Elements.Element_Access (To))); 95 end Set_Target; 96 97 ------------------ 98 -- Get_Argument -- 99 ------------------ 100 101 overriding function Get_Argument 102 (Self : not null access constant OCL_Message_Exp_Proxy) 103 return AMF.OCL.Ocl_Expressions.Collections.Ordered_Set_Of_OCL_Ocl_Expression is 104 begin 105 return 106 AMF.OCL.Ocl_Expressions.Collections.Wrap 107 (AMF.Internals.Element_Collections.Wrap 108 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Argument 109 (Self.Element))); 110 end Get_Argument; 111 112 -------------------------- 113 -- Get_Called_Operation -- 114 -------------------------- 115 116 overriding function Get_Called_Operation 117 (Self : not null access constant OCL_Message_Exp_Proxy) 118 return AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access is 119 begin 120 return 121 AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access 122 (AMF.Internals.Helpers.To_Element 123 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Called_Operation 124 (Self.Element))); 125 end Get_Called_Operation; 126 127 -------------------------- 128 -- Set_Called_Operation -- 129 -------------------------- 130 131 overriding procedure Set_Called_Operation 132 (Self : not null access OCL_Message_Exp_Proxy; 133 To : AMF.UML.Call_Operation_Actions.UML_Call_Operation_Action_Access) is 134 begin 135 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Called_Operation 136 (Self.Element, 137 AMF.Internals.Helpers.To_Element 138 (AMF.Elements.Element_Access (To))); 139 end Set_Called_Operation; 140 141 --------------------- 142 -- Get_Sent_Signal -- 143 --------------------- 144 145 overriding function Get_Sent_Signal 146 (Self : not null access constant OCL_Message_Exp_Proxy) 147 return AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access is 148 begin 149 return 150 AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access 151 (AMF.Internals.Helpers.To_Element 152 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Sent_Signal 153 (Self.Element))); 154 end Get_Sent_Signal; 155 156 --------------------- 157 -- Set_Sent_Signal -- 158 --------------------- 159 160 overriding procedure Set_Sent_Signal 161 (Self : not null access OCL_Message_Exp_Proxy; 162 To : AMF.UML.Send_Signal_Actions.UML_Send_Signal_Action_Access) is 163 begin 164 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Sent_Signal 165 (Self.Element, 166 AMF.Internals.Helpers.To_Element 167 (AMF.Elements.Element_Access (To))); 168 end Set_Sent_Signal; 169 170 -------------- 171 -- Get_Type -- 172 -------------- 173 174 overriding function Get_Type 175 (Self : not null access constant OCL_Message_Exp_Proxy) 176 return AMF.UML.Types.UML_Type_Access is 177 begin 178 return 179 AMF.UML.Types.UML_Type_Access 180 (AMF.Internals.Helpers.To_Element 181 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Type 182 (Self.Element))); 183 end Get_Type; 184 185 -------------- 186 -- Set_Type -- 187 -------------- 188 189 overriding procedure Set_Type 190 (Self : not null access OCL_Message_Exp_Proxy; 191 To : AMF.UML.Types.UML_Type_Access) is 192 begin 193 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Type 194 (Self.Element, 195 AMF.Internals.Helpers.To_Element 196 (AMF.Elements.Element_Access (To))); 197 end Set_Type; 198 199 --------------------------- 200 -- Get_Client_Dependency -- 201 --------------------------- 202 203 overriding function Get_Client_Dependency 204 (Self : not null access constant OCL_Message_Exp_Proxy) 205 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is 206 begin 207 return 208 AMF.UML.Dependencies.Collections.Wrap 209 (AMF.Internals.Element_Collections.Wrap 210 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Client_Dependency 211 (Self.Element))); 212 end Get_Client_Dependency; 213 214 -------------- 215 -- Get_Name -- 216 -------------- 217 218 overriding function Get_Name 219 (Self : not null access constant OCL_Message_Exp_Proxy) 220 return AMF.Optional_String is 221 begin 222 declare 223 use type Matreshka.Internals.Strings.Shared_String_Access; 224 225 Aux : constant Matreshka.Internals.Strings.Shared_String_Access 226 := AMF.Internals.Tables.OCL_Attributes.Internal_Get_Name (Self.Element); 227 228 begin 229 if Aux = null then 230 return (Is_Empty => True); 231 232 else 233 return (False, League.Strings.Internals.Create (Aux)); 234 end if; 235 end; 236 end Get_Name; 237 238 -------------- 239 -- Set_Name -- 240 -------------- 241 242 overriding procedure Set_Name 243 (Self : not null access OCL_Message_Exp_Proxy; 244 To : AMF.Optional_String) is 245 begin 246 if To.Is_Empty then 247 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name 248 (Self.Element, null); 249 250 else 251 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name 252 (Self.Element, 253 League.Strings.Internals.Internal (To.Value)); 254 end if; 255 end Set_Name; 256 257 ------------------------- 258 -- Get_Name_Expression -- 259 ------------------------- 260 261 overriding function Get_Name_Expression 262 (Self : not null access constant OCL_Message_Exp_Proxy) 263 return AMF.UML.String_Expressions.UML_String_Expression_Access is 264 begin 265 return 266 AMF.UML.String_Expressions.UML_String_Expression_Access 267 (AMF.Internals.Helpers.To_Element 268 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Name_Expression 269 (Self.Element))); 270 end Get_Name_Expression; 271 272 ------------------------- 273 -- Set_Name_Expression -- 274 ------------------------- 275 276 overriding procedure Set_Name_Expression 277 (Self : not null access OCL_Message_Exp_Proxy; 278 To : AMF.UML.String_Expressions.UML_String_Expression_Access) is 279 begin 280 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name_Expression 281 (Self.Element, 282 AMF.Internals.Helpers.To_Element 283 (AMF.Elements.Element_Access (To))); 284 end Set_Name_Expression; 285 286 ------------------- 287 -- Get_Namespace -- 288 ------------------- 289 290 overriding function Get_Namespace 291 (Self : not null access constant OCL_Message_Exp_Proxy) 292 return AMF.UML.Namespaces.UML_Namespace_Access is 293 begin 294 return 295 AMF.UML.Namespaces.UML_Namespace_Access 296 (AMF.Internals.Helpers.To_Element 297 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Namespace 298 (Self.Element))); 299 end Get_Namespace; 300 301 ------------------------ 302 -- Get_Qualified_Name -- 303 ------------------------ 304 305 overriding function Get_Qualified_Name 306 (Self : not null access constant OCL_Message_Exp_Proxy) 307 return AMF.Optional_String is 308 begin 309 declare 310 use type Matreshka.Internals.Strings.Shared_String_Access; 311 312 Aux : constant Matreshka.Internals.Strings.Shared_String_Access 313 := AMF.Internals.Tables.OCL_Attributes.Internal_Get_Qualified_Name (Self.Element); 314 315 begin 316 if Aux = null then 317 return (Is_Empty => True); 318 319 else 320 return (False, League.Strings.Internals.Create (Aux)); 321 end if; 322 end; 323 end Get_Qualified_Name; 324 325 -------------------- 326 -- Get_Visibility -- 327 -------------------- 328 329 overriding function Get_Visibility 330 (Self : not null access constant OCL_Message_Exp_Proxy) 331 return AMF.UML.Optional_UML_Visibility_Kind is 332 begin 333 return 334 AMF.Internals.Tables.OCL_Attributes.Internal_Get_Visibility 335 (Self.Element); 336 end Get_Visibility; 337 338 -------------------- 339 -- Set_Visibility -- 340 -------------------- 341 342 overriding procedure Set_Visibility 343 (Self : not null access OCL_Message_Exp_Proxy; 344 To : AMF.UML.Optional_UML_Visibility_Kind) is 345 begin 346 AMF.Internals.Tables.OCL_Attributes.Internal_Set_Visibility 347 (Self.Element, To); 348 end Set_Visibility; 349 350 ----------------------- 351 -- Get_Owned_Comment -- 352 ----------------------- 353 354 overriding function Get_Owned_Comment 355 (Self : not null access constant OCL_Message_Exp_Proxy) 356 return AMF.UML.Comments.Collections.Set_Of_UML_Comment is 357 begin 358 return 359 AMF.UML.Comments.Collections.Wrap 360 (AMF.Internals.Element_Collections.Wrap 361 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Comment 362 (Self.Element))); 363 end Get_Owned_Comment; 364 365 ----------------------- 366 -- Get_Owned_Element -- 367 ----------------------- 368 369 overriding function Get_Owned_Element 370 (Self : not null access constant OCL_Message_Exp_Proxy) 371 return AMF.UML.Elements.Collections.Set_Of_UML_Element is 372 begin 373 return 374 AMF.UML.Elements.Collections.Wrap 375 (AMF.Internals.Element_Collections.Wrap 376 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Element 377 (Self.Element))); 378 end Get_Owned_Element; 379 380 --------------- 381 -- Get_Owner -- 382 --------------- 383 384 overriding function Get_Owner 385 (Self : not null access constant OCL_Message_Exp_Proxy) 386 return AMF.UML.Elements.UML_Element_Access is 387 begin 388 return 389 AMF.UML.Elements.UML_Element_Access 390 (AMF.Internals.Helpers.To_Element 391 (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owner 392 (Self.Element))); 393 end Get_Owner; 394 395 -------------------- 396 -- All_Namespaces -- 397 -------------------- 398 399 overriding function All_Namespaces 400 (Self : not null access constant OCL_Message_Exp_Proxy) 401 return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is 402 begin 403 -- Generated stub: replace with real body! 404 pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented"); 405 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.All_Namespaces"; 406 return All_Namespaces (Self); 407 end All_Namespaces; 408 409 ------------------------- 410 -- All_Owning_Packages -- 411 ------------------------- 412 413 overriding function All_Owning_Packages 414 (Self : not null access constant OCL_Message_Exp_Proxy) 415 return AMF.UML.Packages.Collections.Set_Of_UML_Package is 416 begin 417 -- Generated stub: replace with real body! 418 pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); 419 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.All_Owning_Packages"; 420 return All_Owning_Packages (Self); 421 end All_Owning_Packages; 422 423 ----------------------------- 424 -- Is_Distinguishable_From -- 425 ----------------------------- 426 427 overriding function Is_Distinguishable_From 428 (Self : not null access constant OCL_Message_Exp_Proxy; 429 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 430 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 431 return Boolean is 432 begin 433 -- Generated stub: replace with real body! 434 pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); 435 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.Is_Distinguishable_From"; 436 return Is_Distinguishable_From (Self, N, Ns); 437 end Is_Distinguishable_From; 438 439 --------------- 440 -- Namespace -- 441 --------------- 442 443 overriding function Namespace 444 (Self : not null access constant OCL_Message_Exp_Proxy) 445 return AMF.UML.Namespaces.UML_Namespace_Access is 446 begin 447 -- Generated stub: replace with real body! 448 pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); 449 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.Namespace"; 450 return Namespace (Self); 451 end Namespace; 452 453 -------------------- 454 -- Qualified_Name -- 455 -------------------- 456 457 overriding function Qualified_Name 458 (Self : not null access constant OCL_Message_Exp_Proxy) 459 return League.Strings.Universal_String is 460 begin 461 -- Generated stub: replace with real body! 462 pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented"); 463 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.Qualified_Name"; 464 return Qualified_Name (Self); 465 end Qualified_Name; 466 467 --------------- 468 -- Separator -- 469 --------------- 470 471 overriding function Separator 472 (Self : not null access constant OCL_Message_Exp_Proxy) 473 return League.Strings.Universal_String is 474 begin 475 -- Generated stub: replace with real body! 476 pragma Compile_Time_Warning (Standard.True, "Separator unimplemented"); 477 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.Separator"; 478 return Separator (Self); 479 end Separator; 480 481 ------------------------ 482 -- All_Owned_Elements -- 483 ------------------------ 484 485 overriding function All_Owned_Elements 486 (Self : not null access constant OCL_Message_Exp_Proxy) 487 return AMF.UML.Elements.Collections.Set_Of_UML_Element is 488 begin 489 -- Generated stub: replace with real body! 490 pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented"); 491 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.All_Owned_Elements"; 492 return All_Owned_Elements (Self); 493 end All_Owned_Elements; 494 495 ------------------- 496 -- Must_Be_Owned -- 497 ------------------- 498 499 overriding function Must_Be_Owned 500 (Self : not null access constant OCL_Message_Exp_Proxy) 501 return Boolean is 502 begin 503 -- Generated stub: replace with real body! 504 pragma Compile_Time_Warning (Standard.True, "Must_Be_Owned unimplemented"); 505 raise Program_Error with "Unimplemented procedure OCL_Message_Exp_Proxy.Must_Be_Owned"; 506 return Must_Be_Owned (Self); 507 end Must_Be_Owned; 508 509 ------------------- 510 -- Enter_Element -- 511 ------------------- 512 513 overriding procedure Enter_Element 514 (Self : not null access constant OCL_Message_Exp_Proxy; 515 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 516 Control : in out AMF.Visitors.Traverse_Control) is 517 begin 518 if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then 519 AMF.Visitors.OCL_Visitors.OCL_Visitor'Class 520 (Visitor).Enter_Message_Exp 521 (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (Self), 522 Control); 523 end if; 524 end Enter_Element; 525 526 ------------------- 527 -- Leave_Element -- 528 ------------------- 529 530 overriding procedure Leave_Element 531 (Self : not null access constant OCL_Message_Exp_Proxy; 532 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 533 Control : in out AMF.Visitors.Traverse_Control) is 534 begin 535 if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then 536 AMF.Visitors.OCL_Visitors.OCL_Visitor'Class 537 (Visitor).Leave_Message_Exp 538 (AMF.OCL.Message_Exps.OCL_Message_Exp_Access (Self), 539 Control); 540 end if; 541 end Leave_Element; 542 543 ------------------- 544 -- Visit_Element -- 545 ------------------- 546 547 overriding procedure Visit_Element 548 (Self : not null access constant OCL_Message_Exp_Proxy; 549 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 550 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 551 Control : in out AMF.Visitors.Traverse_Control) is 552 begin 553 if Iterator in AMF.Visitors.OCL_Iterators.OCL_Iterator'Class then 554 AMF.Visitors.OCL_Iterators.OCL_Iterator'Class 555 (Iterator).Visit_Message_Exp 556 (Visitor, 557 AMF.OCL.Message_Exps.OCL_Message_Exp_Access (Self), 558 Control); 559 end if; 560 end Visit_Element; 561 562end AMF.Internals.OCL_Message_Exps; 563