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