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: 2855 $ $Date: 2012-04-12 23:52:00 +0400 (Thu, 12 Apr 2012) $ 43------------------------------------------------------------------------------ 44-- This file is generated, don't edit it. 45------------------------------------------------------------------------------ 46with AMF.Internals.Elements; 47with AMF.Internals.Extents; 48with AMF.Internals.Helpers; 49with AMF.Internals.Links; 50with AMF.Internals.Listener_Registry; 51with AMF.Internals.Tables.Standard_Profile_L3_Metamodel; 52with AMF.Internals.Tables.UML_Constructors; 53 54package body AMF.Internals.Factories.Standard_Profile_L3_Factories is 55 56 ----------------- 57 -- Constructor -- 58 ----------------- 59 60 function Constructor 61 (Extent : AMF.Internals.AMF_Extent) 62 return not null AMF.Factories.Factory_Access is 63 begin 64 return new Standard_Profile_L3_Factory'(Extent => Extent); 65 end Constructor; 66 67 ----------------------- 68 -- Convert_To_String -- 69 ----------------------- 70 71 overriding function Convert_To_String 72 (Self : not null access Standard_Profile_L3_Factory; 73 Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class; 74 Value : League.Holders.Holder) return League.Strings.Universal_String is 75 begin 76 raise Program_Error; 77 return League.Strings.Empty_Universal_String; 78 end Convert_To_String; 79 80 ------------ 81 -- Create -- 82 ------------ 83 84 overriding function Create 85 (Self : not null access Standard_Profile_L3_Factory; 86 Meta_Class : not null access AMF.CMOF.Classes.CMOF_Class'Class) 87 return not null AMF.Elements.Element_Access 88 is 89 MC : constant AMF.Internals.CMOF_Element 90 := AMF.Internals.Elements.Element_Base'Class (Meta_Class.all).Element; 91 Element : AMF.Internals.AMF_Element; 92 93 begin 94 if MC = AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MC_Standard_Profile_L3_Build_Component then 95 Element := AMF.Internals.Tables.UML_Constructors.Create_Standard_Profile_L3_Build_Component; 96 97 elsif MC = AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MC_Standard_Profile_L3_Metamodel then 98 Element := AMF.Internals.Tables.UML_Constructors.Create_Standard_Profile_L3_Metamodel; 99 100 elsif MC = AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MC_Standard_Profile_L3_System_Model then 101 Element := AMF.Internals.Tables.UML_Constructors.Create_Standard_Profile_L3_System_Model; 102 103 else 104 raise Program_Error; 105 end if; 106 107 AMF.Internals.Extents.Internal_Append (Self.Extent, Element); 108 AMF.Internals.Listener_Registry.Notify_Instance_Create 109 (AMF.Internals.Helpers.To_Element (Element)); 110 111 return AMF.Internals.Helpers.To_Element (Element); 112 end Create; 113 114 ------------------------ 115 -- Create_From_String -- 116 ------------------------ 117 118 overriding function Create_From_String 119 (Self : not null access Standard_Profile_L3_Factory; 120 Data_Type : not null access AMF.CMOF.Data_Types.CMOF_Data_Type'Class; 121 Image : League.Strings.Universal_String) return League.Holders.Holder is 122 begin 123 raise Program_Error; 124 return League.Holders.Empty_Holder; 125 end Create_From_String; 126 127 ----------------- 128 -- Create_Link -- 129 ----------------- 130 131 overriding function Create_Link 132 (Self : not null access Standard_Profile_L3_Factory; 133 Association : 134 not null access AMF.CMOF.Associations.CMOF_Association'Class; 135 First_Element : not null AMF.Elements.Element_Access; 136 Second_Element : not null AMF.Elements.Element_Access) 137 return not null AMF.Links.Link_Access 138 is 139 pragma Unreferenced (Self); 140 141 begin 142 return 143 AMF.Internals.Links.Proxy 144 (AMF.Internals.Links.Create_Link 145 (AMF.Internals.Elements.Element_Base'Class 146 (Association.all).Element, 147 AMF.Internals.Helpers.To_Element (First_Element), 148 AMF.Internals.Helpers.To_Element (Second_Element))); 149 end Create_Link; 150 151 ----------------- 152 -- Get_Package -- 153 ----------------- 154 155 overriding function Get_Package 156 (Self : not null access constant Standard_Profile_L3_Factory) 157 return AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package 158 is 159 pragma Unreferenced (Self); 160 161 begin 162 return Result : AMF.CMOF.Packages.Collections.Set_Of_CMOF_Package do 163 Result.Add (Get_Package); 164 end return; 165 end Get_Package; 166 167 ----------------- 168 -- Get_Package -- 169 ----------------- 170 171 function Get_Package return not null AMF.CMOF.Packages.CMOF_Package_Access is 172 begin 173 return 174 AMF.CMOF.Packages.CMOF_Package_Access 175 (AMF.Internals.Helpers.To_Element 176 (AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MM_Standard_Profile_L3_Standard_Profile_L3)); 177 end Get_Package; 178 179 ---------------------------- 180 -- Create_Build_Component -- 181 ---------------------------- 182 183 overriding function Create_Build_Component 184 (Self : not null access Standard_Profile_L3_Factory) 185 return AMF.Standard_Profile_L3.Build_Components.Standard_Profile_L3_Build_Component_Access is 186 begin 187 return 188 AMF.Standard_Profile_L3.Build_Components.Standard_Profile_L3_Build_Component_Access 189 (Self.Create 190 (AMF.CMOF.Classes.CMOF_Class_Access 191 (AMF.Internals.Helpers.To_Element 192 (AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MC_Standard_Profile_L3_Build_Component)))); 193 end Create_Build_Component; 194 195 ---------------------- 196 -- Create_Metamodel -- 197 ---------------------- 198 199 overriding function Create_Metamodel 200 (Self : not null access Standard_Profile_L3_Factory) 201 return AMF.Standard_Profile_L3.Metamodels.Standard_Profile_L3_Metamodel_Access is 202 begin 203 return 204 AMF.Standard_Profile_L3.Metamodels.Standard_Profile_L3_Metamodel_Access 205 (Self.Create 206 (AMF.CMOF.Classes.CMOF_Class_Access 207 (AMF.Internals.Helpers.To_Element 208 (AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MC_Standard_Profile_L3_Metamodel)))); 209 end Create_Metamodel; 210 211 ------------------------- 212 -- Create_System_Model -- 213 ------------------------- 214 215 overriding function Create_System_Model 216 (Self : not null access Standard_Profile_L3_Factory) 217 return AMF.Standard_Profile_L3.System_Models.Standard_Profile_L3_System_Model_Access is 218 begin 219 return 220 AMF.Standard_Profile_L3.System_Models.Standard_Profile_L3_System_Model_Access 221 (Self.Create 222 (AMF.CMOF.Classes.CMOF_Class_Access 223 (AMF.Internals.Helpers.To_Element 224 (AMF.Internals.Tables.Standard_Profile_L3_Metamodel.MC_Standard_Profile_L3_System_Model)))); 225 end Create_System_Model; 226 227end AMF.Internals.Factories.Standard_Profile_L3_Factories; 228