Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / AnyTypeCode / BasicTypeTraits.cpp
blob079b5a41df26da4416266e06ad00fbace8c89d41
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file BasicTypeTraits.cpp
7 * Assign values to specialization members in BasicTypeTraits.h.
9 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
11 //=============================================================================
13 #include "tao/AnyTypeCode/BasicTypeTraits.h"
14 #include "tao/AnyTypeCode/BooleanSeqA.h"
15 #include "tao/AnyTypeCode/CharSeqA.h"
16 #include "tao/AnyTypeCode/OctetSeqA.h"
17 #include "tao/AnyTypeCode/WCharSeqA.h"
18 #include "tao/AnyTypeCode/ShortSeqA.h"
19 #include "tao/AnyTypeCode/UShortSeqA.h"
20 #include "tao/AnyTypeCode/LongSeqA.h"
21 #include "tao/AnyTypeCode/ULongSeqA.h"
22 #include "tao/AnyTypeCode/LongLongSeqA.h"
23 #include "tao/AnyTypeCode/ULongLongSeqA.h"
24 #include "tao/AnyTypeCode/FloatSeqA.h"
25 #include "tao/AnyTypeCode/DoubleSeqA.h"
26 #include "tao/AnyTypeCode/LongDoubleSeqA.h"
27 #include "tao/AnyTypeCode/AnySeqA.h"
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 namespace TAO
33 CORBA::TypeCode_ptr const
34 BasicTypeTraits<CORBA::Boolean>::tc_value = CORBA::_tc_boolean;
36 CORBA::TCKind const
37 BasicTypeTraits<CORBA::Boolean>::tckind_value = CORBA::tk_boolean;
39 BasicTypeTraits<CORBA::Boolean>::return_type
40 BasicTypeTraits<CORBA::Boolean>::convert (extract_type& et)
42 return et.ref_;
45 //================================================================
47 CORBA::TypeCode_ptr const
48 BasicTypeTraits<CORBA::Octet>::tc_value = CORBA::_tc_octet;
50 CORBA::TCKind const
51 BasicTypeTraits<CORBA::Octet>::tckind_value = CORBA::tk_octet;
53 BasicTypeTraits<CORBA::Octet>::return_type
54 BasicTypeTraits<CORBA::Octet>::convert (extract_type& et)
56 return et.ref_;
59 //================================================================
61 CORBA::TypeCode_ptr const
62 BasicTypeTraits<CORBA::Char>::tc_value = CORBA::_tc_char;
64 CORBA::TCKind const
65 BasicTypeTraits<CORBA::Char>::tckind_value = CORBA::tk_char;
67 BasicTypeTraits<CORBA::Char>::return_type
68 BasicTypeTraits<CORBA::Char>::convert (extract_type& et)
70 return et.ref_;
73 //================================================================
75 #if (defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)) && !defined (ACE_LACKS_NATIVE_WCHAR_T)
77 CORBA::TypeCode_ptr const
78 BasicTypeTraits<CORBA::WChar>::tc_value = CORBA::_tc_wchar;
80 CORBA::TCKind const
81 BasicTypeTraits<CORBA::WChar>::tckind_value = CORBA::tk_wchar;
83 BasicTypeTraits<CORBA::WChar>::return_type
84 BasicTypeTraits<CORBA::WChar>::convert (extract_type& et)
86 return et.ref_;
89 #endif
91 //================================================================
93 CORBA::TypeCode_ptr const
94 BasicTypeTraits<CORBA::Short>::tc_value = CORBA::_tc_short;
96 CORBA::TCKind const
97 BasicTypeTraits<CORBA::Short>::tckind_value = CORBA::tk_short;
99 BasicTypeTraits<CORBA::Short>::return_type
100 BasicTypeTraits<CORBA::Short>::convert (extract_type& et)
102 return et;
105 //================================================================
107 CORBA::TypeCode_ptr const
108 BasicTypeTraits<CORBA::UShort>::tc_value = CORBA::_tc_ushort;
110 CORBA::TCKind const
111 BasicTypeTraits<CORBA::UShort>::tckind_value = CORBA::tk_ushort;
113 BasicTypeTraits<CORBA::UShort>::return_type
114 BasicTypeTraits<CORBA::UShort>::convert (extract_type& et)
116 return et;
119 //================================================================
121 CORBA::TypeCode_ptr const
122 BasicTypeTraits<CORBA::Long>::tc_value = CORBA::_tc_long;
124 CORBA::TCKind const
125 BasicTypeTraits<CORBA::Long>::tckind_value = CORBA::tk_long;
127 BasicTypeTraits<CORBA::Long>::return_type
128 BasicTypeTraits<CORBA::Long>::convert (extract_type& et)
130 return et;
133 //================================================================
135 CORBA::TypeCode_ptr const
136 BasicTypeTraits<CORBA::ULong>::tc_value = CORBA::_tc_ulong;
138 CORBA::TCKind const
139 BasicTypeTraits<CORBA::ULong>::tckind_value = CORBA::tk_ulong;
141 BasicTypeTraits<CORBA::ULong>::return_type
142 BasicTypeTraits<CORBA::ULong>::convert (extract_type& et)
144 return et;
147 //================================================================
149 CORBA::TypeCode_ptr const
150 BasicTypeTraits<CORBA::LongLong>::tc_value = CORBA::_tc_longlong;
152 CORBA::TCKind const
153 BasicTypeTraits<CORBA::LongLong>::tckind_value = CORBA::tk_longlong;
155 BasicTypeTraits<CORBA::LongLong>::return_type
156 BasicTypeTraits<CORBA::LongLong>::convert (extract_type& et)
158 return et;
161 //================================================================
163 CORBA::TypeCode_ptr const
164 BasicTypeTraits<CORBA::ULongLong>::tc_value = CORBA::_tc_ulonglong;
166 CORBA::TCKind const
167 BasicTypeTraits<CORBA::ULongLong>::tckind_value = CORBA::tk_ulonglong;
169 BasicTypeTraits<CORBA::ULongLong>::return_type
170 BasicTypeTraits<CORBA::ULongLong>::convert (extract_type& et)
172 return et;
175 //================================================================
177 CORBA::TypeCode_ptr const
178 BasicTypeTraits<CORBA::Float>::tc_value = CORBA::_tc_float;
180 CORBA::TCKind const
181 BasicTypeTraits<CORBA::Float>::tckind_value = CORBA::tk_float;
183 BasicTypeTraits<CORBA::Float>::return_type
184 BasicTypeTraits<CORBA::Float>::convert (extract_type& et)
186 return et;
189 //================================================================
191 CORBA::TypeCode_ptr const
192 BasicTypeTraits<CORBA::Double>::tc_value = CORBA::_tc_double;
194 CORBA::TCKind const
195 BasicTypeTraits<CORBA::Double>::tckind_value = CORBA::tk_double;
197 BasicTypeTraits<CORBA::Double>::return_type
198 BasicTypeTraits<CORBA::Double>::convert (extract_type& et)
200 return et;
203 //================================================================
205 CORBA::TypeCode_ptr const
206 BasicTypeTraits<CORBA::LongDouble>::tc_value = CORBA::_tc_longdouble;
208 CORBA::TCKind const
209 BasicTypeTraits<CORBA::LongDouble>::tckind_value = CORBA::tk_longdouble;
211 BasicTypeTraits<CORBA::LongDouble>::return_type
212 BasicTypeTraits<CORBA::LongDouble>::convert (extract_type& et)
214 return et;
217 //================================================================
219 CORBA::TypeCode_ptr const
220 BasicTypeTraits<CORBA::Char *>::tc_value = CORBA::_tc_string;
222 CORBA::TCKind const
223 BasicTypeTraits<CORBA::Char *>::tckind_value = CORBA::tk_string;
225 BasicTypeTraits<CORBA::Char *>::return_type
226 BasicTypeTraits<CORBA::Char *>::convert (extract_type& et)
228 return et;
231 //================================================================
233 CORBA::TypeCode_ptr const
234 BasicTypeTraits<CORBA::WChar *>::tc_value = CORBA::_tc_wstring;
236 CORBA::TCKind const
237 BasicTypeTraits<CORBA::WChar *>::tckind_value = CORBA::tk_wstring;
239 BasicTypeTraits<CORBA::WChar *>::return_type
240 BasicTypeTraits<CORBA::WChar *>::convert (extract_type& et)
242 return et;
245 //================================================================
247 CORBA::TypeCode_ptr const
248 BasicTypeTraits<CORBA::Any>::tc_value = CORBA::_tc_any;
250 CORBA::TCKind const
251 BasicTypeTraits<CORBA::Any>::tckind_value = CORBA::tk_any;
253 BasicTypeTraits<CORBA::Any>::return_type
254 BasicTypeTraits<CORBA::Any>::convert (extract_type& et)
256 return et;
259 //================================================================
261 CORBA::TypeCode_ptr const
262 BasicTypeTraits<CORBA::Object_ptr>::tc_value = CORBA::_tc_Object;
264 CORBA::TCKind const
265 BasicTypeTraits<CORBA::Object_ptr>::tckind_value = CORBA::tk_objref;
267 BasicTypeTraits<CORBA::Object_ptr>::return_type
268 BasicTypeTraits<CORBA::Object_ptr>::convert (extract_type& et)
270 return et;
273 //================================================================
275 CORBA::TypeCode_ptr const
276 BasicTypeTraits<CORBA::TypeCode_ptr>::tc_value = CORBA::_tc_TypeCode;
278 CORBA::TCKind const
279 BasicTypeTraits<CORBA::TypeCode_ptr>::tckind_value = CORBA::tk_TypeCode;
281 BasicTypeTraits<CORBA::TypeCode_ptr>::return_type
282 BasicTypeTraits<CORBA::TypeCode_ptr>::convert (extract_type& et)
284 return et;
287 //================================================================
289 CORBA::TypeCode_ptr const
290 BasicTypeTraits<CORBA::BooleanSeq>::tc_value = CORBA::_tc_BooleanSeq;
292 CORBA::TCKind const
293 BasicTypeTraits<CORBA::BooleanSeq>::tckind_value = CORBA::tk_sequence;
295 BasicTypeTraits<CORBA::BooleanSeq>::return_type
296 BasicTypeTraits<CORBA::BooleanSeq>::convert (extract_type& et)
298 return et;
301 //================================================================
303 CORBA::TypeCode_ptr const
304 BasicTypeTraits<CORBA::OctetSeq>::tc_value = CORBA::_tc_OctetSeq;
306 CORBA::TCKind const
307 BasicTypeTraits<CORBA::OctetSeq>::tckind_value = CORBA::tk_sequence;
309 BasicTypeTraits<CORBA::OctetSeq>::return_type
310 BasicTypeTraits<CORBA::OctetSeq>::convert (extract_type& et)
312 return et;
315 //================================================================
317 CORBA::TypeCode_ptr const
318 BasicTypeTraits<CORBA::CharSeq>::tc_value = CORBA::_tc_CharSeq;
320 CORBA::TCKind const
321 BasicTypeTraits<CORBA::CharSeq>::tckind_value = CORBA::tk_sequence;
323 BasicTypeTraits<CORBA::CharSeq>::return_type
324 BasicTypeTraits<CORBA::CharSeq>::convert (extract_type& et)
326 return et;
329 //================================================================
331 CORBA::TypeCode_ptr const
332 BasicTypeTraits<CORBA::WCharSeq>::tc_value = CORBA::_tc_WCharSeq;
334 CORBA::TCKind const
335 BasicTypeTraits<CORBA::WCharSeq>::tckind_value = CORBA::tk_sequence;
337 BasicTypeTraits<CORBA::WCharSeq>::return_type
338 BasicTypeTraits<CORBA::WCharSeq>::convert (extract_type& et)
340 return et;
343 //================================================================
345 CORBA::TypeCode_ptr const
346 BasicTypeTraits<CORBA::ShortSeq>::tc_value = CORBA::_tc_ShortSeq;
348 CORBA::TCKind const
349 BasicTypeTraits<CORBA::ShortSeq>::tckind_value = CORBA::tk_sequence;
351 BasicTypeTraits<CORBA::ShortSeq>::return_type
352 BasicTypeTraits<CORBA::ShortSeq>::convert (extract_type& et)
354 return et;
357 //================================================================
359 CORBA::TypeCode_ptr const
360 BasicTypeTraits<CORBA::UShortSeq>::tc_value = CORBA::_tc_UShortSeq;
362 CORBA::TCKind const
363 BasicTypeTraits<CORBA::UShortSeq>::tckind_value = CORBA::tk_sequence;
365 BasicTypeTraits<CORBA::UShortSeq>::return_type
366 BasicTypeTraits<CORBA::UShortSeq>::convert (extract_type& et)
368 return et;
371 //================================================================
373 CORBA::TypeCode_ptr const
374 BasicTypeTraits<CORBA::LongSeq>::tc_value = CORBA::_tc_LongSeq;
376 CORBA::TCKind const
377 BasicTypeTraits<CORBA::LongSeq>::tckind_value = CORBA::tk_sequence;
379 BasicTypeTraits<CORBA::LongSeq>::return_type
380 BasicTypeTraits<CORBA::LongSeq>::convert (extract_type& et)
382 return et;
385 //================================================================
387 CORBA::TypeCode_ptr const
388 BasicTypeTraits<CORBA::ULongSeq>::tc_value = CORBA::_tc_ULongSeq;
390 CORBA::TCKind const
391 BasicTypeTraits<CORBA::ULongSeq>::tckind_value = CORBA::tk_sequence;
393 BasicTypeTraits<CORBA::ULongSeq>::return_type
394 BasicTypeTraits<CORBA::ULongSeq>::convert (extract_type& et)
396 return et;
399 //================================================================
401 CORBA::TypeCode_ptr const
402 BasicTypeTraits<CORBA::LongLongSeq>::tc_value = CORBA::_tc_LongLongSeq;
404 CORBA::TCKind const
405 BasicTypeTraits<CORBA::LongLongSeq>::tckind_value = CORBA::tk_sequence;
407 BasicTypeTraits<CORBA::LongLongSeq>::return_type
408 BasicTypeTraits<CORBA::LongLongSeq>::convert (extract_type& et)
410 return et;
413 //================================================================
415 CORBA::TypeCode_ptr const
416 BasicTypeTraits<CORBA::ULongLongSeq>::tc_value = CORBA::_tc_ULongLongSeq;
418 CORBA::TCKind const
419 BasicTypeTraits<CORBA::ULongLongSeq>::tckind_value = CORBA::tk_sequence;
421 BasicTypeTraits<CORBA::ULongLongSeq>::return_type
422 BasicTypeTraits<CORBA::ULongLongSeq>::convert (extract_type& et)
424 return et;
427 //================================================================
429 CORBA::TypeCode_ptr const
430 BasicTypeTraits<CORBA::FloatSeq>::tc_value = CORBA::_tc_FloatSeq;
432 CORBA::TCKind const
433 BasicTypeTraits<CORBA::FloatSeq>::tckind_value = CORBA::tk_sequence;
435 BasicTypeTraits<CORBA::FloatSeq>::return_type
436 BasicTypeTraits<CORBA::FloatSeq>::convert (extract_type& et)
438 return et;
441 //================================================================
443 CORBA::TypeCode_ptr const
444 BasicTypeTraits<CORBA::DoubleSeq>::tc_value = CORBA::_tc_DoubleSeq;
446 CORBA::TCKind const
447 BasicTypeTraits<CORBA::DoubleSeq>::tckind_value = CORBA::tk_sequence;
449 BasicTypeTraits<CORBA::DoubleSeq>::return_type
450 BasicTypeTraits<CORBA::DoubleSeq>::convert (extract_type& et)
452 return et;
455 //================================================================
457 CORBA::TypeCode_ptr const
458 BasicTypeTraits<CORBA::LongDoubleSeq>::tc_value = CORBA::_tc_LongDoubleSeq;
460 CORBA::TCKind const
461 BasicTypeTraits<CORBA::LongDoubleSeq>::tckind_value = CORBA::tk_sequence;
463 BasicTypeTraits<CORBA::LongDoubleSeq>::return_type
464 BasicTypeTraits<CORBA::LongDoubleSeq>::convert (extract_type& et)
466 return et;
469 //================================================================
471 CORBA::TypeCode_ptr const
472 BasicTypeTraits<CORBA::AnySeq>::tc_value = CORBA::_tc_AnySeq;
474 CORBA::TCKind const
475 BasicTypeTraits<CORBA::AnySeq>::tckind_value = CORBA::tk_sequence;
477 BasicTypeTraits<CORBA::AnySeq>::return_type
478 BasicTypeTraits<CORBA::AnySeq>::convert (extract_type& et)
480 return et;
484 TAO_END_VERSIONED_NAMESPACE_DECL