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