summaryrefslogtreecommitdiff
path: root/TAO/tests/DynAny_Test/da_tests.idl
blob: 4d0e5d4747fdc75aadbeebf1e9acf077e5f37751 (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
/* -*- C++ -*- */
//
// $Id$

#include <orb.idl>

module DynAnyTests
{
  struct enclosed_struct
  {
    float f;
    short s;
  };

  struct test_struct
  {
    char c;
    long l;
    enclosed_struct es;
  };

  typedef sequence<string<8> > test_seq;
  typedef sequence<short> SeqShort;

  const unsigned long DIM = 2;
  typedef long test_array [DIM];

  enum test_enum
  {
    TE_ZEROTH,
    TE_FIRST,
    TE_SECOND,
    TE_THIRD,
    TE_FOURTH
  };

  union test_union switch (test_enum)
  {
    case TE_SECOND: CORBA::TypeCode tc;
    case TE_FOURTH: test_enum te;
    default: short s;
    case TE_THIRD: string str;
    case TE_ZEROTH: octet o;
  };

  typedef test_struct test_struct_alias;
  typedef test_union test_union_alias;

  union test_implicit_def switch (boolean) {
    case TRUE :
       test_enum tenum;
  } ;
};