2 //=============================================================================
6 * @author Aniruddha Gokhale
8 //=============================================================================
11 #ifndef PARAM_TEST_I_H
12 #define PARAM_TEST_I_H
14 #include "param_testS.h"
16 // Implementation of the Coffee interface
17 class Coffee_i
: public POA_Coffee
22 Coffee_i (const char *name
);
27 // =methods for the attribute
30 virtual Coffee::Desc
* description ();
33 virtual void description (const Coffee::Desc
&description
);
37 CORBA::String_var name_
;
40 // the implementation of the Param_test interface
46 * Implementation of the Param_Test test suite.
48 class Param_Test_i
: public POA_Param_Test
52 Param_Test_i (const char *coffee_name
,
59 virtual CORBA::Short
test_short (CORBA::Short s1
,
63 /// test for unsigned long long
64 virtual CORBA::ULongLong
test_ulonglong (CORBA::ULongLong s1
,
66 CORBA::ULongLong_out s3
);
68 /// test for unbounded strings
69 virtual char *test_unbounded_string (const char *s1
,
71 CORBA::String_out s3
);
73 /// test for bounded strings
74 virtual char *test_bounded_string (const char *s1
,
76 CORBA::String_out s3
);
78 /// test for unbounded wstrings
79 virtual CORBA::WChar
*test_unbounded_wstring (const CORBA::WChar
*ws1
,
81 CORBA::WString_out ws3
);
83 /// test for bounded wstrings
84 virtual CORBA::WChar
*test_bounded_wstring (const CORBA::WChar
*ws1
,
86 CORBA::WString_out ws3
);
88 /// test for fixed structures
89 virtual Param_Test::Fixed_Struct
90 test_fixed_struct (const Param_Test::Fixed_Struct
&s1
,
91 Param_Test::Fixed_Struct
&s2
,
92 Param_Test::Fixed_Struct_out s3
);
94 // = Start of sequences tests...
95 /// = End of sequences tests....
96 virtual CORBA::LongSeq
* test_long_sequence (
97 const CORBA::LongSeq
& s1
,
99 CORBA::LongSeq_out s3
);
100 virtual Param_Test::Bounded_Long_Seq
* test_bounded_long_sequence (
101 const Param_Test::Bounded_Long_Seq
& s1
,
102 Param_Test::Bounded_Long_Seq
& s2
,
103 Param_Test::Bounded_Long_Seq_out s3
);
104 virtual CORBA::ShortSeq
* test_short_sequence (
105 const CORBA::ShortSeq
& s1
,
106 CORBA::ShortSeq
& s2
,
107 CORBA::ShortSeq_out s3
);
108 virtual Param_Test::Bounded_Short_Seq
* test_bounded_short_sequence (
109 const Param_Test::Bounded_Short_Seq
& s1
,
110 Param_Test::Bounded_Short_Seq
& s2
,
111 Param_Test::Bounded_Short_Seq_out s3
);
112 virtual CORBA::StringSeq
* test_strseq (
113 const CORBA::StringSeq
& s1
,
114 CORBA::StringSeq
& s2
,
115 CORBA::StringSeq_out s3
);
116 virtual Param_Test::Bounded_StrSeq
* test_bounded_strseq (
117 const Param_Test::Bounded_StrSeq
& s1
,
118 Param_Test::Bounded_StrSeq
& s2
,
119 Param_Test::Bounded_StrSeq_out s3
);
120 virtual CORBA::WStringSeq
* test_wstrseq (
121 const CORBA::WStringSeq
& ws1
,
122 CORBA::WStringSeq
& ws2
,
123 CORBA::WStringSeq_out ws3
);
124 virtual Param_Test::Bounded_WStrSeq
* test_bounded_wstrseq (
125 const Param_Test::Bounded_WStrSeq
& ws1
,
126 Param_Test::Bounded_WStrSeq
& ws2
,
127 Param_Test::Bounded_WStrSeq_out ws3
);
128 virtual Param_Test::StructSeq
* test_struct_sequence (
129 const Param_Test::StructSeq
& s1
,
130 Param_Test::StructSeq
& s2
,
131 Param_Test::StructSeq_out s3
);
132 virtual Param_Test::PathSpec
* test_unbounded_struct_sequence (
133 const Param_Test::PathSpec
& s1
,
134 Param_Test::PathSpec
& s2
,
135 Param_Test::PathSpec_out s3
);
136 virtual Param_Test::Bounded_StructSeq
* test_bounded_struct_sequence (
137 const Param_Test::Bounded_StructSeq
& s1
,
138 Param_Test::Bounded_StructSeq
& s2
,
139 Param_Test::Bounded_StructSeq_out s3
);
140 virtual Param_Test::ArraySeq
* test_array_sequence (
141 const Param_Test::ArraySeq
& s1
,
142 Param_Test::ArraySeq
& s2
,
143 Param_Test::ArraySeq_out s3
);
144 virtual Param_Test::Bounded_ArraySeq
* test_bounded_array_sequence (
145 const Param_Test::Bounded_ArraySeq
& s1
,
146 Param_Test::Bounded_ArraySeq
& s2
,
147 Param_Test::Bounded_ArraySeq_out s3
);
148 virtual Param_Test::Coffee_Mix
* test_coffe_mix (
149 const Param_Test::Coffee_Mix
& s1
,
150 Param_Test::Coffee_Mix
& s2
,
151 Param_Test::Coffee_Mix_out s3
);
152 virtual Param_Test::Bounded_Coffee_Mix
* test_bounded_coffe_mix (
153 const Param_Test::Bounded_Coffee_Mix
& s1
,
154 Param_Test::Bounded_Coffee_Mix
& s2
,
155 Param_Test::Bounded_Coffee_Mix_out s3
);
156 virtual CORBA::AnySeq
* test_anyseq (
157 const CORBA::AnySeq
& s1
,
159 CORBA::AnySeq_out s3
);
161 /// test for variable structs
162 virtual Param_Test::Var_Struct
*
163 test_var_struct (const Param_Test::Var_Struct
&s1
,
164 Param_Test::Var_Struct
&s2
,
165 Param_Test::Var_Struct_out s3
);
167 /// test for nested structs
168 virtual Param_Test::Nested_Struct
*
169 test_nested_struct (const Param_Test::Nested_Struct
&s1
,
170 Param_Test::Nested_Struct
&s2
,
171 Param_Test::Nested_Struct_out s3
);
173 /// test for recursive structs
174 virtual Param_Test::Recursive_Struct
*
175 test_recursive_struct (const Param_Test::Recursive_Struct
&rs1
,
176 Param_Test::Recursive_Struct
&rs2
,
177 Param_Test::Recursive_Struct_out rs3
);
179 virtual Param_Test::Objref_Struct
*
180 test_objref_struct (const Param_Test::Objref_Struct
&s1
,
181 Param_Test::Objref_Struct
&s2
,
182 Param_Test::Objref_Struct_out s3
);
184 /// make a coffee object
188 /// test for object references
190 test_objref (Coffee_ptr o1
,
194 /// test for typecodes
195 virtual CORBA::TypeCode_ptr
196 test_typecode (CORBA::TypeCode_ptr t1
,
197 CORBA::TypeCode_ptr
&o2
,
198 CORBA::TypeCode_out o3
);
202 test_any (const CORBA::Any
&a1
,
206 /// test for fixed size arrays
207 virtual Param_Test::Fixed_Array_slice
*
208 test_fixed_array (const Param_Test::Fixed_Array a1
,
209 Param_Test::Fixed_Array a2
,
210 Param_Test::Fixed_Array_out a3
);
212 /// test for arrays of variable types
213 virtual Param_Test::Var_Array_slice
*
214 test_var_array (const Param_Test::Var_Array a1
,
215 Param_Test::Var_Array a2
,
216 Param_Test::Var_Array_out a3
);
218 virtual CORBA::ULong
test_exception (CORBA::ULong s1
,
220 CORBA::ULong_out s3
);
222 virtual Param_Test::Big_Union
*
223 test_big_union (const Param_Test::Big_Union
& u1
,
224 Param_Test::Big_Union
& u2
,
225 Param_Test::Big_Union_out u3
);
227 virtual Param_Test::Small_Union
228 test_small_union (const Param_Test::Small_Union
& u1
,
229 Param_Test::Small_Union
& u2
,
230 Param_Test::Small_Union_out u3
);
232 virtual Param_Test::Recursive_Union
*
233 test_recursive_union (const Param_Test::Recursive_Union
& ru1
,
234 Param_Test::Recursive_Union
& ru2
,
235 Param_Test::Recursive_Union_out ru3
);
238 test_complex_any (const CORBA::Any
&a1
,
242 // Test for multi dimensional arrays
243 virtual Param_Test::Multdim_Array_slice
*
244 test_multdim_array (const Param_Test::Multdim_Array
,
245 Param_Test::Multdim_Array
,
246 Param_Test::Multdim_Array_out
);
252 /// Remember out ORB.
255 /// the coffee object reference we maintain
259 * Called by test_exception. This will avoid the compiler
260 * warning that test_exception is throwing an exception
261 * not in its THROW_SPEC, but still test TAO's
262 * conversion of such an exception to UNKNOWN.
264 void throw_badboy ();
267 #endif /* PARAM_TEST_I_H */