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