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