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