1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#pragma once
6
7#include <Ice/Current.ice>
8
9[["java:package:test.Ice.impl.AMD"]]
10module Test
11{
12
13enum MyEnum
14{
15    enum1,
16    enum2,
17    enum3
18}
19
20interface MyClass;
21
22struct AnotherStruct
23{
24    string s;
25}
26
27struct Structure
28{
29    MyClass* p;
30    MyEnum e;
31    AnotherStruct s;
32}
33
34sequence<byte> ByteS;
35sequence<bool> BoolS;
36sequence<short> ShortS;
37sequence<int> IntS;
38sequence<long> LongS;
39sequence<float> FloatS;
40sequence<double> DoubleS;
41sequence<string> StringS;
42sequence<MyEnum> MyEnumS;
43sequence<MyClass*> MyClassS;
44
45sequence<ByteS> ByteSS;
46sequence<BoolS> BoolSS;
47sequence<ShortS> ShortSS;
48sequence<IntS> IntSS;
49sequence<LongS> LongSS;
50sequence<FloatS> FloatSS;
51sequence<DoubleS> DoubleSS;
52sequence<StringS> StringSS;
53sequence<MyEnumS> MyEnumSS;
54sequence<MyClassS> MyClassSS;
55
56sequence<StringSS> StringSSS;
57
58struct MyStruct
59{
60    int i;
61    int j;
62}
63
64dictionary<byte, bool> ByteBoolD;
65dictionary<short, int> ShortIntD;
66dictionary<long, float> LongFloatD;
67dictionary<string, string> StringStringD;
68dictionary<string, MyEnum> StringMyEnumD;
69dictionary<MyEnum, string> MyEnumStringD;
70dictionary<MyStruct, MyEnum> MyStructMyEnumD;
71
72["java:type:java.util.ArrayList<java.util.Map<Byte,Boolean>>"] sequence<ByteBoolD> ByteBoolDS;
73["java:type:java.util.ArrayList<java.util.Map<Short,Integer>>"] sequence<ShortIntD> ShortIntDS;
74["java:type:java.util.ArrayList<java.util.Map<Long,Float>>"]sequence<LongFloatD> LongFloatDS;
75["java:type:java.util.ArrayList<java.util.Map<String,String>>"]sequence<StringStringD> StringStringDS;
76["java:type:java.util.ArrayList<java.util.Map<String,MyEnum>>"]sequence<StringMyEnumD> StringMyEnumDS;
77["java:type:java.util.ArrayList<java.util.Map<MyEnum,String>>"]sequence<MyEnumStringD> MyEnumStringDS;
78["java:type:java.util.ArrayList<java.util.Map<MyStruct,MyEnum>>"]sequence<MyStructMyEnumD> MyStructMyEnumDS;
79
80dictionary<byte, ByteS> ByteByteSD;
81dictionary<bool, BoolS> BoolBoolSD;
82dictionary<short, ShortS> ShortShortSD;
83dictionary<int, IntS> IntIntSD;
84dictionary<long, LongS> LongLongSD;
85dictionary<string, FloatS> StringFloatSD;
86dictionary<string, DoubleS> StringDoubleSD;
87dictionary<string, StringS> StringStringSD;
88dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD;
89
90["amd"] interface MyClass
91{
92    void shutdown();
93
94    void opVoid();
95
96    byte opByte(byte p1, byte p2,
97                out byte p3);
98
99    bool opBool(bool p1, bool p2,
100                out bool p3);
101
102    long opShortIntLong(short p1, int p2, long p3,
103                        out short p4, out int p5, out long p6);
104
105    double opFloatDouble(float p1, double p2,
106                         out float p3, out double p4);
107
108    string opString(string p1, string p2,
109                    out string p3);
110
111    MyEnum opMyEnum(MyEnum p1, out MyEnum p2);
112
113    MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3);
114
115    Structure opStruct(Structure p1, Structure p2,
116                       out Structure p3);
117
118    ByteS opByteS(ByteS p1, ByteS p2,
119                  out ByteS p3);
120
121    BoolS opBoolS(BoolS p1, BoolS p2,
122                  out BoolS p3);
123
124    LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3,
125                          out ::Test::ShortS p4, out IntS p5, out LongS p6);
126
127    DoubleS opFloatDoubleS(FloatS p1, DoubleS p2,
128                           out FloatS p3, out DoubleS p4);
129
130    StringS opStringS(StringS p1, StringS p2,
131                      out StringS p3);
132
133    ByteSS opByteSS(ByteSS p1, ByteSS p2,
134                    out ByteSS p3);
135
136    BoolSS opBoolSS(BoolSS p1, BoolSS p2,
137                    out BoolSS p3);
138
139    LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3,
140                            out ShortSS p4, out IntSS p5, out LongSS p6);
141
142    DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2,
143                             out FloatSS p3, out DoubleSS p4);
144
145    StringSS opStringSS(StringSS p1, StringSS p2,
146                        out StringSS p3);
147
148    StringSSS opStringSSS(StringSSS p1, StringSSS p2,
149                        out StringSSS p3);
150
151    ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2,
152                          out ByteBoolD p3);
153
154    ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2,
155                          out ShortIntD p3);
156
157    LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2,
158                            out LongFloatD p3);
159
160    StringStringD opStringStringD(StringStringD p1, StringStringD p2,
161                                  out StringStringD p3);
162
163    StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
164                                  out StringMyEnumD p3);
165
166    MyEnumStringD opMyEnumStringD(MyEnumStringD p1, MyEnumStringD p2,
167                                  out MyEnumStringD p3);
168
169    MyStructMyEnumD opMyStructMyEnumD(MyStructMyEnumD p1, MyStructMyEnumD p2,
170                                      out MyStructMyEnumD p3);
171
172    ByteBoolDS opByteBoolDS(ByteBoolDS p1, ByteBoolDS p2,
173                            out ByteBoolDS p3);
174
175    ShortIntDS opShortIntDS(ShortIntDS p1, ShortIntDS p2,
176                            out ShortIntDS p3);
177
178    LongFloatDS opLongFloatDS(LongFloatDS p1, LongFloatDS p2,
179                              out LongFloatDS p3);
180
181    StringStringDS opStringStringDS(StringStringDS p1, StringStringDS p2,
182                                    out StringStringDS p3);
183
184    StringMyEnumDS opStringMyEnumDS(StringMyEnumDS p1, StringMyEnumDS p2,
185                                    out StringMyEnumDS p3);
186
187    MyEnumStringDS opMyEnumStringDS(MyEnumStringDS p1, MyEnumStringDS p2,
188                                    out MyEnumStringDS p3);
189
190    MyStructMyEnumDS opMyStructMyEnumDS(MyStructMyEnumDS p1, MyStructMyEnumDS p2,
191                                        out MyStructMyEnumDS p3);
192
193    ByteByteSD opByteByteSD(ByteByteSD p1, ByteByteSD p2,
194                            out ByteByteSD p3);
195
196    BoolBoolSD opBoolBoolSD(BoolBoolSD p1, BoolBoolSD p2,
197                            out BoolBoolSD p3);
198
199    ShortShortSD opShortShortSD(ShortShortSD p1, ShortShortSD p2,
200                                out ShortShortSD p3);
201
202    IntIntSD opIntIntSD(IntIntSD p1, IntIntSD p2,
203                        out IntIntSD p3);
204
205    LongLongSD opLongLongSD(LongLongSD p1, LongLongSD p2,
206                            out LongLongSD p3);
207
208    StringFloatSD opStringFloatSD(StringFloatSD p1, StringFloatSD p2,
209                                  out StringFloatSD p3);
210
211    StringDoubleSD opStringDoubleSD(StringDoubleSD p1, StringDoubleSD p2,
212                                    out StringDoubleSD p3);
213
214    StringStringSD opStringStringSD(StringStringSD p1, StringStringSD p2,
215                                    out StringStringSD p3);
216
217    MyEnumMyEnumSD opMyEnumMyEnumSD(MyEnumMyEnumSD p1, MyEnumMyEnumSD p2,
218                                    out MyEnumMyEnumSD p3);
219
220    IntS opIntS(IntS s);
221
222    void opByteSOneway(ByteS s);
223
224    int opByteSOnewayCallCount();
225
226    Ice::Context opContext();
227
228    void opDoubleMarshaling(double p1, DoubleS p2);
229
230    idempotent void opIdempotent();
231
232    ["nonmutating"] idempotent void opNonmutating();
233
234    byte opByte1(byte opByte1);
235    short opShort1(short opShort1);
236    int opInt1(int opInt1);
237    long opLong1(long opLong1);
238    float opFloat1(float opFloat1);
239    double opDouble1(double opDouble1);
240    string opString1(string opString1);
241    StringS opStringS1(StringS opStringS1);
242    ByteBoolD opByteBoolD1(ByteBoolD opByteBoolD1);
243    StringS opStringS2(StringS stringS);
244    ByteBoolD opByteBoolD2(ByteBoolD byteBoolD);
245
246    StringS opStringLiterals();
247    StringS opWStringLiterals();
248
249    ["marshaled-result"] Structure opMStruct1();
250    ["marshaled-result"] Structure opMStruct2(Structure p1, out Structure p2);
251
252    ["marshaled-result"] StringS opMSeq1();
253    ["marshaled-result"] StringS opMSeq2(StringS p1, out StringS p2);
254
255    ["marshaled-result"] StringStringD opMDict1();
256    ["marshaled-result"] StringStringD opMDict2(StringStringD p1, out StringStringD p2);
257}
258
259struct MyStruct1
260{
261    string tesT; // Same name as the enclosing module
262    MyClass* myClass; // Same name as an already defined class
263    string myStruct1; // Same name as the enclosing struct
264}
265
266class MyClass1
267{
268    string tesT; // Same name as the enclosing module
269    MyClass* myClass; // Same name as an already defined class
270    string myClass1; // Same name as the enclosing class
271}
272
273["amd", "java:tie"] interface MyDerivedClass extends MyClass
274{
275    void opDerived();
276    MyClass1 opMyClass1(MyClass1 opMyClass1);
277    MyStruct1 opMyStruct1(MyStruct1 opMyStruct1);
278}
279
280//
281// String literals
282//
283
284const string s0 = "\u005c";                           // backslash
285const string s1 = "\u0041";                           // A
286const string s2 = "\u0049\u0063\u0065";               // Ice
287const string s3 = "\u004121";                         // A21
288const string s4 = "\\u0041 \\U00000041";              // \\u0041 \\U00000041
289const string s5 = "\u00FF";                           // ÿ
290const string s6 = "\u03FF";                           // GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL (U+03FF)
291const string s7 = "\u05F0";                           // HEBREW LIGATURE YIDDISH DOUBLE VAV (U+05F0)
292const string s8 = "\U00010000";                       // LINEAR B SYLLABLE B008 A (U+10000)
293const string s9 = "\U0001F34C";                       // BANANA (U+1F34C)
294const string s10 = "\u0DA7";                          // Sinhala Letter Alpapraana Ttayanna
295
296const string sw0 = "\U0000005c";                      // backslash
297const string sw1 = "\U00000041";                      // A
298const string sw2 = "\U00000049\U00000063\U00000065";  // Ice
299const string sw3 = "\U0000004121";                    // A21
300const string sw4 = "\\u0041 \\U00000041";             // \\u0041 \\U00000041
301const string sw5 = "\U000000FF";                      // ÿ
302const string sw6 = "\U000003FF";                      // GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL (U+03FF)
303const string sw7 = "\U000005F0";                      // HEBREW LIGATURE YIDDISH DOUBLE VAV (U+05F0)
304const string sw8 = "\U00010000";                      // LINEAR B SYLLABLE B008 A (U+10000)
305const string sw9 = "\U0001F34C";                      // BANANA (U+1F34C)
306const string sw10 = "\U00000DA7";                     // Sinhala Letter Alpapraana Ttayanna
307
308/**
309\'      single quote    byte 0x27 in ASCII encoding
310\"      double quote    byte 0x22 in ASCII encoding
311\?      question mark   byte 0x3f in ASCII encoding
312\\      backslash       byte 0x5c in ASCII encoding
313\a      audible bell    byte 0x07 in ASCII encoding
314\b      backspace       byte 0x08 in ASCII encoding
315\f      form feed - new page    byte 0x0c in ASCII encoding
316\n      line feed - new line    byte 0x0a in ASCII encoding
317\r      carriage return byte 0x0d in ASCII encoding
318\t      horizontal tab  byte 0x09 in ASCII encoding
319\v      vertical tab    byte 0x0b in ASCII encoding
320**/
321
322const string ss0 = "\'\"\?\\\a\b\f\n\r\t\v\6";
323const string ss1 = "\u0027\u0022\u003f\u005c\u0007\u0008\u000c\u000a\u000d\u0009\u000b\u0006";
324const string ss2 = "\U00000027\U00000022\U0000003f\U0000005c\U00000007\U00000008\U0000000c\U0000000a\U0000000d\U00000009\U0000000b\U00000006";
325
326const string ss3 = "\\\\U\\u\\"; /* \\U\u\  */
327const string ss4 = "\\\u0041\\"; /* \A\     */
328const string ss5 = "\\u0041\\";  /* \u0041\ */
329
330//
331// Ĩ - Unicode Character 'LATIN CAPITAL LETTER I WITH TILDE' (U+0128)
332// Ÿ - Unicode Character 'LATIN CAPITAL LETTER Y WITH DIAERESIS' (U+0178)
333// ÿ - Unicode Character 'LATIN SMALL LETTER Y WITH DIAERESIS' (U+00FF)
334// Ā - Unicode Character 'LATIN CAPITAL LETTER A WITH MACRON' (U+0100)
335// ἀ - Unicode Character 'GREEK SMALL LETTER ALPHA WITH PSILI' (U+1F00)
336// �� - Unicode Character 'ROMAN DIMIDIA SEXTULA SIGN' (U+10194)
337// �� - Unicode Character 'GREEK ACROPHONIC THESPIAN ONE HUNDRED' (U+1016A)
338// �� - Unicode Character 'ROMAN SESTERTIUS SIGN' (U+10198)
339// �� - Unicode Character 'FOUR LEAF CLOVER' (U+1F340)
340// �� - Unicode Character 'MAPLE LEAF' (U+1F341)
341// �� - Unicode Character 'FALLEN LEAF' (U+1F342)
342// �� - Unicode Character 'LEAF FLUTTERING IN WIND' (U+1F343)
343//
344const string su0 = "ĨŸÿĀἀ��������������";
345const string su1 = "\u0128\u0178\u00FF\u0100\u1F00\U00010194\U0001016A\U00010198\U0001F340\U0001F341\U0001F342\U0001F343";
346const string su2 = "\U00000128\U00000178\U000000FF\U00000100\U00001F00\U00010194\U0001016A\U00010198\U0001F340\U0001F341\U0001F342\U0001F343";
347
348}
349