summaryrefslogtreecommitdiff
path: root/tests/IDL_Test/old_union.idl
blob: e0f74ebca13821e08a8442c9fdab65aeaabfd7a4 (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

//=============================================================================
/**
 *  @file    old_union.idl
 *
 *  $Id$
 *
 *  Tests of union IDL constructs
 *
 *
 *  @author 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);
  };
};