Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tests / IDL_Test / nested_scope.idl
blob46697b2d1bbb195fbcc8b2357e75da999e74cda7
2 //=============================================================================
3 /**
4 * @file nested_scope.idl
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
9 * stay fixed.
12 * @author Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
14 //=============================================================================
17 // Tests all the problem datatypes for repeating a scope
18 // name after skipping one nesting level.
20 module skip
22 module hump
24 struct skip {short s;};
28 module u_skip
30 module u_hump
32 union u_skip switch (short)
34 case 0: short s;
39 module e_skip
41 module e_hump
43 exception e_skip {};
47 module i_skip
49 module i_hump
51 interface i_skip {};
55 module pre_u_skip
57 module pre_u_hump
59 typedef sequence<long> pre_u_skip;
63 module pre_b_skip
65 module pre_b_hump
67 typedef sequence<long, 3> pre_b_skip;
71 module str_u_skip
73 module str_u_hump
75 typedef sequence<string> str_u_skip;
79 module str_b_skip
81 module str_b_hump
83 typedef sequence<string, 3> str_b_skip;
87 module wstr_u_skip
89 module wstr_u_hump
91 typedef sequence<wstring> wstr_u_skip;
95 module wstr_b_skip
97 module wstr_b_hump
99 typedef sequence<wstring, 3> wstr_b_skip;
103 interface bloo {};
105 module obj_u_skip
107 module obj_u_hump
109 typedef sequence<bloo> obj_u_skip;
113 module obj_b_skip
115 module obj_b_hump
117 typedef sequence<bloo> obj_b_skip;
121 module bug_1985_a
123 module b
125 interface something {};
129 module bug_1985_c
131 module d
133 interface something : bug_1985_a::b::something {};
137 // This one caused several problems - in the stub declaration of
138 // the operation, and in the skeleton body's allocation of return type.
139 module Negotiator
141 interface UAV_Negotiator {};
143 interface UAV_Negotiator_Factory : ::Negotiator::UAV_Negotiator
145 ::Negotiator::UAV_Negotiator make_negotiator (in string bitrate_sc);
149 // Caught some generation of arg helper template parameters not using
150 // the qualifying '::' on scoped names.
152 module bug_2125
154 module Bar
156 enum Stuff {ONE, TWO};
160 module Wow
162 module bug_2125
164 interface MyInterface
166 // @@ (JP 06/04/07) I'm commenting out the line below, since
167 // according to IDL scoping rules (CORBA 3.0.3, sections
168 // 3.20.1 and 3.20.2), the module Wow::bug_2125 hides the
169 // global module bug_2125 and so the lookup should fail.
170 // Not removing the line completely in case someday we
171 // extend IDL_Test to check for rejection of illegal IDL.
172 // void op1 (in bug_2125::Bar::Stuff fbs);
173 void op2 (in ::bug_2125::Bar::Stuff fbs);
178 // This will ensure that we always put the '::'
179 // before the 'CORBA' on predefined types.
180 module Company
182 module CORBA
184 typedef unsigned long LongU;
186 module Inner
188 struct Foo
190 boolean x;