summaryrefslogtreecommitdiff
path: root/CIAO/tests/Bug_3769_Regression/Foo.idl
blob: ff384c84fac4d192d1bb60dc02104a7356863cbe (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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#ifndef FOO_IDL_
#define FOO_IDL_

#include <Components.idl>

typedef sequence<short>  short_sequence;
typedef sequence<long>   long_sequence;
typedef sequence<float>  float_sequence;
typedef sequence<double> double_sequence;
typedef sequence<string> string_sequence;

typedef long long_array[5];
typedef unsigned long ulong_array[5];

typedef long long longlong_array[5];
typedef unsigned long long ulonglong_array[5];

typedef short short_array[5];
typedef unsigned short ushort_array[5];

typedef string string_array[2];
typedef wstring wstring_array[2];

typedef char char_array[2];
typedef wchar wchar_array[2];

typedef double double_array[3];
typedef long double longdouble_array[3];

typedef float float_array[3];
typedef boolean boolean_array[2];
typedef octet octet_array[2];

typedef string<50> bounded_string;
typedef wstring<50> bounded_wstring;
typedef sequence<bounded_string> sequence_bounded_string;
typedef sequence<bounded_wstring> sequence_bounded_wstring;
typedef sequence<bounded_string, 5> bounded_sequence_bounded_string;
typedef sequence<bounded_wstring, 5> bounded_sequence_bounded_wstring;
typedef bounded_string bounded_string_array[2];
typedef bounded_wstring bounded_wstring_array[2];

struct Bar
{
  short  s;
  long   l;
  float  f;
  double d;
};

typedef sequence<Bar, 5> BarSeq;
typedef Bar BarArray[3];

// Array in array
typedef BarArray BarArray2[2];

// Sequence in sequence
typedef sequence<string_sequence> string_sequence2;

// Sequence in array
typedef string_sequence SequenceArray[2];

// Array in sequence
typedef sequence<string_array> array_sequence;

struct Baz
{
  string name;
  BarSeq my_bar_sequence;
};

enum DataType
{
  dtEmpty,
  dtLong,
  dtShort
};

union Data switch (DataType)
{
  case dtLong: long longData;
  case dtShort: short shortData;
};

enum DataType2
{
  dtString,
  dtShortType
};

union Data2 switch (DataType2)
{
  case dtString: string stringData;
  case dtShortType: short shortData;
};

interface FooSupport
{
    attribute short supported_short;
};

module StructModule
{
  typedef unsigned long long Seconds;
  typedef unsigned long NanoSecs;

  struct Time
  {
    Seconds   sec;
    NanoSecs  nanosec;
  };

  enum EndTime
  {
    DLT_NONE,
    DLT_SOFT,
    DLT_HARD
  };

  struct StructStruct
  {
    Time    struct_time;
    EndTime type;
  };
};

struct BarStruct
{
  BarArray bar;
};

component Foo supports FooSupport
{
  attribute char    my_char;
  attribute octet   my_octet;
  attribute boolean my_boolean;
  attribute short   my_short;
  attribute long    my_long;
  attribute float   my_float;
  attribute double  my_double;
  attribute unsigned long my_ulong;
  attribute long long my_longlong;
  attribute unsigned long long my_ulonglong;
  attribute char    my_default_char;
  attribute octet   my_default_octet;
  attribute boolean my_default_boolean;
  attribute short   my_default_short;
  attribute long    my_default_long;
  attribute float   my_default_float;
  attribute double  my_default_double;
  attribute unsigned long my_default_ulong;
  attribute long long my_default_longlong;
  attribute unsigned long long my_default_ulonglong;
  attribute long double     my_longdouble;
  attribute long double     my_default_longdouble;
  attribute bounded_string  my_bounded_string;
  attribute string          my_variable_string;
  attribute string          my_default_variable_string;
  attribute bounded_wstring my_bounded_wstring;
  attribute wstring         my_variable_wstring;

  attribute long_array        my_long_array;
  attribute ulong_array       my_ulong_array;
  attribute longlong_array    my_longlong_array;
  attribute ulonglong_array   my_ulonglong_array;
  attribute short_array       my_short_array;
  attribute ushort_array      my_ushort_array;
  attribute string_array      my_string_array;
  attribute wstring_array     my_wstring_array;
  attribute char_array        my_char_array;
  attribute wchar_array       my_wchar_array;
  attribute double_array      my_double_array;
  attribute longdouble_array  my_longdouble_array;
  attribute float_array       my_float_array;
  attribute boolean_array     my_boolean_array;
  attribute octet_array       my_octet_array;

  attribute short_sequence    my_short_sequence;
  attribute short_sequence    my_empty_sequence;
  attribute long_sequence     my_long_sequence;
  attribute float_sequence    my_float_sequence;
  attribute double_sequence   my_double_sequence;
  attribute string_sequence   my_string_sequence;
  attribute string_sequence2  my_string_sequence_2;
  attribute array_sequence    my_array_sequence;

  attribute Bar           my_bar_struct;
  attribute Bar           my_default_bar_struct;
  attribute BarArray      my_bar_array;
  attribute BarArray2     my_bar_array_2;
  attribute SequenceArray my_sequence_array;
  attribute BarStruct     my_bar_struct_array;
  attribute Baz           my_baz_struct;
  attribute Data          my_data_union;
  attribute Data2         my_var_data_union;
  attribute StructModule::StructStruct my_struct_struct;

  attribute sequence_bounded_string my_sequence_bounded_string;
  attribute sequence_bounded_wstring my_sequence_bounded_wstring;
  attribute bounded_sequence_bounded_string my_bounded_sequence_bounded_string;
  attribute bounded_sequence_bounded_wstring my_bounded_sequence_bounded_wstring;
  attribute bounded_string_array my_bounded_string_array;
  attribute bounded_wstring_array my_bounded_wstring_array;
};

#endif /* FOO_IDL_ */