//============================================================================= /** * @file nested_scope.idl * * $Id$ * * This file contains examples of IDL code that has * caused problems in the past for the TAO IDL * compiler. This test is to make sure the problems * stay fixed. * * * @author Jeff Parsons and TAO users. */ //============================================================================= // Tests all the problem datatypes for repeating a scope // name after skipping one nesting level. module skip { module hump { struct skip {short s;}; }; }; module u_skip { module u_hump { union u_skip switch (short) { case 0: short s; }; }; }; module e_skip { module e_hump { exception e_skip {}; }; }; module i_skip { module i_hump { interface i_skip {}; }; }; module pre_u_skip { module pre_u_hump { typedef sequence pre_u_skip; }; }; module pre_b_skip { module pre_b_hump { typedef sequence pre_b_skip; }; }; module str_u_skip { module str_u_hump { typedef sequence str_u_skip; }; }; module str_b_skip { module str_b_hump { typedef sequence str_b_skip; }; }; module wstr_u_skip { module wstr_u_hump { typedef sequence wstr_u_skip; }; }; module wstr_b_skip { module wstr_b_hump { typedef sequence wstr_b_skip; }; }; interface bloo {}; module obj_u_skip { module obj_u_hump { typedef sequence obj_u_skip; }; }; module obj_b_skip { module obj_b_hump { typedef sequence obj_b_skip; }; }; module bug_1985_a { module b { interface something {}; }; }; module bug_1985_c { module d { interface something : bug_1985_a::b::something {}; }; }; // This one caused several problems - in the stub declaration of // the operation, and in the skeleton body's allocation of return type. module Negotiator { interface UAV_Negotiator {}; interface UAV_Negotiator_Factory : ::Negotiator::UAV_Negotiator { ::Negotiator::UAV_Negotiator make_negotiator (in string bitrate_sc); }; }; // Caught some generation of arg helper template parameters not using // the qualifying '::' on scoped names. module bug_2125 { module Bar { enum Stuff {ONE, TWO}; }; }; module Wow { module bug_2125 { interface MyInterface { // @@ (JP 06/04/07) I'm commenting out the line below, since // according to IDL scoping rules (CORBA 3.0.3, sections // 3.20.1 and 3.20.2), the module Wow::bug_2125 hides the // global module bug_2125 and so the lookup should fail. // Not removing the line completely in case someday we // extend IDL_Test to check for rejection of illegal IDL. // void op1 (in bug_2125::Bar::Stuff fbs); void op2 (in ::bug_2125::Bar::Stuff fbs); }; }; }; // This will ensure that we always put the '::' // before the 'CORBA' on predefined types. module Company { module CORBA { typedef unsigned long LongU; module Inner { struct Foo { boolean x; }; }; }; };