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: 3436 $ $Date: 2012-11-14 10:14:34 +0400 (Wed, 14 Nov 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Elements; 45with AMF.Internals.Helpers; 46with AMF.Internals.Tables.UML_Attributes; 47with AMF.Visitors.UMLDI_Iterators; 48with AMF.Visitors.UMLDI_Visitors; 49with League.Strings.Internals; 50 51package body AMF.Internals.UMLDI_UML_Stereotype_Property_Value_Labels is 52 53 ----------------------- 54 -- Get_Model_Element -- 55 ----------------------- 56 57 overriding function Get_Model_Element 58 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 59 return AMF.UML.Properties.UML_Property_Access is 60 begin 61 return 62 AMF.UML.Properties.UML_Property_Access 63 (AMF.Internals.Helpers.To_Element 64 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element 65 (Self.Element))); 66 end Get_Model_Element; 67 68 ----------------------- 69 -- Set_Model_Element -- 70 ----------------------- 71 72 overriding procedure Set_Model_Element 73 (Self : not null access UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 74 To : AMF.UML.Properties.UML_Property_Access) is 75 begin 76 raise Program_Error; 77-- AMF.Internals.Tables.UML_Attributes.Internal_Set_Model_Element 78-- (Self.Element, 79-- AMF.Internals.Helpers.To_Element 80-- (AMF.Elements.Element_Access (To))); 81 end Set_Model_Element; 82 83 ----------------------------- 84 -- Get_Stereotyped_Element -- 85 ----------------------------- 86 87 overriding function Get_Stereotyped_Element 88 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 89 return AMF.UML.Elements.UML_Element_Access is 90 begin 91 return 92 AMF.UML.Elements.UML_Element_Access 93 (AMF.Internals.Helpers.To_Element 94 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Stereotyped_Element 95 (Self.Element))); 96 end Get_Stereotyped_Element; 97 98 ----------------------------- 99 -- Set_Stereotyped_Element -- 100 ----------------------------- 101 102 overriding procedure Set_Stereotyped_Element 103 (Self : not null access UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 104 To : AMF.UML.Elements.UML_Element_Access) is 105 begin 106 AMF.Internals.Tables.UML_Attributes.Internal_Set_Stereotyped_Element 107 (Self.Element, 108 AMF.Internals.Helpers.To_Element 109 (AMF.Elements.Element_Access (To))); 110 end Set_Stereotyped_Element; 111 112 -------------- 113 -- Get_Text -- 114 -------------- 115 116 overriding function Get_Text 117 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 118 return League.Strings.Universal_String is 119 begin 120 null; 121 return 122 League.Strings.Internals.Create 123 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Text (Self.Element)); 124 end Get_Text; 125 126 -------------- 127 -- Set_Text -- 128 -------------- 129 130 overriding procedure Set_Text 131 (Self : not null access UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 132 To : League.Strings.Universal_String) is 133 begin 134 AMF.Internals.Tables.UML_Attributes.Internal_Set_Text 135 (Self.Element, 136 League.Strings.Internals.Internal (To)); 137 end Set_Text; 138 139 ----------------- 140 -- Get_Is_Icon -- 141 ----------------- 142 143 overriding function Get_Is_Icon 144 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 145 return Boolean is 146 begin 147 return 148 AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Icon 149 (Self.Element); 150 end Get_Is_Icon; 151 152 ----------------- 153 -- Set_Is_Icon -- 154 ----------------- 155 156 overriding procedure Set_Is_Icon 157 (Self : not null access UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 158 To : Boolean) is 159 begin 160 AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Icon 161 (Self.Element, To); 162 end Set_Is_Icon; 163 164 --------------------- 165 -- Get_Local_Style -- 166 --------------------- 167 168 overriding function Get_Local_Style 169 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 170 return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access is 171 begin 172 return 173 AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access 174 (AMF.Internals.Helpers.To_Element 175 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style 176 (Self.Element))); 177 end Get_Local_Style; 178 179 --------------------- 180 -- Set_Local_Style -- 181 --------------------- 182 183 overriding procedure Set_Local_Style 184 (Self : not null access UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 185 To : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access) is 186 begin 187 AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style 188 (Self.Element, 189 AMF.Internals.Helpers.To_Element 190 (AMF.Elements.Element_Access (To))); 191 end Set_Local_Style; 192 193 ----------------------- 194 -- Get_Model_Element -- 195 ----------------------- 196 197 overriding function Get_Model_Element 198 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 199 return AMF.UML.Elements.Collections.Set_Of_UML_Element is 200 begin 201 raise Program_Error; 202 return X : AMF.UML.Elements.Collections.Set_Of_UML_Element; 203-- return 204-- AMF.UML.Elements.Collections.Wrap 205-- (AMF.Internals.Element_Collections.Wrap 206-- (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element 207-- (Self.Element))); 208 end Get_Model_Element; 209 210 ----------------------- 211 -- Get_Model_Element -- 212 ----------------------- 213 214 overriding function Get_Model_Element 215 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 216 return AMF.CMOF.Elements.CMOF_Element_Access is 217 begin 218 return 219 AMF.CMOF.Elements.CMOF_Element_Access 220 (AMF.Internals.Helpers.To_Element 221 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element 222 (Self.Element))); 223 end Get_Model_Element; 224 225 --------------------- 226 -- Get_Local_Style -- 227 --------------------- 228 229 overriding function Get_Local_Style 230 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy) 231 return AMF.DI.Styles.DI_Style_Access is 232 begin 233 return 234 AMF.DI.Styles.DI_Style_Access 235 (AMF.Internals.Helpers.To_Element 236 (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style 237 (Self.Element))); 238 end Get_Local_Style; 239 240 --------------------- 241 -- Set_Local_Style -- 242 --------------------- 243 244 overriding procedure Set_Local_Style 245 (Self : not null access UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 246 To : AMF.DI.Styles.DI_Style_Access) is 247 begin 248 AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style 249 (Self.Element, 250 AMF.Internals.Helpers.To_Element 251 (AMF.Elements.Element_Access (To))); 252 end Set_Local_Style; 253 254 ------------------- 255 -- Enter_Element -- 256 ------------------- 257 258 overriding procedure Enter_Element 259 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 260 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 261 Control : in out AMF.Visitors.Traverse_Control) is 262 begin 263 if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then 264 AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class 265 (Visitor).Enter_UML_Stereotype_Property_Value_Label 266 (AMF.UMLDI.UML_Stereotype_Property_Value_Labels.UMLDI_UML_Stereotype_Property_Value_Label_Access (Self), 267 Control); 268 end if; 269 end Enter_Element; 270 271 ------------------- 272 -- Leave_Element -- 273 ------------------- 274 275 overriding procedure Leave_Element 276 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 277 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 278 Control : in out AMF.Visitors.Traverse_Control) is 279 begin 280 if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then 281 AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class 282 (Visitor).Leave_UML_Stereotype_Property_Value_Label 283 (AMF.UMLDI.UML_Stereotype_Property_Value_Labels.UMLDI_UML_Stereotype_Property_Value_Label_Access (Self), 284 Control); 285 end if; 286 end Leave_Element; 287 288 ------------------- 289 -- Visit_Element -- 290 ------------------- 291 292 overriding procedure Visit_Element 293 (Self : not null access constant UMLDI_UML_Stereotype_Property_Value_Label_Proxy; 294 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 295 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 296 Control : in out AMF.Visitors.Traverse_Control) is 297 begin 298 if Iterator in AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class then 299 AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class 300 (Iterator).Visit_UML_Stereotype_Property_Value_Label 301 (Visitor, 302 AMF.UMLDI.UML_Stereotype_Property_Value_Labels.UMLDI_UML_Stereotype_Property_Value_Label_Access (Self), 303 Control); 304 end if; 305 end Visit_Element; 306 307end AMF.Internals.UMLDI_UML_Stereotype_Property_Value_Labels; 308