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