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