1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                          Ada Modeling Framework                          --
6--                                                                          --
7--                        Runtime Library Component                         --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 2011-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: 2937 $ $Date: 2012-05-01 21:07:27 +0400 (Tue, 01 May 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Named_Elements;
45with AMF.UML.Constraints;
46with AMF.UML.Dependencies.Collections;
47with AMF.UML.General_Orderings.Collections;
48with AMF.UML.Interaction_Operands;
49with AMF.UML.Interactions;
50with AMF.UML.Lifelines.Collections;
51with AMF.UML.Named_Elements;
52with AMF.UML.Namespaces;
53with AMF.UML.Packages.Collections;
54with AMF.UML.State_Invariants;
55with AMF.UML.String_Expressions;
56with AMF.Visitors;
57
58package AMF.Internals.UML_State_Invariants is
59
60   type UML_State_Invariant_Proxy is
61     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
62       and AMF.UML.State_Invariants.UML_State_Invariant with null record;
63
64   overriding function Get_Covered
65    (Self : not null access constant UML_State_Invariant_Proxy)
66       return AMF.UML.Lifelines.UML_Lifeline_Access;
67   --  Getter of StateInvariant::covered.
68   --
69   --  References the Lifeline on which the StateInvariant appears.
70
71   overriding procedure Set_Covered
72    (Self : not null access UML_State_Invariant_Proxy;
73     To   : AMF.UML.Lifelines.UML_Lifeline_Access);
74   --  Setter of StateInvariant::covered.
75   --
76   --  References the Lifeline on which the StateInvariant appears.
77
78   overriding function Get_Invariant
79    (Self : not null access constant UML_State_Invariant_Proxy)
80       return AMF.UML.Constraints.UML_Constraint_Access;
81   --  Getter of StateInvariant::invariant.
82   --
83   --  A Constraint that should hold at runtime for this StateInvariant
84
85   overriding procedure Set_Invariant
86    (Self : not null access UML_State_Invariant_Proxy;
87     To   : AMF.UML.Constraints.UML_Constraint_Access);
88   --  Setter of StateInvariant::invariant.
89   --
90   --  A Constraint that should hold at runtime for this StateInvariant
91
92   overriding function Get_Covered
93    (Self : not null access constant UML_State_Invariant_Proxy)
94       return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline;
95   --  Getter of InteractionFragment::covered.
96   --
97   --  References the Lifelines that the InteractionFragment involves.
98
99   overriding function Get_Enclosing_Interaction
100    (Self : not null access constant UML_State_Invariant_Proxy)
101       return AMF.UML.Interactions.UML_Interaction_Access;
102   --  Getter of InteractionFragment::enclosingInteraction.
103   --
104   --  The Interaction enclosing this InteractionFragment.
105
106   overriding procedure Set_Enclosing_Interaction
107    (Self : not null access UML_State_Invariant_Proxy;
108     To   : AMF.UML.Interactions.UML_Interaction_Access);
109   --  Setter of InteractionFragment::enclosingInteraction.
110   --
111   --  The Interaction enclosing this InteractionFragment.
112
113   overriding function Get_Enclosing_Operand
114    (Self : not null access constant UML_State_Invariant_Proxy)
115       return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access;
116   --  Getter of InteractionFragment::enclosingOperand.
117   --
118   --  The operand enclosing this InteractionFragment (they may nest
119   --  recursively)
120
121   overriding procedure Set_Enclosing_Operand
122    (Self : not null access UML_State_Invariant_Proxy;
123     To   : AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access);
124   --  Setter of InteractionFragment::enclosingOperand.
125   --
126   --  The operand enclosing this InteractionFragment (they may nest
127   --  recursively)
128
129   overriding function Get_General_Ordering
130    (Self : not null access constant UML_State_Invariant_Proxy)
131       return AMF.UML.General_Orderings.Collections.Set_Of_UML_General_Ordering;
132   --  Getter of InteractionFragment::generalOrdering.
133   --
134   --  The general ordering relationships contained in this fragment.
135
136   overriding function Get_Client_Dependency
137    (Self : not null access constant UML_State_Invariant_Proxy)
138       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
139   --  Getter of NamedElement::clientDependency.
140   --
141   --  Indicates the dependencies that reference the client.
142
143   overriding function Get_Name_Expression
144    (Self : not null access constant UML_State_Invariant_Proxy)
145       return AMF.UML.String_Expressions.UML_String_Expression_Access;
146   --  Getter of NamedElement::nameExpression.
147   --
148   --  The string expression used to define the name of this named element.
149
150   overriding procedure Set_Name_Expression
151    (Self : not null access UML_State_Invariant_Proxy;
152     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
153   --  Setter of NamedElement::nameExpression.
154   --
155   --  The string expression used to define the name of this named element.
156
157   overriding function Get_Namespace
158    (Self : not null access constant UML_State_Invariant_Proxy)
159       return AMF.UML.Namespaces.UML_Namespace_Access;
160   --  Getter of NamedElement::namespace.
161   --
162   --  Specifies the namespace that owns the NamedElement.
163
164   overriding function Get_Qualified_Name
165    (Self : not null access constant UML_State_Invariant_Proxy)
166       return AMF.Optional_String;
167   --  Getter of NamedElement::qualifiedName.
168   --
169   --  A name which allows the NamedElement to be identified within a
170   --  hierarchy of nested Namespaces. It is constructed from the names of the
171   --  containing namespaces starting at the root of the hierarchy and ending
172   --  with the name of the NamedElement itself.
173
174   overriding function All_Owning_Packages
175    (Self : not null access constant UML_State_Invariant_Proxy)
176       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
177   --  Operation NamedElement::allOwningPackages.
178   --
179   --  The query allOwningPackages() returns all the directly or indirectly
180   --  owning packages.
181
182   overriding function Is_Distinguishable_From
183    (Self : not null access constant UML_State_Invariant_Proxy;
184     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
185     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
186       return Boolean;
187   --  Operation NamedElement::isDistinguishableFrom.
188   --
189   --  The query isDistinguishableFrom() determines whether two NamedElements
190   --  may logically co-exist within a Namespace. By default, two named
191   --  elements are distinguishable if (a) they have unrelated types or (b)
192   --  they have related types but different names.
193
194   overriding function Namespace
195    (Self : not null access constant UML_State_Invariant_Proxy)
196       return AMF.UML.Namespaces.UML_Namespace_Access;
197   --  Operation NamedElement::namespace.
198   --
199   --  Missing derivation for NamedElement::/namespace : Namespace
200
201   overriding procedure Enter_Element
202    (Self    : not null access constant UML_State_Invariant_Proxy;
203     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
204     Control : in out AMF.Visitors.Traverse_Control);
205   --  Dispatch call to corresponding subprogram of visitor interface.
206
207   overriding procedure Leave_Element
208    (Self    : not null access constant UML_State_Invariant_Proxy;
209     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
210     Control : in out AMF.Visitors.Traverse_Control);
211   --  Dispatch call to corresponding subprogram of visitor interface.
212
213   overriding procedure Visit_Element
214    (Self     : not null access constant UML_State_Invariant_Proxy;
215     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
216     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
217     Control  : in out AMF.Visitors.Traverse_Control);
218   --  Dispatch call to corresponding subprogram of iterator interface.
219
220end AMF.Internals.UML_State_Invariants;
221