1// 2// Copyright (c) ZeroC, Inc. All rights reserved. 3// 4 5#pragma once 6 7[["suppress-warning:deprecated"]] // For classes with operations 8 9module Test 10{ 11 12struct S 13{ 14 string str; 15} 16 17class Base 18{ 19 S theS; 20 string str; 21} 22 23class AbstractBase extends Base 24{ 25 void op(); 26} 27 28class B; 29class C; 30 31class A 32{ 33 B theB; 34 C theC; 35 36 bool preMarshalInvoked; 37 bool postUnmarshalInvoked; 38} 39 40class B extends A 41{ 42 A theA; 43} 44 45class C 46{ 47 B theB; 48 49 bool preMarshalInvoked; 50 bool postUnmarshalInvoked; 51} 52 53class D 54{ 55 A theA; 56 B theB; 57 C theC; 58 59 bool preMarshalInvoked; 60 bool postUnmarshalInvoked; 61} 62 63["protected"] class E 64{ 65 int i; 66 string s; 67} 68 69class F 70{ 71 ["protected"] E e1; 72 E e2; 73} 74 75// Exercise empty class with non-empty base 76class G extends Base 77{ 78} 79 80interface I 81{ 82} 83 84interface J extends I 85{ 86} 87 88class H implements I 89{ 90} 91 92sequence<Base> BaseSeq; 93 94class CompactExt; 95 96class Compact(1) 97{ 98} 99 100const int CompactExtId = 789; 101 102class CompactExt(CompactExtId) extends Compact 103{ 104} 105 106class A1 107{ 108 string name; 109} 110 111class B1 112{ 113 A1 a1; 114 A1 a2; 115} 116 117class D1 extends B1 118{ 119 A1 a3; 120 A1 a4; 121} 122 123exception EBase 124{ 125 A1 a1; 126 A1 a2; 127} 128 129exception EDerived extends EBase 130{ 131 A1 a3; 132 A1 a4; 133} 134 135module Inner 136{ 137 138class A 139{ 140 ::Test::A theA; 141} 142 143exception Ex 144{ 145 string reason; 146} 147 148module Sub 149{ 150 151class A 152{ 153 ::Test::Inner::A theA; 154} 155 156exception Ex 157{ 158 string reason; 159} 160 161} 162 163} 164 165class Recursive 166{ 167 Recursive v; 168} 169 170class K 171{ 172 Value value; 173} 174 175class L 176{ 177 string data; 178} 179 180sequence<Value> ValueSeq; 181dictionary<string, Value> ValueMap; 182 183struct StructKey 184{ 185 int i; 186 string s; 187} 188 189dictionary<StructKey, L> LMap; 190 191class M 192{ 193 LMap v; 194} 195 196interface Initial 197{ 198 void shutdown(); 199 B getB1(); 200 B getB2(); 201 C getC(); 202 D getD(); 203 E getE(); 204 F getF(); 205 206 void setRecursive(Recursive p); 207 bool supportsClassGraphDepthMax(); 208 209 ["marshaled-result"] B getMB(); 210 ["amd", "marshaled-result"] B getAMDMB(); 211 212 void getAll(out B b1, out B b2, out C theC, out D theD); 213 214 I getH(); 215 I getI(); 216 I getJ(); 217 218 K getK(); 219 220 Value opValue(Value v1, out Value v2); 221 ValueSeq opValueSeq(ValueSeq v1, out ValueSeq v2); 222 ValueMap opValueMap(ValueMap v1, out ValueMap v2); 223 224 D1 getD1(D1 d1); 225 void throwEDerived() throws EDerived; 226 227 void setG(G theG); 228 void setI(I theI); 229 230 BaseSeq opBaseSeq(BaseSeq inSeq, out BaseSeq outSeq); 231 232 Compact getCompact(); 233 234 Inner::A getInnerA(); 235 Inner::Sub::A getInnerSubA(); 236 237 void throwInnerEx() throws Inner::Ex; 238 void throwInnerSubEx() throws Inner::Sub::Ex; 239 240 M opM(M v1, out M v2); 241} 242 243} 244