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: 2541 $ $Date: 2012-03-01 19:27:26 +0400 (Thu, 01 Mar 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Elements; 45with AMF.Holders.Elements; 46 47package body AMF.Internals.Holders.OCL_Holders is 48 49 --------------- 50 -- To_Holder -- 51 --------------- 52 53 function To_Holder 54 (Item : AMF.OCL.Any_Types.OCL_Any_Type_Access) 55 return League.Holders.Holder is 56 begin 57 return 58 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 59 end To_Holder; 60 61 --------------- 62 -- To_Holder -- 63 --------------- 64 65 function To_Holder 66 (Item : AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access) 67 return League.Holders.Holder is 68 begin 69 return 70 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 71 end To_Holder; 72 73 --------------- 74 -- To_Holder -- 75 --------------- 76 77 function To_Holder 78 (Item : AMF.OCL.Bag_Types.OCL_Bag_Type_Access) 79 return League.Holders.Holder is 80 begin 81 return 82 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 83 end To_Holder; 84 85 --------------- 86 -- To_Holder -- 87 --------------- 88 89 function To_Holder 90 (Item : AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access) 91 return League.Holders.Holder is 92 begin 93 return 94 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 95 end To_Holder; 96 97 --------------- 98 -- To_Holder -- 99 --------------- 100 101 function To_Holder 102 (Item : AMF.OCL.Collection_Items.OCL_Collection_Item_Access) 103 return League.Holders.Holder is 104 begin 105 return 106 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 107 end To_Holder; 108 109 --------------- 110 -- To_Holder -- 111 --------------- 112 113 function To_Holder 114 (Item : AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access) 115 return League.Holders.Holder is 116 begin 117 return 118 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 119 end To_Holder; 120 121 --------------- 122 -- To_Holder -- 123 --------------- 124 125 function To_Holder 126 (Item : AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access) 127 return League.Holders.Holder is 128 begin 129 return 130 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 131 end To_Holder; 132 133 --------------- 134 -- To_Holder -- 135 --------------- 136 137 function To_Holder 138 (Item : AMF.OCL.Collection_Types.OCL_Collection_Type_Access) 139 return League.Holders.Holder is 140 begin 141 return 142 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 143 end To_Holder; 144 145 --------------- 146 -- To_Holder -- 147 --------------- 148 149 function To_Holder 150 (Item : AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access) 151 return League.Holders.Holder is 152 begin 153 return 154 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 155 end To_Holder; 156 157 --------------- 158 -- To_Holder -- 159 --------------- 160 161 function To_Holder 162 (Item : AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access) 163 return League.Holders.Holder is 164 begin 165 return 166 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 167 end To_Holder; 168 169 --------------- 170 -- To_Holder -- 171 --------------- 172 173 function To_Holder 174 (Item : AMF.OCL.If_Exps.OCL_If_Exp_Access) 175 return League.Holders.Holder is 176 begin 177 return 178 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 179 end To_Holder; 180 181 --------------- 182 -- To_Holder -- 183 --------------- 184 185 function To_Holder 186 (Item : AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access) 187 return League.Holders.Holder is 188 begin 189 return 190 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 191 end To_Holder; 192 193 --------------- 194 -- To_Holder -- 195 --------------- 196 197 function To_Holder 198 (Item : AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access) 199 return League.Holders.Holder is 200 begin 201 return 202 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 203 end To_Holder; 204 205 --------------- 206 -- To_Holder -- 207 --------------- 208 209 function To_Holder 210 (Item : AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access) 211 return League.Holders.Holder is 212 begin 213 return 214 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 215 end To_Holder; 216 217 --------------- 218 -- To_Holder -- 219 --------------- 220 221 function To_Holder 222 (Item : AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access) 223 return League.Holders.Holder is 224 begin 225 return 226 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 227 end To_Holder; 228 229 --------------- 230 -- To_Holder -- 231 --------------- 232 233 function To_Holder 234 (Item : AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access) 235 return League.Holders.Holder is 236 begin 237 return 238 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 239 end To_Holder; 240 241 --------------- 242 -- To_Holder -- 243 --------------- 244 245 function To_Holder 246 (Item : AMF.OCL.Let_Exps.OCL_Let_Exp_Access) 247 return League.Holders.Holder is 248 begin 249 return 250 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 251 end To_Holder; 252 253 --------------- 254 -- To_Holder -- 255 --------------- 256 257 function To_Holder 258 (Item : AMF.OCL.Message_Exps.OCL_Message_Exp_Access) 259 return League.Holders.Holder is 260 begin 261 return 262 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 263 end To_Holder; 264 265 --------------- 266 -- To_Holder -- 267 --------------- 268 269 function To_Holder 270 (Item : AMF.OCL.Message_Types.OCL_Message_Type_Access) 271 return League.Holders.Holder is 272 begin 273 return 274 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 275 end To_Holder; 276 277 --------------- 278 -- To_Holder -- 279 --------------- 280 281 function To_Holder 282 (Item : AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access) 283 return League.Holders.Holder is 284 begin 285 return 286 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 287 end To_Holder; 288 289 --------------- 290 -- To_Holder -- 291 --------------- 292 293 function To_Holder 294 (Item : AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access) 295 return League.Holders.Holder is 296 begin 297 return 298 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 299 end To_Holder; 300 301 --------------- 302 -- To_Holder -- 303 --------------- 304 305 function To_Holder 306 (Item : AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access) 307 return League.Holders.Holder is 308 begin 309 return 310 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 311 end To_Holder; 312 313 --------------- 314 -- To_Holder -- 315 --------------- 316 317 function To_Holder 318 (Item : AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access) 319 return League.Holders.Holder is 320 begin 321 return 322 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 323 end To_Holder; 324 325 --------------- 326 -- To_Holder -- 327 --------------- 328 329 function To_Holder 330 (Item : AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access) 331 return League.Holders.Holder is 332 begin 333 return 334 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 335 end To_Holder; 336 337 --------------- 338 -- To_Holder -- 339 --------------- 340 341 function To_Holder 342 (Item : AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access) 343 return League.Holders.Holder is 344 begin 345 return 346 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 347 end To_Holder; 348 349 --------------- 350 -- To_Holder -- 351 --------------- 352 353 function To_Holder 354 (Item : AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access) 355 return League.Holders.Holder is 356 begin 357 return 358 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 359 end To_Holder; 360 361 --------------- 362 -- To_Holder -- 363 --------------- 364 365 function To_Holder 366 (Item : AMF.OCL.Set_Types.OCL_Set_Type_Access) 367 return League.Holders.Holder is 368 begin 369 return 370 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 371 end To_Holder; 372 373 --------------- 374 -- To_Holder -- 375 --------------- 376 377 function To_Holder 378 (Item : AMF.OCL.State_Exps.OCL_State_Exp_Access) 379 return League.Holders.Holder is 380 begin 381 return 382 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 383 end To_Holder; 384 385 --------------- 386 -- To_Holder -- 387 --------------- 388 389 function To_Holder 390 (Item : AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access) 391 return League.Holders.Holder is 392 begin 393 return 394 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 395 end To_Holder; 396 397 --------------- 398 -- To_Holder -- 399 --------------- 400 401 function To_Holder 402 (Item : AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access) 403 return League.Holders.Holder is 404 begin 405 return 406 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 407 end To_Holder; 408 409 --------------- 410 -- To_Holder -- 411 --------------- 412 413 function To_Holder 414 (Item : AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access) 415 return League.Holders.Holder is 416 begin 417 return 418 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 419 end To_Holder; 420 421 --------------- 422 -- To_Holder -- 423 --------------- 424 425 function To_Holder 426 (Item : AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access) 427 return League.Holders.Holder is 428 begin 429 return 430 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 431 end To_Holder; 432 433 --------------- 434 -- To_Holder -- 435 --------------- 436 437 function To_Holder 438 (Item : AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access) 439 return League.Holders.Holder is 440 begin 441 return 442 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 443 end To_Holder; 444 445 --------------- 446 -- To_Holder -- 447 --------------- 448 449 function To_Holder 450 (Item : AMF.OCL.Type_Exps.OCL_Type_Exp_Access) 451 return League.Holders.Holder is 452 begin 453 return 454 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 455 end To_Holder; 456 457 --------------- 458 -- To_Holder -- 459 --------------- 460 461 function To_Holder 462 (Item : AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access) 463 return League.Holders.Holder is 464 begin 465 return 466 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 467 end To_Holder; 468 469 --------------- 470 -- To_Holder -- 471 --------------- 472 473 function To_Holder 474 (Item : AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access) 475 return League.Holders.Holder is 476 begin 477 return 478 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 479 end To_Holder; 480 481 --------------- 482 -- To_Holder -- 483 --------------- 484 485 function To_Holder 486 (Item : AMF.OCL.Variables.OCL_Variable_Access) 487 return League.Holders.Holder is 488 begin 489 return 490 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 491 end To_Holder; 492 493 --------------- 494 -- To_Holder -- 495 --------------- 496 497 function To_Holder 498 (Item : AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access) 499 return League.Holders.Holder is 500 begin 501 return 502 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 503 end To_Holder; 504 505 --------------- 506 -- To_Holder -- 507 --------------- 508 509 function To_Holder 510 (Item : AMF.OCL.Void_Types.OCL_Void_Type_Access) 511 return League.Holders.Holder is 512 begin 513 return 514 AMF.Holders.Elements.To_Holder (AMF.Elements.Element_Access (Item)); 515 end To_Holder; 516 517end AMF.Internals.Holders.OCL_Holders; 518