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
,
82 // Not a clash with the C++ keyword because they are case sensitive,
83 // but the Arg_Traits<> specialization parameter (ACE_InputCDR::to_boolean)
84 // needs the unaliased type name to work.
85 void op2
(in Bool inarg2
);
95 // Previously, we could have found v if it
96 // was inherited into Client, but not in
97 // the case below, where it is inherited into
98 // somewhere other than the scope where the
106 interface Middle
: Begin
110 interface End
: Middle
116 attribute End
::Value v
;
119 // Tests arg_traits visitor for unaliased bounded (w)string
121 interface AttributeTester
123 typedef string string_1
[1];
125 attribute
string a_su
;
126 attribute string_1 a_sb
;
129 // All of the 'recursion' below is legal.
132 interface ParameterTester
134 exception object_excep_type
136 ParameterTester objref
;
139 typedef sequence
<ParameterTester
> object_seq_type
;
141 typedef ParameterTester object_array_type
[5];
143 struct object_struct_type
150 union object_union_type
switch (long)
153 case 1: ParameterTester pt
;
156 object_seq_type parameter_tester_op
(
157 in object_struct_type inarg
,
158 inout object_array_type inoutarg
,
159 out object_union_type outarg
161 raises
(object_excep_type
);
165 local interface testlocal
170 union U
switch (Bool
)
198 interface if2
: ::i1
::if1
203 interface if3
: ::i2
::if2
209 /// Tests acceptance of legal redefinitions (of
210 /// constants, exceptions and types) in a derived
216 const long lconst
= -5;
229 interface derived
: base
231 const long lconst
= 44;
245 // Had to relocate the spot where the typedef is marked as
246 // having its arg traits instantiation already generated.
247 // Otherwise, when the scope of the base interface is visited
248 // as part of this process, we had infinite recursion and a
250 module Rec_Arg_Traits
254 typedef Rec_Arg_Traits
::base plan_stub_type
;
257 interface derived
: Rec_Arg_Traits
::base
259 void remove_task
(in plan_stub_type listener
);
263 // Test to validate that the generated code is compilable
264 // when we have an argument `call`
269 void do_op
(in string call
);
273 // Test that using an attribut call is working correctly
274 module call_attribute
278 attribute
string call
;