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