summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Test/old_union.idl
blob: 163d3db67ee8f3256e15e8390d08a773c2e16b24 (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
48
49
50
51
52
53
// $Id$

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

module OldUnion
{
  struct Bar
  {
    long b1;
    char b2;
  };

  union Foo switch (long)
  {
    case 1: long x;
    case 2: Bar y;
    default: char z;
  };


  union Foo2 switch (char)
  {
    case 'a': long x;
    case 'b': Foo y;
  };

  interface a
  {
    struct astruct
    {
      Foo2 a1;
      Foo  a2;
      Bar  a3;
    };

    Foo2 opA (in astruct b);
  };
};