summaryrefslogtreecommitdiff
path: root/CIAO/tests/IDL_Test/Cornucopia/Cornucopia.idl
blob: b3fd614e74d0525f54cc0037e7c93ef82ea73486 (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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
// $Id$
/**
 * @file Cornucopia.idl
 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
 *
 * Tests TAO_IDL generation of CIAO servant, executor IDL
 * and executor implementation stencil for a variety of
 * IDL3 constructs.
 */

#include <Components.idl>

module Supported
{
  interface IfacePawPaw
  {
    long paw_paw_op (out short spew);
    attribute boolean inbred;
  };

  interface IfaceMom : IfacePawPaw
  {
    readonly attribute wchar uni_tag;
    IfacePawPaw get_paw_paw ();
  };

  interface IfaceDad : IfacePawPaw
  {
    attribute string msg;
    long long get_big_int (in IfacePawPaw genealogy);
  };

  interface Iface : IfaceMom, IfaceDad
  {
    attribute wstring uni_uuid;
    void supported_op (inout unsigned long index);
  };
};

interface pface {};
interface uface {};
interface umface {};

abstract interface IfAb
{
  long op (out long value);
  attribute long attr;
};

interface IfConcr : IfAb
{
  long concr_op (out long value);
  attribute long concr_attr;
};

#if !defined (CCM_LW)
valuetype pkey : Components::PrimaryKeyBase
{
  public string info;
};
#endif

#if !defined (CCM_NOEVENT)
eventtype pubtype {};
eventtype emittype {};
eventtype eattype {};
#endif

exception BadGet {};
exception BadSet {};
exception Whatever {};

module BaseMod
{
component CompBase supports Supported::Iface
  {
    attribute octet the_byte
      getraises (BadGet, Whatever) setraises (BadSet);
  };
};

enum Color
{
  RED,
  WHITE,
  BLUE
};

module T2
{
  interface Write
  {
  };

  porttype MyPort
  {
    uses Write writer;
  };

  component Base
  {
    port MyPort usage;
    attribute string topic_name;
  };

  component Derived : Base
  {
  };
};

module LocalMod
{
  local interface L1
  {
  };

  local interface L2
  {
    L1 getL1();
    void setL1 (in L1 x);
  };

  component CombLocal
  {
    provides L1 x;
    uses L2 y;
  };

  component CombLocal2
  {
    uses L1 x;
    provides L2 y;
  };

  porttype L3
  {
    provides L1 x;
    uses L2 y;
  };

  component CombLocal4
  {
    port L3 z;
    mirrorport L3 z2;
  };

  component CombLocal3
  {
    mirrorport L3 z;
    port L3 z2;
  };
};

module DerivedMod
{
  porttype CombinedPort
  {
    provides pface pface_provider;
    uses uface uface_user;
    uses multiple umface umface_umuser;
  };

  component CompCombinedPort
  {
    port CombinedPort cc;
  };

  component MirrorCompCombinedPort
  {
    mirrorport CombinedPort cc;
  };

  component CompDerived : BaseMod::CompBase
  {
    attribute Color stripe;
    provides pface pface_provider;
    uses uface uface_user;
    uses multiple umface umface_umuser;
#if !defined (CCM_NOEVENT)
    publishes pubtype pubtype_publisher;
    emits emittype emittype_emitter;
    consumes eattype eattype_consumer;
#endif
    uses IfConcr ccre_user;
  };
};

module HomeMod
{
  home CompBaseHome supports Supported::Iface manages BaseMod::CompBase
  {
    readonly attribute Color shade;
    pface fetch_managed_ports (out uface recep);
    factory base_init (in string id, in unsigned short uni_raw)
      raises (Whatever);
    finder bathroom_sink ();
  };

  home CompDerivedHome : CompBaseHome manages DerivedMod::CompDerived
  {
    exception ch_except {};
    void ch_op () raises (ch_except);
    factory def_init ();
#if !defined (CCM_LW)
    finder kitchen_sink (in string uid, in pkey key, in boolean all)
      raises (ch_except);
#endif
  };
};

module X
{
  module Typed <typename Data, sequence<Data> DataSeq>
  {
    local interface XXXX
    {
      void y (in Data ab);
    };
  };
};

module Y
{
  module Typed <typename T, sequence<T> TSeq>
  {
    alias ::X::Typed<T, TSeq> X_Typed;
  };
};

struct Hello
{
  long a;
};

typedef sequence<Hello> HelloSeq;
module ::Y::Typed < ::Hello, ::HelloSeq> HelloSpace;

module ZZ
{
  module DDSE <typename T, sequence<T> TSeq> {
    local interface Read
    {
      void op ();
    };
  };
  module DDSX <typename T, sequence<T> TSeq> {
    alias DDSE <T, TSeq> EX;
    typedef EX::Read Read;
  };
};

module YY
{
  module DDSY <typename T, sequence<T> TSeq> {
    alias ZZ::DDSX <T, TSeq> EX2;
  };
};

module ZZ::DDSX < ::Hello, ::HelloSeq> ZZDDSX;

module YY::DDSY < ::Hello, ::HelloSeq> ZZDDSY;

module FooConnector_T<interface T, interface AMI4CCM_T>
{
  porttype AMI4CCM_Port_Type
  {
    provides AMI4CCM_T ami4ccm_provides;
    provides T         ami4ccm_sync_provides;
    uses T ami4ccm_uses;
  };
  connector AMI4CCM_Connector
  {
    port AMI4CCM_Port_Type ami4ccm_port;
  };
};

module FooConnector_T<Supported::IfacePawPaw, Supported::IfacePawPaw> FooPawPaw;