Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / IDLv4 / TestIDLv4.idl
blob614536616df063e95d405368289e3d8beead4e7f
1 // IDL v4.2 OMG formal/2018-01-05
3 // 7.4.13 Building Block Extended Data-Types
5 // 7.4.13.4.1 Extended Structs
7 struct StructA {
8 long a;
9 };
11 struct StructB : StructA {
12 long b;
15 struct StructC : StructB {
18 // 7.4.13.4.2 Union Discriminators
20 union UnionWC switch (wchar) {
21 case L'a':
22 long a;
25 union UnionOC switch (octet) {
26 case 42:
27 long a;
30 // 7.4.13.4.3.1 Maps
32 typedef map<long, string> MapType;
34 typedef map<long, string, 23> MapTypeBounded;
36 // 7.4.13.4.3.2 Bit Sets
38 bitset BitSet1 {
39 bitfield<1> bit0;
40 bitfield<1>; // skip bit1
41 bitfield<2, unsigned short> bits2_3;
44 bitset BitSet2 : BitSet1 {
45 bitfield<3>; // skip bits4-6
46 bitfield<1> bit7;
49 // 7.4.13.4.3.3 Bit Masks
51 bitmask BitMask1 {
52 val0, val1, val2, val3
55 // 7.4.13.4.4 8-bit Integers
57 typedef int8 ByteSigned;
58 typedef uint8 ByteUnsigned;
60 // 7.4.13.4.5 Alternate Names for Integer Types
62 typedef int16 ShortSigned;
63 typedef int32 LongSigned;
64 typedef int64 LongLongSigned;
65 typedef uint16 ShortUnsigned;
66 typedef uint32 LongUnsigned;
67 typedef uint64 LongLongUnsigned;
69 // 7.4.14 Building Block Anonymous Types
71 struct TestAnon {
72 sequence<string> a;
73 long b[4];
76 // 7.4.15 Building Block Annotations
78 // 7.4.15.4.2 Applying Annotations
80 const double dub = 6.78;
82 @abc
83 struct Annotated1 {
85 @def(1) octet a;
86 @ghi(2.3) octet b;
87 @jkl('m') octet c;
88 @nop(L'q') octet d;
89 @rst(TRUE) octet e;
90 @uvw("xyz") octet f;
91 @aa(L"bbcc") octet g;
92 @ddee(4 + 5) octet h;
94 @ffgg(dub) octet i;
96 @hhii(jj = FALSE) octet j;
97 @kkll(mm = 3, nn = 'o') octet k;
100 @bit_bound(8)
101 bitmask BitMask2 {
102 @position(1) flag1
105 // 7.4.15.4.1 Defining Annotations
106 // This should be able to be parsed but it will not effect anything except the
107 // compiler will produce an warning that defining annotations will be ignored.
108 // TODO: Make more cases
109 @annotation Annotation1 {
110 short somevalue;