Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / OBV / ValueBox / vb_struct.idl
blob79599bb43a48425f99e5698488cdb3f5ee495435
1 //=========================================================================
2 // Valuebox of structs
3 //=========================================================================
5 // "Fixed" struct
6 struct Fixed_Struct1
7 { long l;
8 struct Bstruct {short s1; short s2; } abstruct;
9 };
11 // "Variable" struct
12 struct Variable_Struct1
13 { long l;
14 string str;
17 typedef Variable_Struct1 TDvariable_struct1;
19 interface InterfaceFwd;
21 interface Interface1
23 long getval(in short s);
26 enum Pet { dog, cat, fish, rhinoceros };
27 typedef short short_array[15];
29 union Union1 switch(long)
31 case 1: long m1;
32 case 2: Pet m2;
35 typedef sequence<long> LongSeq;
36 typedef octet oct_array[10];
37 typedef sequence <Pet> PetSeq;
38 // Use all possible types inside a struct
39 struct Variable_Struct2
41 long len; // predefined type
42 any whatever; // predefined type
43 Pet apet; // enum
44 oct_array octet_array; // array
45 short_array td_array; // typedefed array
46 Interface1 intf1; // interface
47 InterfaceFwd intf2; // interface fwd
48 string str; // string
49 wstring wstr; // string
50 LongSeq ls; // typedef sequence
51 PetSeq sqq; // sequence
52 struct NestedStruct1 { short s; string str2; } ns1; // structure
53 Variable_Struct1 NestedStruct2;
54 TDvariable_struct1 NestedStruct3;
55 Union1 un; // union
58 valuetype VBfixed_struct1 Fixed_Struct1;
60 valuetype VBvariable_struct1 Variable_Struct1;
62 valuetype VBvariable_struct2 Variable_Struct2;
64 interface InterfaceFwd
66 long getval(in short s);