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 //=============================================================================
17 // Used to be a problem in the get() and set()
25 interface Derived
: Base
29 // The fact that the interface begins with 'foo' was causing
30 // problems. The IDL compiler thought the interface was in
42 foo_mod
::date getDate
();
45 // Only operations or attributes should cause a clash
46 // in this type of situation.
63 interface child
: mother
, father
71 // Definition below in file.
78 later op
(in later inarg
,
83 // Not a clash with the C++ keyword because they are case sensitive,
84 // but the Arg_Traits<> specialization parameter (ACE_InputCDR::to_boolean)
85 // needs the unaliased type name to work.
86 void op2
(in Bool inarg2
);
96 // Previously, we could have found v if it
97 // was inherited into Client, but not in
98 // the case below, where it is inherited into
99 // somewhere other than the scope where the
107 interface Middle
: Begin
111 interface End
: Middle
117 attribute End
::Value v
;
120 // Tests arg_traits visitor for unaliased bounded (w)string
122 interface AttributeTester
124 typedef string string_1
[1];
126 attribute
string a_su
;
127 attribute string_1 a_sb
;
130 // All of the 'recursion' below is legal.
133 interface ParameterTester
135 exception object_excep_type
137 ParameterTester objref
;
140 typedef sequence
<ParameterTester
> object_seq_type
;
142 typedef ParameterTester object_array_type
[5];
144 struct object_struct_type
151 union object_union_type
switch (long)
154 case 1: ParameterTester pt
;
157 object_seq_type parameter_tester_op
(
158 in object_struct_type inarg
,
159 inout object_array_type inoutarg
,
160 out object_union_type outarg
162 raises
(object_excep_type
);
166 local interface testlocal
171 union U
switch (Bool
)
199 interface if2
: ::i1
::if1
204 interface if3
: ::i2
::if2
210 /// Tests acceptance of legal redefinitions (of
211 /// constants, exceptions and types) in a derived
217 const long lconst
= -5;
230 interface derived
: base
232 const long lconst
= 44;
246 // Had to relocate the spot where the typedef is marked as
247 // having its arg traits instantiation already generated.
248 // Otherwise, when the scope of the base interface is visited
249 // as part of this process, we had infinite recursion and a
251 module Rec_Arg_Traits
255 typedef Rec_Arg_Traits
::base plan_stub_type
;
258 interface derived
: Rec_Arg_Traits
::base
260 void remove_task
(in plan_stub_type listener
);