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