summaryrefslogtreecommitdiff
path: root/modules/CIAO/tests/IDL_Test/Cornucopia/Cornucopia.idl
blob: be2751bacfbfcfadeb048a40d2a1ea0331be1497 (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
// $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);
};

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

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

eventtype pubtype {};
eventtype emittype {};
eventtype eattype {};

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;
    publishes pubtype pubtype_publisher;
    emits emittype emittype_emitter;
    consumes eattype eattype_consumer;
    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      
  };
};