Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / AnyTypeCode / BasicTypeTraits.h
blob88a08d2a62707c505711ea22bfb4dd2e4411bf7d
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file BasicTypeTraits.h
7 * Specializations of template traits in BasicTypeTraits_T.h.
9 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
11 //=============================================================================
13 #ifndef BASIC_TYPE_TRAITS_H
14 #define BASIC_TYPE_TRAITS_H
16 #include "tao/AnyTypeCode/BasicTypeTraits_T.h"
17 #include "tao/AnyTypeCode/Any.h"
19 #include "tao/Typecode_typesC.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 namespace CORBA
29 class TypeCode;
30 typedef TypeCode * TypeCode_ptr;
32 class BooleanSeq;
33 class CharSeq;
34 class OctetSeq;
35 class WCharSeq;
36 class ShortSeq;
37 class UShortSeq;
38 class LongSeq;
39 class ULongSeq;
40 class LongLongSeq;
41 class ULongLongSeq;
42 class FloatSeq;
43 class DoubleSeq;
44 class LongDoubleSeq;
45 class AnySeq;
48 namespace TAO
50 template<>
51 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Boolean>
53 static CORBA::TypeCode_ptr const tc_value;
54 static CORBA::TCKind const tckind_value;
56 typedef CORBA::Any::from_boolean insert_type;
57 typedef CORBA::Any::to_boolean extract_type;
58 typedef CORBA::Boolean return_type;
60 static return_type convert (extract_type& et);
63 template<>
64 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Octet>
66 static CORBA::TypeCode_ptr const tc_value;
67 static CORBA::TCKind const tckind_value;
69 typedef CORBA::Any::from_octet insert_type;
70 typedef CORBA::Any::to_octet extract_type;
71 typedef CORBA::Octet return_type;
73 static return_type convert (extract_type& et);
76 template<>
77 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Char>
79 static CORBA::TypeCode_ptr const tc_value;
80 static CORBA::TCKind const tckind_value;
82 typedef CORBA::Any::from_char insert_type;
83 typedef CORBA::Any::to_char extract_type;
84 typedef CORBA::Char return_type;
86 static return_type convert (extract_type& et);
89 #if (defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)) && !defined (ACE_LACKS_NATIVE_WCHAR_T)
90 template<>
91 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::WChar>
93 static CORBA::TypeCode_ptr const tc_value;
94 static CORBA::TCKind const tckind_value;
96 typedef CORBA::Any::from_wchar insert_type;
97 typedef CORBA::Any::to_wchar extract_type;
98 typedef CORBA::WChar return_type;
100 static return_type convert (extract_type& et);
102 #endif
104 template<>
105 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Short>
107 static CORBA::TypeCode_ptr const tc_value;
108 static CORBA::TCKind const tckind_value;
110 typedef CORBA::Short insert_type;
111 typedef CORBA::Short extract_type;
112 typedef CORBA::Short return_type;
114 static return_type convert (extract_type& et);
117 template<>
118 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::UShort>
120 static CORBA::TypeCode_ptr const tc_value;
121 static CORBA::TCKind const tckind_value;
123 typedef CORBA::UShort insert_type;
124 typedef CORBA::UShort extract_type;
125 typedef CORBA::UShort return_type;
127 static return_type convert (extract_type& et);
130 template<>
131 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Long>
133 static CORBA::TypeCode_ptr const tc_value;
134 static CORBA::TCKind const tckind_value;
136 typedef CORBA::Long insert_type;
137 typedef CORBA::Long extract_type;
138 typedef CORBA::Long return_type;
140 static return_type convert (extract_type& et);
143 template<>
144 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULong>
146 static CORBA::TypeCode_ptr const tc_value;
147 static CORBA::TCKind const tckind_value;
149 typedef CORBA::ULong insert_type;
150 typedef CORBA::ULong extract_type;
151 typedef CORBA::ULong return_type;
153 static return_type convert (extract_type& et);
156 template<>
157 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongLong>
159 static CORBA::TypeCode_ptr const tc_value;
160 static CORBA::TCKind const tckind_value;
162 typedef CORBA::LongLong insert_type;
163 typedef CORBA::LongLong extract_type;
164 typedef CORBA::LongLong return_type;
166 static return_type convert (extract_type& et);
169 template<>
170 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULongLong>
172 static CORBA::TypeCode_ptr const tc_value;
173 static CORBA::TCKind const tckind_value;
175 typedef CORBA::ULongLong insert_type;
176 typedef CORBA::ULongLong extract_type;
177 typedef CORBA::ULongLong return_type;
179 static return_type convert (extract_type& et);
182 template<>
183 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Float>
185 static CORBA::TypeCode_ptr const tc_value;
186 static CORBA::TCKind const tckind_value;
188 typedef CORBA::Float insert_type;
189 typedef CORBA::Float extract_type;
190 typedef CORBA::Float return_type;
192 static return_type convert (extract_type& et);
195 template<>
196 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Double>
198 static CORBA::TypeCode_ptr const tc_value;
199 static CORBA::TCKind const tckind_value;
201 typedef CORBA::Double insert_type;
202 typedef CORBA::Double extract_type;
203 typedef CORBA::Double return_type;
205 static return_type convert (extract_type& et);
208 template<>
209 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongDouble>
211 static CORBA::TypeCode_ptr const tc_value;
212 static CORBA::TCKind const tckind_value;
214 typedef CORBA::LongDouble insert_type;
215 typedef CORBA::LongDouble extract_type;
216 typedef CORBA::LongDouble return_type;
218 static return_type convert (extract_type& et);
221 template<>
222 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Char *>
224 static CORBA::TypeCode_ptr const tc_value;
225 static CORBA::TCKind const tckind_value;
227 typedef CORBA::Char * insert_type;
228 typedef const CORBA::Char * extract_type;
229 typedef const CORBA::Char * return_type;
231 static return_type convert (extract_type& et);
234 template<>
235 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::WChar *>
237 static CORBA::TypeCode_ptr const tc_value;
238 static CORBA::TCKind const tckind_value;
240 typedef CORBA::WChar * insert_type;
241 typedef const CORBA::WChar * extract_type;
242 typedef const CORBA::WChar * return_type;
244 static return_type convert (extract_type& et);
247 template<>
248 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Any>
250 static CORBA::TypeCode_ptr const tc_value;
251 static CORBA::TCKind const tckind_value;
253 typedef CORBA::Any insert_type;
254 typedef const CORBA::Any * extract_type;
255 typedef const CORBA::Any * return_type;
257 static return_type convert (extract_type& et);
260 template<>
261 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Object_ptr>
263 static CORBA::TypeCode_ptr const tc_value;
264 static CORBA::TCKind const tckind_value;
266 typedef CORBA::Object_ptr insert_type;
267 typedef CORBA::Object_ptr extract_type;
268 typedef CORBA::Object_ptr return_type;
270 static return_type convert (extract_type& et);
273 template<>
274 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::TypeCode_ptr>
276 static CORBA::TypeCode_ptr const tc_value;
277 static CORBA::TCKind const tckind_value;
279 typedef CORBA::TypeCode_ptr insert_type;
280 typedef const CORBA::TypeCode_ptr extract_type;
281 typedef CORBA::TypeCode_ptr return_type;
283 static return_type convert (extract_type& et);
286 template<>
287 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::BooleanSeq>
289 static CORBA::TypeCode_ptr const tc_value;
290 static CORBA::TCKind const tckind_value;
292 typedef CORBA::BooleanSeq insert_type;
293 typedef const CORBA::BooleanSeq * extract_type;
294 typedef const CORBA::BooleanSeq * return_type;
296 static return_type convert (extract_type& et);
299 template<>
300 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::OctetSeq>
302 static CORBA::TypeCode_ptr const tc_value;
303 static CORBA::TCKind const tckind_value ;
305 typedef CORBA::OctetSeq insert_type;
306 typedef const CORBA::OctetSeq * extract_type;
307 typedef const CORBA::OctetSeq * return_type;
309 static return_type convert (extract_type& et);
312 template<>
313 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::CharSeq>
315 static CORBA::TypeCode_ptr const tc_value;
316 static CORBA::TCKind const tckind_value;
318 typedef CORBA::CharSeq insert_type;
319 typedef const CORBA::CharSeq * extract_type;
320 typedef const CORBA::CharSeq * return_type;
322 static return_type convert (extract_type& et);
325 template<>
326 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::WCharSeq>
328 static CORBA::TypeCode_ptr const tc_value;
329 static CORBA::TCKind const tckind_value;
331 typedef CORBA::WCharSeq insert_type;
332 typedef const CORBA::WCharSeq * extract_type;
333 typedef const CORBA::WCharSeq * return_type;
335 static return_type convert (extract_type& et);
338 template<>
339 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ShortSeq>
341 static CORBA::TypeCode_ptr const tc_value;
342 static CORBA::TCKind const tckind_value;
344 typedef CORBA::ShortSeq insert_type;
345 typedef const CORBA::ShortSeq * extract_type;
346 typedef const CORBA::ShortSeq * return_type;
348 static return_type convert (extract_type& et);
351 template<>
352 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::UShortSeq>
354 static CORBA::TypeCode_ptr const tc_value;
355 static CORBA::TCKind const tckind_value;
357 typedef CORBA::UShortSeq insert_type;
358 typedef const CORBA::UShortSeq * extract_type;
359 typedef const CORBA::UShortSeq * return_type;
361 static return_type convert (extract_type& et);
364 template<>
365 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongSeq>
367 static CORBA::TypeCode_ptr const tc_value;
368 static CORBA::TCKind const tckind_value;
370 typedef CORBA::LongSeq insert_type;
371 typedef const CORBA::LongSeq * extract_type;
372 typedef const CORBA::LongSeq * return_type;
374 static return_type convert (extract_type& et);
377 template<>
378 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULongSeq>
380 static CORBA::TypeCode_ptr const tc_value;
381 static CORBA::TCKind const tckind_value;
383 typedef CORBA::ULongSeq insert_type;
384 typedef const CORBA::ULongSeq * extract_type;
385 typedef const CORBA::ULongSeq * return_type;
387 static return_type convert (extract_type& et);
390 template<>
391 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongLongSeq>
393 static CORBA::TypeCode_ptr const tc_value;
394 static CORBA::TCKind const tckind_value;
396 typedef CORBA::LongLongSeq insert_type;
397 typedef const CORBA::LongLongSeq * extract_type;
398 typedef const CORBA::LongLongSeq * return_type;
400 static return_type convert (extract_type& et);
403 template<>
404 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULongLongSeq>
406 static CORBA::TypeCode_ptr const tc_value;
407 static CORBA::TCKind const tckind_value;
409 typedef CORBA::ULongLongSeq insert_type;
410 typedef const CORBA::ULongLongSeq * extract_type;
411 typedef const CORBA::ULongLongSeq * return_type;
413 static return_type convert (extract_type& et);
416 template<>
417 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::FloatSeq>
419 static CORBA::TypeCode_ptr const tc_value;
420 static CORBA::TCKind const tckind_value;
422 typedef CORBA::FloatSeq insert_type;
423 typedef const CORBA::FloatSeq * extract_type;
424 typedef const CORBA::FloatSeq * return_type;
426 static return_type convert (extract_type& et);
429 template<>
430 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::DoubleSeq>
432 static CORBA::TypeCode_ptr const tc_value;
433 static CORBA::TCKind const tckind_value;
435 typedef CORBA::DoubleSeq insert_type;
436 typedef const CORBA::DoubleSeq * extract_type;
437 typedef const CORBA::DoubleSeq * return_type;
439 static return_type convert (extract_type& et);
442 template<>
443 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongDoubleSeq>
445 static CORBA::TypeCode_ptr const tc_value;
446 static CORBA::TCKind const tckind_value;
448 typedef CORBA::LongDoubleSeq insert_type;
449 typedef const CORBA::LongDoubleSeq * extract_type;
450 typedef const CORBA::LongDoubleSeq * return_type;
452 static return_type convert (extract_type& et);
455 template<>
456 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::AnySeq>
458 static CORBA::TypeCode_ptr const tc_value;
459 static CORBA::TCKind const tckind_value;
461 typedef CORBA::AnySeq insert_type;
462 typedef const CORBA::AnySeq * extract_type;
463 typedef const CORBA::AnySeq * return_type;
465 static return_type convert (extract_type& et);
469 TAO_END_VERSIONED_NAMESPACE_DECL
471 #endif /* BASIC_TYPE_TRAITS_H */