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: 3426 $ $Date: 2012-11-13 20:51:20 +0400 (Tue, 13 Nov 2012) $ 43------------------------------------------------------------------------------ 44with League.Holders; 45 46with AMF.CMOF.Classes; 47with AMF.CMOF.Properties; 48with AMF.Elements; 49with AMF.Extents; 50with AMF.Internals.Elements; 51with AMF.UML.Comments.Collections; 52with AMF.UML.Elements.Collections; 53 54package AMF.Internals.UML_Elements is 55 56 type UML_Element_Base is 57 abstract limited new AMF.Internals.Elements.Element_Base with null record; 58 59 overriding function Get 60 (Self : not null access constant UML_Element_Base; 61 Property : not null AMF.CMOF.Properties.CMOF_Property_Access) 62 return League.Holders.Holder; 63 64 overriding function Get_Meta_Class 65 (Self : not null access constant UML_Element_Base) 66 return AMF.CMOF.Classes.CMOF_Class_Access; 67 68 overriding procedure Set 69 (Self : not null access UML_Element_Base; 70 Property : not null AMF.CMOF.Properties.CMOF_Property_Access; 71 Value : League.Holders.Holder); 72 73 overriding function Extent 74 (Self : not null access constant UML_Element_Base) 75 return AMF.Extents.Extent_Access; 76 77 type UML_Element_Proxy is 78 abstract limited new UML_Element_Base 79 and AMF.UML.Elements.UML_Element with null record; 80 81 overriding function Container 82 (Self : not null access constant UML_Element_Proxy) 83 return AMF.Elements.Element_Access; 84 85 overriding function All_Owned_Elements 86 (Self : not null access constant UML_Element_Proxy) 87 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 88 -- Operation Element::allOwnedElements. 89 -- 90 -- The query allOwnedElements() gives all of the direct and indirect owned 91 -- elements of an element. 92 93 overriding function Get_Owned_Comment 94 (Self : not null access constant UML_Element_Proxy) 95 return AMF.UML.Comments.Collections.Set_Of_UML_Comment; 96 -- Getter of Element::ownedComment. 97 -- 98 -- The Comments owned by this element. 99 100 overriding function Get_Owned_Element 101 (Self : not null access constant UML_Element_Proxy) 102 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 103 -- Getter of Element::ownedElement. 104 -- 105 -- The Elements owned by this element. 106 107 overriding function Get_Owner 108 (Self : not null access constant UML_Element_Proxy) 109 return AMF.UML.Elements.UML_Element_Access; 110 -- Getter of Element::owner. 111 -- 112 -- The Element that owns this element. 113 114 overriding function Must_Be_Owned 115 (Self : not null access constant UML_Element_Proxy) return Boolean; 116 -- Operation Element::mustBeOwned. 117 -- 118 -- The query mustBeOwned() indicates whether elements of this type must 119 -- have an owner. Subclasses of Element that do not require an owner must 120 -- override this operation. 121 122end AMF.Internals.UML_Elements; 123