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------------------------------------------------------------------------------ 44-- This package contains conversion subprograms from different subclasses of 45-- elements into holders. They are required to simplify generated code, 46-- otherwise creation of intermediate object should be done in reflections 47-- module. Most probably this package can be removed for Ada2020. 48------------------------------------------------------------------------------ 49with AMF.OCL.Any_Types; 50with AMF.OCL.Association_Class_Call_Exps; 51with AMF.OCL.Bag_Types; 52with AMF.OCL.Boolean_Literal_Exps; 53with AMF.OCL.Collection_Items; 54with AMF.OCL.Collection_Literal_Exps; 55with AMF.OCL.Collection_Ranges; 56with AMF.OCL.Collection_Types; 57with AMF.OCL.Enum_Literal_Exps; 58with AMF.OCL.Expression_In_Ocls; 59with AMF.OCL.If_Exps; 60with AMF.OCL.Integer_Literal_Exps; 61with AMF.OCL.Invalid_Literal_Exps; 62with AMF.OCL.Invalid_Types; 63with AMF.OCL.Iterate_Exps; 64with AMF.OCL.Iterator_Exps; 65with AMF.OCL.Let_Exps; 66with AMF.OCL.Message_Exps; 67with AMF.OCL.Message_Types; 68with AMF.OCL.Null_Literal_Exps; 69with AMF.OCL.Ocl_Expressions; 70with AMF.OCL.Operation_Call_Exps; 71with AMF.OCL.Ordered_Set_Types; 72with AMF.OCL.Property_Call_Exps; 73with AMF.OCL.Real_Literal_Exps; 74with AMF.OCL.Sequence_Types; 75with AMF.OCL.Set_Types; 76with AMF.OCL.State_Exps; 77with AMF.OCL.String_Literal_Exps; 78with AMF.OCL.Template_Parameter_Types; 79with AMF.OCL.Tuple_Literal_Exps; 80with AMF.OCL.Tuple_Literal_Parts; 81with AMF.OCL.Tuple_Types; 82with AMF.OCL.Type_Exps; 83with AMF.OCL.Unlimited_Natural_Literal_Exps; 84with AMF.OCL.Unspecified_Value_Exps; 85with AMF.OCL.Variables; 86with AMF.OCL.Variable_Exps; 87with AMF.OCL.Void_Types; 88 89package AMF.Internals.Holders.OCL_Holders is 90 91 function To_Holder 92 (Item : AMF.OCL.Any_Types.OCL_Any_Type_Access) 93 return League.Holders.Holder; 94 95 function To_Holder 96 (Item : AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access) 97 return League.Holders.Holder; 98 99 function To_Holder 100 (Item : AMF.OCL.Bag_Types.OCL_Bag_Type_Access) 101 return League.Holders.Holder; 102 103 function To_Holder 104 (Item : AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access) 105 return League.Holders.Holder; 106 107 function To_Holder 108 (Item : AMF.OCL.Collection_Items.OCL_Collection_Item_Access) 109 return League.Holders.Holder; 110 111 function To_Holder 112 (Item : AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access) 113 return League.Holders.Holder; 114 115 function To_Holder 116 (Item : AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access) 117 return League.Holders.Holder; 118 119 function To_Holder 120 (Item : AMF.OCL.Collection_Types.OCL_Collection_Type_Access) 121 return League.Holders.Holder; 122 123 function To_Holder 124 (Item : AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access) 125 return League.Holders.Holder; 126 127 function To_Holder 128 (Item : AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access) 129 return League.Holders.Holder; 130 131 function To_Holder 132 (Item : AMF.OCL.If_Exps.OCL_If_Exp_Access) 133 return League.Holders.Holder; 134 135 function To_Holder 136 (Item : AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access) 137 return League.Holders.Holder; 138 139 function To_Holder 140 (Item : AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access) 141 return League.Holders.Holder; 142 143 function To_Holder 144 (Item : AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access) 145 return League.Holders.Holder; 146 147 function To_Holder 148 (Item : AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access) 149 return League.Holders.Holder; 150 151 function To_Holder 152 (Item : AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access) 153 return League.Holders.Holder; 154 155 function To_Holder 156 (Item : AMF.OCL.Let_Exps.OCL_Let_Exp_Access) 157 return League.Holders.Holder; 158 159 function To_Holder 160 (Item : AMF.OCL.Message_Exps.OCL_Message_Exp_Access) 161 return League.Holders.Holder; 162 163 function To_Holder 164 (Item : AMF.OCL.Message_Types.OCL_Message_Type_Access) 165 return League.Holders.Holder; 166 167 function To_Holder 168 (Item : AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access) 169 return League.Holders.Holder; 170 171 function To_Holder 172 (Item : AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access) 173 return League.Holders.Holder; 174 175 function To_Holder 176 (Item : AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access) 177 return League.Holders.Holder; 178 179 function To_Holder 180 (Item : AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access) 181 return League.Holders.Holder; 182 183 function To_Holder 184 (Item : AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access) 185 return League.Holders.Holder; 186 187 function To_Holder 188 (Item : AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access) 189 return League.Holders.Holder; 190 191 function To_Holder 192 (Item : AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access) 193 return League.Holders.Holder; 194 195 function To_Holder 196 (Item : AMF.OCL.Set_Types.OCL_Set_Type_Access) 197 return League.Holders.Holder; 198 199 function To_Holder 200 (Item : AMF.OCL.State_Exps.OCL_State_Exp_Access) 201 return League.Holders.Holder; 202 203 function To_Holder 204 (Item : AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access) 205 return League.Holders.Holder; 206 207 function To_Holder 208 (Item : AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access) 209 return League.Holders.Holder; 210 211 function To_Holder 212 (Item : AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access) 213 return League.Holders.Holder; 214 215 function To_Holder 216 (Item : AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access) 217 return League.Holders.Holder; 218 219 function To_Holder 220 (Item : AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access) 221 return League.Holders.Holder; 222 223 function To_Holder 224 (Item : AMF.OCL.Type_Exps.OCL_Type_Exp_Access) 225 return League.Holders.Holder; 226 227 function To_Holder 228 (Item : AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access) 229 return League.Holders.Holder; 230 231 function To_Holder 232 (Item : AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access) 233 return League.Holders.Holder; 234 235 function To_Holder 236 (Item : AMF.OCL.Variables.OCL_Variable_Access) 237 return League.Holders.Holder; 238 239 function To_Holder 240 (Item : AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access) 241 return League.Holders.Holder; 242 243 function To_Holder 244 (Item : AMF.OCL.Void_Types.OCL_Void_Type_Access) 245 return League.Holders.Holder; 246 247end AMF.Internals.Holders.OCL_Holders; 248