2 //=============================================================================
6 * This file contains examples of IDL code that has
7 * caused problems in the past for the TAO IDL
8 * compiler. This test is to make sure the problems
12 * @author Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
14 //=============================================================================
16 #ifndef IDL_TEST_INCLUDING_IDL
17 #define IDL_TEST_INCLUDING_IDL
19 #include
"included.idl"
26 union myUnion
switch (choice
)
28 // Typedef is in included file
29 case dog
: Aok
::Seq1Type cat
;
32 // Enum discriminator is in included file
33 union Bog
switch (Agog
)
35 case Agog1
: long bog1
;
36 case Agog2
: long bog2
;
37 case Agog3
: long bog3
;
40 // We had a name clash with Me and ME, but the
41 // rule that requires type defined in a scope
42 // which is defined in an interface to be
43 // added to the referenced types in the interface's
44 // scope doesn't apply here, because Me is not
45 // defined in the struct, only referenced.
51 TAO_FE
// FE is #defined on HP-UX 10.20, so I prefix it with TAO
62 typedef sequence
<VT_Def
::VT
> VTSeq
;
65 // References to A::MyStructA from included.idl get the
66 // forward declaration from lookup, and we were
67 // getting empty typename generation in various places,
68 // before overriding the visit methods for forward
69 // declared structs and unions in the relevant visitors.
85 union TestUn
switch (long)
87 case 0: A
::MyStructA value1
;
88 case 1: string value2
;
93 A
::MyStructA op
(in A
::MyStructA ab
);
96 // A different enum with the same enum values is
97 // defined in the base interface in the same scope
98 // in another IDL file included by this one. The
99 // construction is legal and should be accepted.
104 interface ChildIF
: ParentIF
120 typedef AAA
::my_long_type my_b_long
;
123 #endif
/* IDL_TEST_INCLUDING_IDL */