1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 2011-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: 3397 $ $Date: 2012-11-13 07:02:02 +0400 (Tue, 13 Nov 2012) $ 43------------------------------------------------------------------------------ 44-- This file is generated, don't edit it. 45------------------------------------------------------------------------------ 46with AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds; 47with AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds; 48with AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds; 49with AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds; 50with AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds; 51 52package body AMF.UMLDI.Holders is 53 54 ------------- 55 -- Element -- 56 ------------- 57 58 function Element 59 (Holder : League.Holders.Holder) 60 return AMF.UMLDI.Optional_UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind is 61 begin 62 if not League.Holders.Has_Tag 63 (Holder, AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Value_Tag) 64 then 65 raise Constraint_Error; 66 end if; 67 68 if League.Holders.Is_Empty (Holder) then 69 return (Is_Empty => True); 70 71 else 72 return (False, AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Element (Holder)); 73 end if; 74 end Element; 75 76 ------------- 77 -- Element -- 78 ------------- 79 80 function Element 81 (Holder : League.Holders.Holder) 82 return AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind is 83 begin 84 if not League.Holders.Has_Tag 85 (Holder, AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Value_Tag) 86 then 87 raise Constraint_Error; 88 end if; 89 90 if League.Holders.Is_Empty (Holder) then 91 return (Is_Empty => True); 92 93 else 94 return (False, AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Element (Holder)); 95 end if; 96 end Element; 97 98 ------------- 99 -- Element -- 100 ------------- 101 102 function Element 103 (Holder : League.Holders.Holder) 104 return AMF.UMLDI.Optional_UMLDI_UML_Interaction_Diagram_Kind is 105 begin 106 if not League.Holders.Has_Tag 107 (Holder, AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Value_Tag) 108 then 109 raise Constraint_Error; 110 end if; 111 112 if League.Holders.Is_Empty (Holder) then 113 return (Is_Empty => True); 114 115 else 116 return (False, AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Element (Holder)); 117 end if; 118 end Element; 119 120 ------------- 121 -- Element -- 122 ------------- 123 124 function Element 125 (Holder : League.Holders.Holder) 126 return AMF.UMLDI.Optional_UMLDI_UML_Interaction_Table_Label_Kind is 127 begin 128 if not League.Holders.Has_Tag 129 (Holder, AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Value_Tag) 130 then 131 raise Constraint_Error; 132 end if; 133 134 if League.Holders.Is_Empty (Holder) then 135 return (Is_Empty => True); 136 137 else 138 return (False, AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Element (Holder)); 139 end if; 140 end Element; 141 142 ------------- 143 -- Element -- 144 ------------- 145 146 function Element 147 (Holder : League.Holders.Holder) 148 return AMF.UMLDI.Optional_UMLDI_UML_Navigability_Notation_Kind is 149 begin 150 if not League.Holders.Has_Tag 151 (Holder, AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Value_Tag) 152 then 153 raise Constraint_Error; 154 end if; 155 156 if League.Holders.Is_Empty (Holder) then 157 return (Is_Empty => True); 158 159 else 160 return (False, AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Element (Holder)); 161 end if; 162 end Element; 163 164 --------------- 165 -- To_Holder -- 166 --------------- 167 168 function To_Holder 169 (Element : AMF.UMLDI.Optional_UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind) 170 return League.Holders.Holder is 171 begin 172 return Result : League.Holders.Holder do 173 League.Holders.Set_Tag 174 (Result, AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Value_Tag); 175 176 if not Element.Is_Empty then 177 AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.Replace_Element 178 (Result, Element.Value); 179 end if; 180 end return; 181 end To_Holder; 182 183 --------------- 184 -- To_Holder -- 185 --------------- 186 187 function To_Holder 188 (Element : AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind) 189 return League.Holders.Holder is 190 begin 191 return Result : League.Holders.Holder do 192 League.Holders.Set_Tag 193 (Result, AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Value_Tag); 194 195 if not Element.Is_Empty then 196 AMF.UMLDI.Holders.UML_Inherited_State_Border_Kinds.Replace_Element 197 (Result, Element.Value); 198 end if; 199 end return; 200 end To_Holder; 201 202 --------------- 203 -- To_Holder -- 204 --------------- 205 206 function To_Holder 207 (Element : AMF.UMLDI.Optional_UMLDI_UML_Interaction_Diagram_Kind) 208 return League.Holders.Holder is 209 begin 210 return Result : League.Holders.Holder do 211 League.Holders.Set_Tag 212 (Result, AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Value_Tag); 213 214 if not Element.Is_Empty then 215 AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.Replace_Element 216 (Result, Element.Value); 217 end if; 218 end return; 219 end To_Holder; 220 221 --------------- 222 -- To_Holder -- 223 --------------- 224 225 function To_Holder 226 (Element : AMF.UMLDI.Optional_UMLDI_UML_Interaction_Table_Label_Kind) 227 return League.Holders.Holder is 228 begin 229 return Result : League.Holders.Holder do 230 League.Holders.Set_Tag 231 (Result, AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Value_Tag); 232 233 if not Element.Is_Empty then 234 AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.Replace_Element 235 (Result, Element.Value); 236 end if; 237 end return; 238 end To_Holder; 239 240 --------------- 241 -- To_Holder -- 242 --------------- 243 244 function To_Holder 245 (Element : AMF.UMLDI.Optional_UMLDI_UML_Navigability_Notation_Kind) 246 return League.Holders.Holder is 247 begin 248 return Result : League.Holders.Holder do 249 League.Holders.Set_Tag 250 (Result, AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Value_Tag); 251 252 if not Element.Is_Empty then 253 AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.Replace_Element 254 (Result, Element.Value); 255 end if; 256 end return; 257 end To_Holder; 258 259end AMF.UMLDI.Holders; 260