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_Compartmentable_Shapes;
47with AMF.UML.Classifiers;
48with AMF.UML.Elements.Collections;
49with AMF.UMLDI.UML_Classifier_Shapes;
50with AMF.UMLDI.UML_Compartments.Collections;
51with AMF.UMLDI.UML_Styles;
52with AMF.Visitors;
53
54package AMF.Internals.UMLDI_UML_Classifier_Shapes is
55
56   type UMLDI_UML_Classifier_Shape_Proxy is
57     limited new AMF.Internals.UMLDI_UML_Compartmentable_Shapes.UMLDI_UML_Compartmentable_Shape_Proxy
58       and AMF.UMLDI.UML_Classifier_Shapes.UMLDI_UML_Classifier_Shape with null record;
59
60   overriding function Get_Is_Double_Sided
61    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
62       return Boolean;
63   --  Getter of UMLClassifierShape::isDoubleSided.
64   --
65   --  For modelElements that are Classes with true as a value for isActive
66   --  that are shown as rectangles, indicates whether the vertical sides
67   --  shall be rendered as double lines.
68
69   overriding procedure Set_Is_Double_Sided
70    (Self : not null access UMLDI_UML_Classifier_Shape_Proxy;
71     To   : Boolean);
72   --  Setter of UMLClassifierShape::isDoubleSided.
73   --
74   --  For modelElements that are Classes with true as a value for isActive
75   --  that are shown as rectangles, indicates whether the vertical sides
76   --  shall be rendered as double lines.
77
78   overriding function Get_Is_Indent_For_Visibility
79    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
80       return Boolean;
81   --  Getter of UMLClassifierShape::isIndentForVisibility.
82   --
83   --  For modelElements that are shown with feature compartments, indicates
84   --  whether features are shown indented under visibility headings.
85
86   overriding procedure Set_Is_Indent_For_Visibility
87    (Self : not null access UMLDI_UML_Classifier_Shape_Proxy;
88     To   : Boolean);
89   --  Setter of UMLClassifierShape::isIndentForVisibility.
90   --
91   --  For modelElements that are shown with feature compartments, indicates
92   --  whether features are shown indented under visibility headings.
93
94   overriding function Get_Model_Element
95    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
96       return AMF.UML.Classifiers.UML_Classifier_Access;
97   --  Getter of UMLClassifierShape::modelElement.
98   --
99   --  Restricts UMLClassifierShapes to showing exactly one Classifier.
100
101   overriding procedure Set_Model_Element
102    (Self : not null access UMLDI_UML_Classifier_Shape_Proxy;
103     To   : AMF.UML.Classifiers.UML_Classifier_Access);
104   --  Setter of UMLClassifierShape::modelElement.
105   --
106   --  Restricts UMLClassifierShapes to showing exactly one Classifier.
107
108   overriding function Get_Compartment
109    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
110       return AMF.UMLDI.UML_Compartments.Collections.Ordered_Set_Of_UMLDI_UML_Compartment;
111   --  Getter of UMLCompartmentableShape::compartment.
112   --
113   --  Separated portions of the shape.
114
115   overriding function Get_Is_Icon
116    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
117       return Boolean;
118   --  Getter of UMLDiagramElement::isIcon.
119   --
120   --  For modelElements that have an option to be shown with shapes other
121   --  than rectangles, such as Actors, or with other identifying shapes
122   --  inside them, such as arrows distinguishing InputPins and OutputPins, or
123   --  edges that have an option to be shown with lines other than solid with
124   --  open arrow heads, such as Realization.  A value of true for isIcon
125   --  indicates the alternative notation shall be shown.
126
127   overriding procedure Set_Is_Icon
128    (Self : not null access UMLDI_UML_Classifier_Shape_Proxy;
129     To   : Boolean);
130   --  Setter of UMLDiagramElement::isIcon.
131   --
132   --  For modelElements that have an option to be shown with shapes other
133   --  than rectangles, such as Actors, or with other identifying shapes
134   --  inside them, such as arrows distinguishing InputPins and OutputPins, or
135   --  edges that have an option to be shown with lines other than solid with
136   --  open arrow heads, such as Realization.  A value of true for isIcon
137   --  indicates the alternative notation shall be shown.
138
139   overriding function Get_Local_Style
140    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
141       return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access;
142   --  Getter of UMLDiagramElement::localStyle.
143   --
144   --  Restricts owned styles to UMLStyles.
145
146   overriding procedure Set_Local_Style
147    (Self : not null access UMLDI_UML_Classifier_Shape_Proxy;
148     To   : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access);
149   --  Setter of UMLDiagramElement::localStyle.
150   --
151   --  Restricts owned styles to UMLStyles.
152
153   overriding function Get_Model_Element
154    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
155       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
156   --  Getter of UMLDiagramElement::modelElement.
157   --
158   --  Restricts UMLDiagramElements to show UML Elements, rather than other
159   --  language elements.
160
161   overriding function Get_Model_Element
162    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
163       return AMF.CMOF.Elements.CMOF_Element_Access;
164   --  Getter of DiagramElement::modelElement.
165   --
166   --  a reference to a depicted model element, which can be any MOF-based
167   --  element
168
169   overriding function Get_Local_Style
170    (Self : not null access constant UMLDI_UML_Classifier_Shape_Proxy)
171       return AMF.DI.Styles.DI_Style_Access;
172   --  Getter of DiagramElement::localStyle.
173   --
174   --  a reference to an optional locally-owned style for this diagram element.
175
176   overriding procedure Set_Local_Style
177    (Self : not null access UMLDI_UML_Classifier_Shape_Proxy;
178     To   : AMF.DI.Styles.DI_Style_Access);
179   --  Setter of DiagramElement::localStyle.
180   --
181   --  a reference to an optional locally-owned style for this diagram element.
182
183   overriding procedure Enter_Element
184    (Self    : not null access constant UMLDI_UML_Classifier_Shape_Proxy;
185     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
186     Control : in out AMF.Visitors.Traverse_Control);
187
188   overriding procedure Leave_Element
189    (Self    : not null access constant UMLDI_UML_Classifier_Shape_Proxy;
190     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
191     Control : in out AMF.Visitors.Traverse_Control);
192
193   overriding procedure Visit_Element
194    (Self     : not null access constant UMLDI_UML_Classifier_Shape_Proxy;
195     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
196     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
197     Control  : in out AMF.Visitors.Traverse_Control);
198
199end AMF.Internals.UMLDI_UML_Classifier_Shapes;
200