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.DI.Diagram_Elements;
48with AMF.Internals.UML_Elements;
49with AMF.Internals.UMLDI_UML_Diagram_Elements;
50with AMF.UML.Elements.Collections;
51with AMF.UMLDI.UML_Diagram_Elements;
52with AMF.UMLDI.UML_Edges;
53with AMF.UMLDI.UML_Styles;
54with AMF.Visitors;
55
56package AMF.Internals.UMLDI_UML_Edges is
57
58   package Diagram_Elements is
59     new AMF.Internals.UMLDI_UML_Diagram_Elements
60          (AMF.Internals.UML_Elements.UML_Element_Base);
61
62   type UMLDI_UML_Edge_Proxy is
63     limited new Diagram_Elements.UMLDI_UML_Diagram_Element_Proxy
64       and AMF.UMLDI.UML_Edges.UMLDI_UML_Edge with null record;
65
66   overriding function Get_Source
67    (Self : not null access constant UMLDI_UML_Edge_Proxy)
68       return AMF.UMLDI.UML_Diagram_Elements.UMLDI_UML_Diagram_Element_Access;
69   --  Getter of UMLEdge::source.
70   --
71   --  Restricts the sources of UMLEdges to UMLDiagramElements.
72
73   overriding procedure Set_Source
74    (Self : not null access UMLDI_UML_Edge_Proxy;
75     To   : AMF.UMLDI.UML_Diagram_Elements.UMLDI_UML_Diagram_Element_Access);
76   --  Setter of UMLEdge::source.
77   --
78   --  Restricts the sources of UMLEdges to UMLDiagramElements.
79
80   overriding function Get_Target
81    (Self : not null access constant UMLDI_UML_Edge_Proxy)
82       return AMF.UMLDI.UML_Diagram_Elements.UMLDI_UML_Diagram_Element_Access;
83   --  Getter of UMLEdge::target.
84   --
85   --  Restricts the targets of UMLEdges to UMLDiagramElements.
86
87   overriding procedure Set_Target
88    (Self : not null access UMLDI_UML_Edge_Proxy;
89     To   : AMF.UMLDI.UML_Diagram_Elements.UMLDI_UML_Diagram_Element_Access);
90   --  Setter of UMLEdge::target.
91   --
92   --  Restricts the targets of UMLEdges to UMLDiagramElements.
93
94   overriding function Get_Is_Icon
95    (Self : not null access constant UMLDI_UML_Edge_Proxy)
96       return Boolean;
97   --  Getter of UMLDiagramElement::isIcon.
98   --
99   --  For modelElements that have an option to be shown with shapes other
100   --  than rectangles, such as Actors, or with other identifying shapes
101   --  inside them, such as arrows distinguishing InputPins and OutputPins, or
102   --  edges that have an option to be shown with lines other than solid with
103   --  open arrow heads, such as Realization.  A value of true for isIcon
104   --  indicates the alternative notation shall be shown.
105
106   overriding procedure Set_Is_Icon
107    (Self : not null access UMLDI_UML_Edge_Proxy;
108     To   : Boolean);
109   --  Setter of UMLDiagramElement::isIcon.
110   --
111   --  For modelElements that have an option to be shown with shapes other
112   --  than rectangles, such as Actors, or with other identifying shapes
113   --  inside them, such as arrows distinguishing InputPins and OutputPins, or
114   --  edges that have an option to be shown with lines other than solid with
115   --  open arrow heads, such as Realization.  A value of true for isIcon
116   --  indicates the alternative notation shall be shown.
117
118   overriding function Get_Local_Style
119    (Self : not null access constant UMLDI_UML_Edge_Proxy)
120       return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access;
121   --  Getter of UMLDiagramElement::localStyle.
122   --
123   --  Restricts owned styles to UMLStyles.
124
125   overriding procedure Set_Local_Style
126    (Self : not null access UMLDI_UML_Edge_Proxy;
127     To   : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access);
128   --  Setter of UMLDiagramElement::localStyle.
129   --
130   --  Restricts owned styles to UMLStyles.
131
132   overriding function Get_Model_Element
133    (Self : not null access constant UMLDI_UML_Edge_Proxy)
134       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
135   --  Getter of UMLDiagramElement::modelElement.
136   --
137   --  Restricts UMLDiagramElements to show UML Elements, rather than other
138   --  language elements.
139
140   overriding function Get_Model_Element
141    (Self : not null access constant UMLDI_UML_Edge_Proxy)
142       return AMF.CMOF.Elements.CMOF_Element_Access;
143   --  Getter of DiagramElement::modelElement.
144   --
145   --  a reference to a depicted model element, which can be any MOF-based
146   --  element
147
148   overriding function Get_Local_Style
149    (Self : not null access constant UMLDI_UML_Edge_Proxy)
150       return AMF.DI.Styles.DI_Style_Access;
151   --  Getter of DiagramElement::localStyle.
152   --
153   --  a reference to an optional locally-owned style for this diagram element.
154
155   overriding procedure Set_Local_Style
156    (Self : not null access UMLDI_UML_Edge_Proxy;
157     To   : AMF.DI.Styles.DI_Style_Access);
158   --  Setter of DiagramElement::localStyle.
159   --
160   --  a reference to an optional locally-owned style for this diagram element.
161
162   overriding function Get_Source
163    (Self : not null access constant UMLDI_UML_Edge_Proxy)
164       return AMF.DI.Diagram_Elements.DI_Diagram_Element_Access;
165   --  Getter of Edge::source.
166   --
167   --  the edge's source diagram element, i.e. where the edge starts from.
168
169   overriding function Get_Target
170    (Self : not null access constant UMLDI_UML_Edge_Proxy)
171       return AMF.DI.Diagram_Elements.DI_Diagram_Element_Access;
172   --  Getter of Edge::target.
173   --
174   --  the edge's target diagram element, i.e. where the edge ends at.
175
176   overriding function Get_Waypoint
177    (Self : not null access constant UMLDI_UML_Edge_Proxy)
178       return AMF.DC.Sequence_Of_DC_Point;
179   --  Getter of Edge::waypoint.
180   --
181   --  an optional list of points relative to the origin of the nesting
182   --  diagram that specifies the connected line segments of the edge
183
184   overriding procedure Enter_Element
185    (Self    : not null access constant UMLDI_UML_Edge_Proxy;
186     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
187     Control : in out AMF.Visitors.Traverse_Control);
188
189   overriding procedure Leave_Element
190    (Self    : not null access constant UMLDI_UML_Edge_Proxy;
191     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
192     Control : in out AMF.Visitors.Traverse_Control);
193
194   overriding procedure Visit_Element
195    (Self     : not null access constant UMLDI_UML_Edge_Proxy;
196     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
197     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
198     Control  : in out AMF.Visitors.Traverse_Control);
199
200end AMF.Internals.UMLDI_UML_Edges;
201