File: RDITestTypes.idl

package info (click to toggle)
omniorb-dfsg 4.3.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,172 kB
  • sloc: cpp: 115,843; python: 24,962; ansic: 13,414; sh: 2,665; makefile: 40
file content (89 lines) | stat: -rw-r--r-- 1,751 bytes parent folder | download | duplicates (11)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// some types used for testing

#ifndef _RDITestTypes_IDL_
#define _RDITestTypes_IDL_

// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"

#pragma prefix "research.att.com"

#ifdef _IDL_TO_JAVA
#pragma javaPackage "com.att.research"
#endif

module RDITestTypes {

  typedef string StringArrayFive[5];
  typedef string StringArrayTen[10];
 
  enum UnionSwitch { a, b, c, d, e};    
  union UnionType switch (UnionSwitch) {
       case a: long aLong;
       case b: string bString;
       case c: short cShort;
       case d: StringArrayFive dArray;
       default: boolean defaultBoolean;
  };

  typedef sequence<string> StringSeq;
  typedef sequence<double> DoubleSeq;

  union ExampleUnion1 switch(boolean) {
  case TRUE: long l;
  default: double d;
  };

  union ExampleUnion2 switch(long) {
  case 1: long l;
  case 2: double d;
  };

  union ExampleUnion3 switch(boolean) {
  case TRUE: long l;
  case FALSE: double d;
  };

#if 0
  // this idl is not legal ?
  union ExampleUnion4 switch(short) {
  case 0:
  case 2: string s;
  case 3: long l;
  case 5: double d;
  default: unsigned short u;
  };
#endif

  // no 'special' fieldd
  struct StructExample1 {
    double d;
  };

  // this has an event_name member
  struct StructExample2 {
    string event_name;
    double d;
  };

  // this has domain_name, type_name,
  // and filterable_data members, where
  // the filterable_data is not of the usual type
  struct StructExample3 {
    string domain_name;
    string type_name;
    string filterable_data;
    double d;
  };

  // a struct containing structs
  struct StructExample4 {
    StructExample1 part1;
    StructExample2 part2;
    StructExample3 part3;
  };

};

#endif