summaryrefslogtreecommitdiff
path: root/CIAO/tests/IDL_Test/NonTopic_Connector/NonTopic_Base.idl
blob: a4df5217a46fa695e97440a51653c6fb51755873 (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
54
55
56
57
58
59
60
61
62
/**
 * @file NonTopic_Base.idl
 * @author
 */

#ifndef NONTOPIC_IDL
#define NONTOPIC_IDL


  //Variable length structure
  struct X {
    string color;
    long a;
    long b;
  };
  typedef sequence<X> XSeq;

  //Fixed length structure
  struct Y {
    double c;
    long d;
  };
  typedef sequence<Y> YSeq;

  //string, always variable length type
   typedef string Z;
   typedef sequence<Z> ZSeq;

  // Sequence, always variable length type
   struct test {
     short x_test;
     string x_teststr;
   };
   typedef sequence<test> testSeq;
   typedef sequence<testSeq> testSeqSeq;

   // Enum, always fixed length type
   enum test_enum
   {
     ZERO,
     ONE,
     TWO
   };
   typedef test_enum testEnum;
   typedef sequence<testEnum> testEnumSeq;

    //array, here fixed length type
    typedef short short_array[5];
    typedef short_array testArray;
    typedef sequence<testArray> testArraySeq;

    // Union,  here variable length type
     union X_Union switch (short) {
       case 0:
         string x_test;
       case 1:
         long   x_long;
     };
     typedef X_Union testUnion;
     typedef sequence<testUnion> testUnionSeq;

#endif