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: 2864 $ $Date: 2012-04-13 14:08:07 +0400 (Fri, 13 Apr 2012) $
43------------------------------------------------------------------------------
44with AMF.Internals.UML_Elements;
45with AMF.UML.Clauses.Collections;
46with AMF.UML.Executable_Nodes.Collections;
47with AMF.UML.Output_Pins.Collections;
48with AMF.Visitors;
49
50package AMF.Internals.UML_Clauses is
51
52   type UML_Clause_Proxy is
53     limited new AMF.Internals.UML_Elements.UML_Element_Proxy
54       and AMF.UML.Clauses.UML_Clause with null record;
55
56   overriding function Get_Body
57    (Self : not null access constant UML_Clause_Proxy)
58       return AMF.UML.Executable_Nodes.Collections.Set_Of_UML_Executable_Node;
59   --  Getter of Clause::body.
60   --
61   --  A nested activity fragment that is executed if the test evaluates to
62   --  true and the clause is chosen over any concurrent clauses that also
63   --  evaluate to true.
64
65   overriding function Get_Body_Output
66    (Self : not null access constant UML_Clause_Proxy)
67       return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin;
68   --  Getter of Clause::bodyOutput.
69   --
70   --  A list of output pins within the body fragment whose values are moved
71   --  to the result pins of the containing conditional node after execution
72   --  of the clause body.
73
74   overriding function Get_Decider
75    (Self : not null access constant UML_Clause_Proxy)
76       return AMF.UML.Output_Pins.UML_Output_Pin_Access;
77   --  Getter of Clause::decider.
78   --
79   --  An output pin within the test fragment the value of which is examined
80   --  after execution of the test to determine whether the body should be
81   --  executed.
82
83   overriding procedure Set_Decider
84    (Self : not null access UML_Clause_Proxy;
85     To   : AMF.UML.Output_Pins.UML_Output_Pin_Access);
86   --  Setter of Clause::decider.
87   --
88   --  An output pin within the test fragment the value of which is examined
89   --  after execution of the test to determine whether the body should be
90   --  executed.
91
92   overriding function Get_Predecessor_Clause
93    (Self : not null access constant UML_Clause_Proxy)
94       return AMF.UML.Clauses.Collections.Set_Of_UML_Clause;
95   --  Getter of Clause::predecessorClause.
96   --
97   --  A set of clauses whose tests must all evaluate false before the current
98   --  clause can be tested.
99
100   overriding function Get_Successor_Clause
101    (Self : not null access constant UML_Clause_Proxy)
102       return AMF.UML.Clauses.Collections.Set_Of_UML_Clause;
103   --  Getter of Clause::successorClause.
104   --
105   --  A set of clauses which may not be tested unless the current clause
106   --  tests false.
107
108   overriding function Get_Test
109    (Self : not null access constant UML_Clause_Proxy)
110       return AMF.UML.Executable_Nodes.Collections.Set_Of_UML_Executable_Node;
111   --  Getter of Clause::test.
112   --
113   --  A nested activity fragment with a designated output pin that specifies
114   --  the result of the test.
115
116   overriding procedure Enter_Element
117    (Self    : not null access constant UML_Clause_Proxy;
118     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
119     Control : in out AMF.Visitors.Traverse_Control);
120   --  Dispatch call to corresponding subprogram of visitor interface.
121
122   overriding procedure Leave_Element
123    (Self    : not null access constant UML_Clause_Proxy;
124     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
125     Control : in out AMF.Visitors.Traverse_Control);
126   --  Dispatch call to corresponding subprogram of visitor interface.
127
128   overriding procedure Visit_Element
129    (Self     : not null access constant UML_Clause_Proxy;
130     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
131     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
132     Control  : in out AMF.Visitors.Traverse_Control);
133   --  Dispatch call to corresponding subprogram of iterator interface.
134
135end AMF.Internals.UML_Clauses;
136