summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/param_test_i.h
blob: cdf667e8d9a6876a1cdd2ce1ca9e5cfa3464c97b (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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests/Param_Test
//
// = FILENAME
//    param_test_i.h
//
// = AUTHOR
//    Aniruddha Gokhale
//
// ============================================================================

#ifndef PARAM_TEST_I_H
#define PARAM_TEST_I_H

#include "param_testSer.h"

// Implementation of the Coffee interface
class Coffee_i : public POA_Coffee

{
public:
  Coffee_i (const char *name);
  // constructor

  ~Coffee_i (void);
  // destructor

  // =methods for the attribute

  virtual Coffee::Desc * description (CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // get attribute

  virtual void description (const Coffee::Desc &description,
                            CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // set attribute

private:
  CORBA::String_var name_;
  // my description
};

// the implementation of the Param_test interface
class Param_Test_i : public POA_Param_Test
{
  // = TITLE
  //    Param_Test_i
  // = DESCRIPTION
  //    Implementation of the Param_Test test suite.
public:
  Param_Test_i (const char *coffee_name,
                CORBA::ORB_ptr orb);
  // Constructor

  ~Param_Test_i (void);
  // Destructor

  virtual CORBA::Short test_short (CORBA::Short s1,
                                   CORBA::Short &s2,
                                   CORBA::Short_out s3,
                                   CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // test for shorts

  virtual CORBA::ULongLong test_ulonglong (CORBA::ULongLong s1,
                                           CORBA::ULongLong &s2,
                                           CORBA::ULongLong_out s3,
                                           CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // test for unsigned long long

  virtual char *test_unbounded_string (const char *s1,
                                       char *&s2,
                                       CORBA::String_out s3,
                                       CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // test for unbounded strings

  virtual char *test_bounded_string (const char *s1,
                                     char *&s2,
                                     CORBA::String_out s3,
                                     CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // test for bounded strings

  virtual Param_Test::Fixed_Struct
  test_fixed_struct (const Param_Test::Fixed_Struct &s1,
                     Param_Test::Fixed_Struct &s2,
                     Param_Test::Fixed_Struct_out s3,
                     CORBA::Environment &env)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // test for fixed structures

  // = Start of sequences tests...
  virtual Param_Test::Long_Seq * test_long_sequence (
      const Param_Test::Long_Seq & s1,
      Param_Test::Long_Seq & s2,
      Param_Test::Long_Seq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Bounded_Long_Seq * test_bounded_long_sequence (
      const Param_Test::Bounded_Long_Seq & s1,
      Param_Test::Bounded_Long_Seq & s2,
      Param_Test::Bounded_Long_Seq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Short_Seq * test_short_sequence (
      const Param_Test::Short_Seq & s1,
      Param_Test::Short_Seq & s2,
      Param_Test::Short_Seq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Bounded_Short_Seq * test_bounded_short_sequence (
          const Param_Test::Bounded_Short_Seq & s1,
      Param_Test::Bounded_Short_Seq & s2,
      Param_Test::Bounded_Short_Seq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::StrSeq * test_strseq (
      const Param_Test::StrSeq & s1,
      Param_Test::StrSeq & s2,
      Param_Test::StrSeq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Bounded_StrSeq * test_bounded_strseq (
      const Param_Test::Bounded_StrSeq & s1,
      Param_Test::Bounded_StrSeq & s2,
      Param_Test::Bounded_StrSeq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::StructSeq * test_struct_sequence (
      const Param_Test::StructSeq & s1,
      Param_Test::StructSeq & s2,
      Param_Test::StructSeq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::PathSpec * test_unbounded_struct_sequence (
      const Param_Test::PathSpec & s1,
      Param_Test::PathSpec & s2,
      Param_Test::PathSpec_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Bounded_StructSeq * test_bounded_struct_sequence (
      const Param_Test::Bounded_StructSeq & s1,
      Param_Test::Bounded_StructSeq & s2,
      Param_Test::Bounded_StructSeq_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Coffee_Mix * test_coffe_mix (
      const Param_Test::Coffee_Mix & s1,
      Param_Test::Coffee_Mix & s2,
      Param_Test::Coffee_Mix_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::Bounded_Coffee_Mix * test_bounded_coffe_mix (
      const Param_Test::Bounded_Coffee_Mix & s1,
      Param_Test::Bounded_Coffee_Mix & s2,
      Param_Test::Bounded_Coffee_Mix_out s3,
      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual Param_Test::AnySeq * test_anyseq (
          const Param_Test::AnySeq & s1,
          Param_Test::AnySeq & s2,
          Param_Test::AnySeq_out s3,
          CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // = End of sequences tests....

  virtual Param_Test::Var_Struct *
  test_var_struct (const Param_Test::Var_Struct &s1,
                   Param_Test::Var_Struct &s2,
                   Param_Test::Var_Struct_out s3,
                   CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for variable structs

  virtual Param_Test::Nested_Struct *
  test_nested_struct (const Param_Test::Nested_Struct &s1,
                      Param_Test::Nested_Struct &s2,
                      Param_Test::Nested_Struct_out s3,
                      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for nested structs

  virtual Param_Test::Recursive_Struct *
    test_recursive_struct (const Param_Test::Recursive_Struct &rs1,
                           Param_Test::Recursive_Struct &rs2,
                           Param_Test::Recursive_Struct_out rs3,
                           CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for recursive structs

  virtual Param_Test::Objref_Struct *
  test_objref_struct (const Param_Test::Objref_Struct &s1,
                      Param_Test::Objref_Struct &s2,
                      Param_Test::Objref_Struct_out s3,
                      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual Coffee_ptr
  make_coffee (CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // make a coffee object

  virtual Coffee_ptr
  test_objref (Coffee_ptr o1,
               Coffee_ptr &o2,
               Coffee_out o3,
               CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for object references

  virtual CORBA::TypeCode_ptr
  test_typecode (CORBA::TypeCode_ptr t1,
                 CORBA::TypeCode_ptr &o2,
                 CORBA::TypeCode_out o3,
                 CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for typecodes

  virtual CORBA::Any *
  test_any (const CORBA::Any &a1,
            CORBA::Any &a2,
            CORBA::Any_out a3,
            CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for Anys

  virtual Param_Test::Fixed_Array_slice *
  test_fixed_array (const Param_Test::Fixed_Array a1,
                    Param_Test::Fixed_Array a2,
                    Param_Test::Fixed_Array_out a3,
                    CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for fixed size arrays

  virtual Param_Test::Var_Array_slice *
  test_var_array (const Param_Test::Var_Array a1,
                  Param_Test::Var_Array a2,
                  Param_Test::Var_Array_out a3,
                  CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // test for arrays of variable types

  virtual CORBA::ULong test_exception (CORBA::ULong s1,
                                       CORBA::ULong& s2,
                                       CORBA::ULong_out s3,
                                       CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException,
                     Param_Test::Ooops));

  virtual Param_Test::Big_Union*
    test_big_union (const Param_Test::Big_Union& u1,
                    Param_Test::Big_Union& u2,
                    Param_Test::Big_Union_out u3,
                    CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual CORBA::Any*
    test_complex_any (const CORBA::Any &a1,
                      CORBA::Any &a2,
                      CORBA::Any_out a3,
                      CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));

# if 0
  // Test for multi dimensional arrays
  virtual Param_Test::Multdim_Array_slice *
  test_multdim_array (const Param_Test::Multdim_Array,
                      Param_Test::Multdim_Array ,
                      Param_Test::Multdim_Array_out ,
                      CORBA::Environment &)
    ACE_THROW_SPEC ((CORBA::SystemException));

#endif
  void shutdown (CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));


private:
  CORBA::ORB_var orb_;
  // Remember out ORB.

  Coffee_i obj_;
  // the coffee object reference we maintain
};

#endif /* PARAM_TEST_I_H */