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: 3432 $ $Date: 2012-11-14 00:51:21 +0400 (Wed, 14 Nov 2012) $ 43------------------------------------------------------------------------------ 44with AMF.CMOF.Elements; 45with AMF.DC; 46with AMF.DI.Styles; 47with AMF.Internals.UML_Elements; 48with AMF.Internals.UMLDI_UML_Diagram_Elements; 49with AMF.UML.Elements.Collections; 50with AMF.UMLDI.UML_Shapes; 51with AMF.UMLDI.UML_Styles; 52with AMF.Visitors; 53 54package AMF.Internals.UMLDI_UML_Shapes is 55 56 package Diagram_Elements is 57 new AMF.Internals.UMLDI_UML_Diagram_Elements 58 (AMF.Internals.UML_Elements.UML_Element_Base); 59 60 type UMLDI_UML_Shape_Proxy is 61 limited new Diagram_Elements.UMLDI_UML_Diagram_Element_Proxy 62 and AMF.UMLDI.UML_Shapes.UMLDI_UML_Shape with null record; 63 64 overriding function Get_Is_Icon 65 (Self : not null access constant UMLDI_UML_Shape_Proxy) 66 return Boolean; 67 -- Getter of UMLDiagramElement::isIcon. 68 -- 69 -- For modelElements that have an option to be shown with shapes other 70 -- than rectangles, such as Actors, or with other identifying shapes 71 -- inside them, such as arrows distinguishing InputPins and OutputPins, or 72 -- edges that have an option to be shown with lines other than solid with 73 -- open arrow heads, such as Realization. A value of true for isIcon 74 -- indicates the alternative notation shall be shown. 75 76 overriding procedure Set_Is_Icon 77 (Self : not null access UMLDI_UML_Shape_Proxy; 78 To : Boolean); 79 -- Setter of UMLDiagramElement::isIcon. 80 -- 81 -- For modelElements that have an option to be shown with shapes other 82 -- than rectangles, such as Actors, or with other identifying shapes 83 -- inside them, such as arrows distinguishing InputPins and OutputPins, or 84 -- edges that have an option to be shown with lines other than solid with 85 -- open arrow heads, such as Realization. A value of true for isIcon 86 -- indicates the alternative notation shall be shown. 87 88 overriding function Get_Local_Style 89 (Self : not null access constant UMLDI_UML_Shape_Proxy) 90 return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access; 91 -- Getter of UMLDiagramElement::localStyle. 92 -- 93 -- Restricts owned styles to UMLStyles. 94 95 overriding procedure Set_Local_Style 96 (Self : not null access UMLDI_UML_Shape_Proxy; 97 To : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access); 98 -- Setter of UMLDiagramElement::localStyle. 99 -- 100 -- Restricts owned styles to UMLStyles. 101 102 overriding function Get_Model_Element 103 (Self : not null access constant UMLDI_UML_Shape_Proxy) 104 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 105 -- Getter of UMLDiagramElement::modelElement. 106 -- 107 -- Restricts UMLDiagramElements to show UML Elements, rather than other 108 -- language elements. 109 110 overriding function Get_Model_Element 111 (Self : not null access constant UMLDI_UML_Shape_Proxy) 112 return AMF.CMOF.Elements.CMOF_Element_Access; 113 -- Getter of DiagramElement::modelElement. 114 -- 115 -- a reference to a depicted model element, which can be any MOF-based 116 -- element 117 118 overriding function Get_Local_Style 119 (Self : not null access constant UMLDI_UML_Shape_Proxy) 120 return AMF.DI.Styles.DI_Style_Access; 121 -- Getter of DiagramElement::localStyle. 122 -- 123 -- a reference to an optional locally-owned style for this diagram element. 124 125 overriding procedure Set_Local_Style 126 (Self : not null access UMLDI_UML_Shape_Proxy; 127 To : AMF.DI.Styles.DI_Style_Access); 128 -- Setter of DiagramElement::localStyle. 129 -- 130 -- a reference to an optional locally-owned style for this diagram element. 131 132 overriding function Get_Bounds 133 (Self : not null access constant UMLDI_UML_Shape_Proxy) 134 return AMF.DC.Optional_DC_Bounds; 135 -- Getter of Shape::bounds. 136 -- 137 -- the optional bounds of the shape relative to the origin of its nesting 138 -- plane. 139 140 overriding procedure Set_Bounds 141 (Self : not null access UMLDI_UML_Shape_Proxy; 142 To : AMF.DC.Optional_DC_Bounds); 143 -- Setter of Shape::bounds. 144 -- 145 -- the optional bounds of the shape relative to the origin of its nesting 146 -- plane. 147 148 overriding procedure Enter_Element 149 (Self : not null access constant UMLDI_UML_Shape_Proxy; 150 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 151 Control : in out AMF.Visitors.Traverse_Control); 152 153 overriding procedure Leave_Element 154 (Self : not null access constant UMLDI_UML_Shape_Proxy; 155 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 156 Control : in out AMF.Visitors.Traverse_Control); 157 158 overriding procedure Visit_Element 159 (Self : not null access constant UMLDI_UML_Shape_Proxy; 160 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 161 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 162 Control : in out AMF.Visitors.Traverse_Control); 163 164end AMF.Internals.UMLDI_UML_Shapes; 165