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