1------------------------------------------------------------------------------
2--                                                                          --
3--                            Matreshka Project                             --
4--                                                                          --
5--                               Web Framework                              --
6--                                                                          --
7--                              Tools Component                             --
8--                                                                          --
9------------------------------------------------------------------------------
10--                                                                          --
11-- Copyright © 2012-2013, 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: 4000 $ $Date: 2013-07-12 09:18:10 +0400 (Fri, 12 Jul 2013) $
43------------------------------------------------------------------------------
44with Ada.Containers.Vectors;
45
46with League.String_Vectors;
47
48with WSDL.MEPs;
49
50package WSDL.AST.Operations is
51
52   pragma Preelaborate;
53
54   package Interface_Message_Vectors is
55     new Ada.Containers.Vectors
56          (Positive,
57           WSDL.AST.Interface_Message_Access,
58           WSDL.AST."=");
59
60   package Interface_Fault_Vectors is
61     new Ada.Containers.Vectors
62          (Positive,
63           WSDL.AST.Interface_Fault_Reference_Access,
64           WSDL.AST."=");
65
66   -------------------------
67   -- Interface Operation --
68   -------------------------
69
70   type Interface_Operation_Node is new Abstract_Node with record
71      Local_Name                   : League.Strings.Universal_String;
72      --  Local name part of the name of the operation.
73
74      Parent                       : WSDL.AST.Interface_Access;
75      --  Value of {parent} property.
76
77      Message_Exchange_Pattern     : WSDL.MEPs.MEP_Access;
78      --  Value of {message exchange pattern} property.
79
80      Style                        :
81        League.String_Vectors.Universal_String_Vector;
82      --  Value of {style} property.
83
84      Interface_Message_References : Interface_Message_Vectors.Vector;
85      --  Value of {interface message references} property.
86
87      Interface_Fault_References   : Interface_Fault_Vectors.Vector;
88      --  Value of {interface fault references} property.
89   end record;
90
91   overriding procedure Enter
92    (Self    : not null access Interface_Operation_Node;
93     Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
94     Control : in out WSDL.Iterators.Traverse_Control);
95
96   overriding procedure Leave
97    (Self    : not null access Interface_Operation_Node;
98     Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
99     Control : in out WSDL.Iterators.Traverse_Control);
100
101   overriding procedure Visit
102    (Self     : not null access Interface_Operation_Node;
103     Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
104     Visitor  : in out WSDL.Visitors.WSDL_Visitor'Class;
105     Control  : in out WSDL.Iterators.Traverse_Control);
106
107   -----------------------
108   -- Binding Operation --
109   -----------------------
110
111   type SOAP_Binding_Operation_Extension is record
112      MEP    : League.Strings.Universal_String;
113      --  Value of {soap mep} property.
114
115      Action : League.Strings.Universal_String;
116      --  Value of {soap action} property.
117   end record;
118
119   type Binding_Operation_Node is new Abstract_Node with record
120      Ref                 : Qualified_Name;
121      --  Name of the related interface operation.
122
123      Parent              : WSDL.AST.Binding_Access;
124      --  Value of {parent} property.
125
126      Interface_Operation : WSDL.AST.Interface_Operation_Access;
127      --  Value of {interface operation} property.
128
129      SOAP                : SOAP_Binding_Operation_Extension;
130      --  SOAP Binding extension information;
131   end record;
132
133   overriding procedure Enter
134    (Self    : not null access Binding_Operation_Node;
135     Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
136     Control : in out WSDL.Iterators.Traverse_Control);
137
138   overriding procedure Leave
139    (Self    : not null access Binding_Operation_Node;
140     Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
141     Control : in out WSDL.Iterators.Traverse_Control);
142
143   overriding procedure Visit
144    (Self     : not null access Binding_Operation_Node;
145     Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
146     Visitor  : in out WSDL.Visitors.WSDL_Visitor'Class;
147     Control  : in out WSDL.Iterators.Traverse_Control);
148
149end WSDL.AST.Operations;
150