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_Diagrams;
47with AMF.UML.Comments.Collections;
48with AMF.UML.Dependencies.Collections;
49with AMF.UML.Elements.Collections;
50with AMF.UML.Named_Elements;
51with AMF.UML.Namespaces.Collections;
52with AMF.UML.Packages.Collections;
53with AMF.UML.Parameterable_Elements;
54with AMF.UML.String_Expressions;
55with AMF.UML.Template_Parameters;
56with AMF.UMLDI.UML_Labels;
57with AMF.UMLDI.UML_Profile_Diagrams;
58with AMF.UMLDI.UML_Styles;
59with AMF.Visitors;
60with League.Strings;
61
62package AMF.Internals.UMLDI_UML_Profile_Diagrams is
63
64   type UMLDI_UML_Profile_Diagram_Proxy is
65     limited new AMF.Internals.UMLDI_UML_Diagrams.UMLDI_UML_Diagram_Proxy
66       and AMF.UMLDI.UML_Profile_Diagrams.UMLDI_UML_Profile_Diagram with null record;
67
68   overriding function Get_Heading
69    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
70       return AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access;
71   --  Getter of UMLDiagram::heading.
72   --
73
74   overriding procedure Set_Heading
75    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
76     To   : AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access);
77   --  Setter of UMLDiagram::heading.
78   --
79
80   overriding function Get_Is_Frame
81    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
82       return Boolean;
83   --  Getter of UMLDiagram::isFrame.
84   --
85   --  Indicates when diagram frames shall be shown.
86
87   overriding procedure Set_Is_Frame
88    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
89     To   : Boolean);
90   --  Setter of UMLDiagram::isFrame.
91   --
92   --  Indicates when diagram frames shall be shown.
93
94   overriding function Get_Is_Iso
95    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
96       return Boolean;
97   --  Getter of UMLDiagram::isIso.
98   --
99   --  Indicate when ISO notation rules shall be followed.
100
101   overriding procedure Set_Is_Iso
102    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
103     To   : Boolean);
104   --  Setter of UMLDiagram::isIso.
105   --
106   --  Indicate when ISO notation rules shall be followed.
107
108   overriding function Get_Is_Icon
109    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
110       return Boolean;
111   --  Getter of UMLDiagramElement::isIcon.
112   --
113   --  For modelElements that have an option to be shown with shapes other
114   --  than rectangles, such as Actors, or with other identifying shapes
115   --  inside them, such as arrows distinguishing InputPins and OutputPins, or
116   --  edges that have an option to be shown with lines other than solid with
117   --  open arrow heads, such as Realization.  A value of true for isIcon
118   --  indicates the alternative notation shall be shown.
119
120   overriding procedure Set_Is_Icon
121    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
122     To   : Boolean);
123   --  Setter of UMLDiagramElement::isIcon.
124   --
125   --  For modelElements that have an option to be shown with shapes other
126   --  than rectangles, such as Actors, or with other identifying shapes
127   --  inside them, such as arrows distinguishing InputPins and OutputPins, or
128   --  edges that have an option to be shown with lines other than solid with
129   --  open arrow heads, such as Realization.  A value of true for isIcon
130   --  indicates the alternative notation shall be shown.
131
132   overriding function Get_Local_Style
133    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
134       return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access;
135   --  Getter of UMLDiagramElement::localStyle.
136   --
137   --  Restricts owned styles to UMLStyles.
138
139   overriding procedure Set_Local_Style
140    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
141     To   : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access);
142   --  Setter of UMLDiagramElement::localStyle.
143   --
144   --  Restricts owned styles to UMLStyles.
145
146   overriding function Get_Model_Element
147    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
148       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
149   --  Getter of UMLDiagramElement::modelElement.
150   --
151   --  Restricts UMLDiagramElements to show UML Elements, rather than other
152   --  language elements.
153
154   overriding function Get_Model_Element
155    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
156       return AMF.CMOF.Elements.CMOF_Element_Access;
157   --  Getter of DiagramElement::modelElement.
158   --
159   --  a reference to a depicted model element, which can be any MOF-based
160   --  element
161
162      overriding function Get_Local_Style
163       (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
164          return AMF.DI.Styles.DI_Style_Access;
165      --  Getter of DiagramElement::localStyle.
166      --
167      --  a reference to an optional locally-owned style for this diagram element.
168
169      overriding procedure Set_Local_Style
170       (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
171        To   : AMF.DI.Styles.DI_Style_Access);
172      --  Setter of DiagramElement::localStyle.
173      --
174      --  a reference to an optional locally-owned style for this diagram element.
175
176      overriding function Get_Name
177       (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
178          return League.Strings.Universal_String;
179      --  Getter of Diagram::name.
180      --
181      --  the name of the diagram.
182
183      overriding procedure Set_Name
184       (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
185        To   : League.Strings.Universal_String);
186      --  Setter of Diagram::name.
187      --
188      --  the name of the diagram.
189
190      overriding function Get_Documentation
191       (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
192          return League.Strings.Universal_String;
193      --  Getter of Diagram::documentation.
194      --
195      --  the documentation of the diagram.
196
197      overriding procedure Set_Documentation
198       (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
199        To   : League.Strings.Universal_String);
200      --  Setter of Diagram::documentation.
201      --
202      --  the documentation of the diagram.
203
204   overriding function Get_Resolution
205    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
206       return AMF.Real;
207   --  Getter of Diagram::resolution.
208   --
209   --  the resolution of the diagram expressed in user units per inch.
210
211   overriding procedure Set_Resolution
212    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
213     To   : AMF.Real);
214   --  Setter of Diagram::resolution.
215   --
216   --  the resolution of the diagram expressed in user units per inch.
217
218   overriding function Get_Client_Dependency
219    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
220       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
221   --  Getter of NamedElement::clientDependency.
222   --
223   --  Indicates the dependencies that reference the client.
224
225   overriding function Get_Name
226    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
227       return AMF.Optional_String;
228   --  Getter of NamedElement::name.
229   --
230   --  The name of the NamedElement.
231
232   overriding procedure Set_Name
233    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
234     To   : AMF.Optional_String);
235   --  Setter of NamedElement::name.
236   --
237   --  The name of the NamedElement.
238
239   overriding function Get_Name_Expression
240    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
241       return AMF.UML.String_Expressions.UML_String_Expression_Access;
242   --  Getter of NamedElement::nameExpression.
243   --
244   --  The string expression used to define the name of this named element.
245
246   overriding procedure Set_Name_Expression
247    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
248     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
249   --  Setter of NamedElement::nameExpression.
250   --
251   --  The string expression used to define the name of this named element.
252
253   overriding function Get_Namespace
254    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
255       return AMF.UML.Namespaces.UML_Namespace_Access;
256   --  Getter of NamedElement::namespace.
257   --
258   --  Specifies the namespace that owns the NamedElement.
259
260   overriding function Get_Qualified_Name
261    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
262       return AMF.Optional_String;
263   --  Getter of NamedElement::qualifiedName.
264   --
265   --  A name which allows the NamedElement to be identified within a
266   --  hierarchy of nested Namespaces. It is constructed from the names of the
267   --  containing namespaces starting at the root of the hierarchy and ending
268   --  with the name of the NamedElement itself.
269
270   overriding function Get_Owned_Comment
271    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
272       return AMF.UML.Comments.Collections.Set_Of_UML_Comment;
273   --  Getter of Element::ownedComment.
274   --
275   --  The Comments owned by this element.
276
277   overriding function Get_Owned_Element
278    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
279       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
280   --  Getter of Element::ownedElement.
281   --
282   --  The Elements owned by this element.
283
284   overriding function Get_Owner
285    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
286       return AMF.UML.Elements.UML_Element_Access;
287   --  Getter of Element::owner.
288   --
289   --  The Element that owns this element.
290
291   overriding function Get_Owning_Template_Parameter
292    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
293       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
294   --  Getter of ParameterableElement::owningTemplateParameter.
295   --
296   --  The formal template parameter that owns this element.
297
298   overriding procedure Set_Owning_Template_Parameter
299    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
300     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
301   --  Setter of ParameterableElement::owningTemplateParameter.
302   --
303   --  The formal template parameter that owns this element.
304
305   overriding function Get_Template_Parameter
306    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
307       return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
308   --  Getter of ParameterableElement::templateParameter.
309   --
310   --  The template parameter that exposes this element as a formal parameter.
311
312   overriding procedure Set_Template_Parameter
313    (Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
314     To   : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
315   --  Setter of ParameterableElement::templateParameter.
316   --
317   --  The template parameter that exposes this element as a formal parameter.
318
319   overriding function All_Namespaces
320    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
321       return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace;
322   --  Operation NamedElement::allNamespaces.
323   --
324   --  The query allNamespaces() gives the sequence of namespaces in which the
325   --  NamedElement is nested, working outwards.
326
327   overriding function All_Owning_Packages
328    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
329       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
330   --  Operation NamedElement::allOwningPackages.
331   --
332   --  The query allOwningPackages() returns all the directly or indirectly
333   --  owning packages.
334
335   overriding function Is_Distinguishable_From
336    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
337     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
338     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
339       return Boolean;
340   --  Operation NamedElement::isDistinguishableFrom.
341   --
342   --  The query isDistinguishableFrom() determines whether two NamedElements
343   --  may logically co-exist within a Namespace. By default, two named
344   --  elements are distinguishable if (a) they have unrelated types or (b)
345   --  they have related types but different names.
346
347   overriding function Namespace
348    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
349       return AMF.UML.Namespaces.UML_Namespace_Access;
350   --  Operation NamedElement::namespace.
351   --
352   --  Missing derivation for NamedElement::/namespace : Namespace
353
354   overriding function Qualified_Name
355    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
356       return League.Strings.Universal_String;
357   --  Operation NamedElement::qualifiedName.
358   --
359   --  When there is a name, and all of the containing namespaces have a name,
360   --  the qualified name is constructed from the names of the containing
361   --  namespaces.
362
363   overriding function Separator
364    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
365       return League.Strings.Universal_String;
366   --  Operation NamedElement::separator.
367   --
368   --  The query separator() gives the string that is used to separate names
369   --  when constructing a qualified name.
370
371   overriding function All_Owned_Elements
372    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
373       return AMF.UML.Elements.Collections.Set_Of_UML_Element;
374   --  Operation Element::allOwnedElements.
375   --
376   --  The query allOwnedElements() gives all of the direct and indirect owned
377   --  elements of an element.
378
379   overriding function Is_Compatible_With
380    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
381     P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
382       return Boolean;
383   --  Operation ParameterableElement::isCompatibleWith.
384   --
385   --  The query isCompatibleWith() determines if this parameterable element
386   --  is compatible with the specified parameterable element. By default
387   --  parameterable element P is compatible with parameterable element Q if
388   --  the kind of P is the same or a subtype as the kind of Q. Subclasses
389   --  should override this operation to specify different compatibility
390   --  constraints.
391
392   overriding function Is_Template_Parameter
393    (Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
394       return Boolean;
395   --  Operation ParameterableElement::isTemplateParameter.
396   --
397   --  The query isTemplateParameter() determines if this parameterable
398   --  element is exposed as a formal template parameter.
399
400   overriding procedure Enter_Element
401    (Self    : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
402     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
403     Control : in out AMF.Visitors.Traverse_Control);
404
405   overriding procedure Leave_Element
406    (Self    : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
407     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
408     Control : in out AMF.Visitors.Traverse_Control);
409
410   overriding procedure Visit_Element
411    (Self     : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
412     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
413     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
414     Control  : in out AMF.Visitors.Traverse_Control);
415
416end AMF.Internals.UMLDI_UML_Profile_Diagrams;
417