summaryrefslogtreecommitdiff
path: root/ACE/TAO/tests/IDL_Test/old_union2.idl
blob: 9fd2dd2c645ece23ce679e4e0ba7b349de927edb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests/IDL_Test
//
// = FILENAME
//    old_union2.idl
//
// = DESCRIPTION
//    Further tests of union IDL constructs
//
// = AUTHORS
//    Andy Gokhale <gokhale@dre.vanderbilt.edu>
//
// ============================================================================

module OldUnion2
{
  enum FooDisc
  {
    FOO1,
    FOO2
  };

  union Foo switch (FooDisc)
  {
    case FOO1: long x;
    case FOO2: string y;
  };

  struct Bar
  {
    enum BarDisc
    {
      BAR1,
      BAR2
    } kind;

    union Foo switch (BarDisc)
    {
      case BAR1: long x;
      case BAR2: long y;
    } addr;
  };
};