00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "tao/AnyTypeCode/BasicTypeTraits_T.h"
00016 #include "tao/AnyTypeCode/Any.h"
00017
00018 #include "tao/Typecode_typesC.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025
00026 namespace CORBA
00027 {
00028 class TypeCode;
00029 typedef TypeCode * TypeCode_ptr;
00030
00031 class BooleanSeq;
00032 class CharSeq;
00033 class OctetSeq;
00034 class WCharSeq;
00035 class ShortSeq;
00036 class UShortSeq;
00037 class LongSeq;
00038 class ULongSeq;
00039 class LongLongSeq;
00040 class ULongLongSeq;
00041 class FloatSeq;
00042 class DoubleSeq;
00043 class LongDoubleSeq;
00044 class AnySeq;
00045 }
00046
00047 namespace TAO
00048 {
00049 template<>
00050 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Boolean>
00051 {
00052 static CORBA::TypeCode_ptr const tc_value;
00053 static CORBA::TCKind const tckind_value;
00054
00055 typedef CORBA::Any::from_boolean insert_type;
00056 typedef CORBA::Any::to_boolean extract_type;
00057 typedef CORBA::Boolean return_type;
00058
00059 static return_type convert (extract_type& et);
00060 };
00061
00062 template<>
00063 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Octet>
00064 {
00065 static CORBA::TypeCode_ptr const tc_value;
00066 static CORBA::TCKind const tckind_value;
00067
00068 typedef CORBA::Any::from_octet insert_type;
00069 typedef CORBA::Any::to_octet extract_type;
00070 typedef CORBA::Octet return_type;
00071
00072 static return_type convert (extract_type& et);
00073 };
00074
00075 template<>
00076 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Char>
00077 {
00078 static CORBA::TypeCode_ptr const tc_value;
00079 static CORBA::TCKind const tckind_value;
00080
00081 typedef CORBA::Any::from_char insert_type;
00082 typedef CORBA::Any::to_char extract_type;
00083 typedef CORBA::Char return_type;
00084
00085 static return_type convert (extract_type& et);
00086 };
00087
00088 #if (defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)) && !defined (ACE_LACKS_NATIVE_WCHAR_T)
00089 template<>
00090 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::WChar>
00091 {
00092 static CORBA::TypeCode_ptr const tc_value;
00093 static CORBA::TCKind const tckind_value;
00094
00095 typedef CORBA::Any::from_wchar insert_type;
00096 typedef CORBA::Any::to_wchar extract_type;
00097 typedef CORBA::WChar return_type;
00098
00099 static return_type convert (extract_type& et);
00100 };
00101 #endif
00102
00103 template<>
00104 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Short>
00105 {
00106 static CORBA::TypeCode_ptr const tc_value;
00107 static CORBA::TCKind const tckind_value;
00108
00109 typedef CORBA::Short insert_type;
00110 typedef CORBA::Short extract_type;
00111 typedef CORBA::Short return_type;
00112
00113 static return_type convert (extract_type& et);
00114 };
00115
00116 template<>
00117 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::UShort>
00118 {
00119 static CORBA::TypeCode_ptr const tc_value;
00120 static CORBA::TCKind const tckind_value;
00121
00122 typedef CORBA::UShort insert_type;
00123 typedef CORBA::UShort extract_type;
00124 typedef CORBA::UShort return_type;
00125
00126 static return_type convert (extract_type& et);
00127 };
00128
00129 template<>
00130 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Long>
00131 {
00132 static CORBA::TypeCode_ptr const tc_value;
00133 static CORBA::TCKind const tckind_value;
00134
00135 typedef CORBA::Long insert_type;
00136 typedef CORBA::Long extract_type;
00137 typedef CORBA::Long return_type;
00138
00139 static return_type convert (extract_type& et);
00140 };
00141
00142 template<>
00143 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULong>
00144 {
00145 static CORBA::TypeCode_ptr const tc_value;
00146 static CORBA::TCKind const tckind_value;
00147
00148 typedef CORBA::ULong insert_type;
00149 typedef CORBA::ULong extract_type;
00150 typedef CORBA::ULong return_type;
00151
00152 static return_type convert (extract_type& et);
00153 };
00154
00155 template<>
00156 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongLong>
00157 {
00158 static CORBA::TypeCode_ptr const tc_value;
00159 static CORBA::TCKind const tckind_value;
00160
00161 typedef CORBA::LongLong insert_type;
00162 typedef CORBA::LongLong extract_type;
00163 typedef CORBA::LongLong return_type;
00164
00165 static return_type convert (extract_type& et);
00166 };
00167
00168 template<>
00169 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULongLong>
00170 {
00171 static CORBA::TypeCode_ptr const tc_value;
00172 static CORBA::TCKind const tckind_value;
00173
00174 typedef CORBA::ULongLong insert_type;
00175 typedef CORBA::ULongLong extract_type;
00176 typedef CORBA::ULongLong return_type;
00177
00178 static return_type convert (extract_type& et);
00179 };
00180
00181 template<>
00182 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Float>
00183 {
00184 static CORBA::TypeCode_ptr const tc_value;
00185 static CORBA::TCKind const tckind_value;
00186
00187 typedef CORBA::Float insert_type;
00188 typedef CORBA::Float extract_type;
00189 typedef CORBA::Float return_type;
00190
00191 static return_type convert (extract_type& et);
00192 };
00193
00194 template<>
00195 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Double>
00196 {
00197 static CORBA::TypeCode_ptr const tc_value;
00198 static CORBA::TCKind const tckind_value;
00199
00200 typedef CORBA::Double insert_type;
00201 typedef CORBA::Double extract_type;
00202 typedef CORBA::Double return_type;
00203
00204 static return_type convert (extract_type& et);
00205 };
00206
00207 template<>
00208 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongDouble>
00209 {
00210 static CORBA::TypeCode_ptr const tc_value;
00211 static CORBA::TCKind const tckind_value;
00212
00213 typedef CORBA::LongDouble insert_type;
00214 typedef CORBA::LongDouble extract_type;
00215 typedef CORBA::LongDouble return_type;
00216
00217 static return_type convert (extract_type& et);
00218 };
00219
00220 template<>
00221 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Char *>
00222 {
00223 static CORBA::TypeCode_ptr const tc_value;
00224 static CORBA::TCKind const tckind_value;
00225
00226 typedef CORBA::Char * insert_type;
00227 typedef CORBA::Char * extract_type;
00228 typedef CORBA::Char * return_type;
00229
00230 static return_type convert (extract_type& et);
00231 };
00232
00233 template<>
00234 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::WChar *>
00235 {
00236 static CORBA::TypeCode_ptr const tc_value;
00237 static CORBA::TCKind const tckind_value;
00238
00239 typedef CORBA::WChar * insert_type;
00240 typedef CORBA::WChar * extract_type;
00241 typedef CORBA::WChar * return_type;
00242
00243 static return_type convert (extract_type& et);
00244 };
00245
00246 template<>
00247 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Any>
00248 {
00249 static CORBA::TypeCode_ptr const tc_value;
00250 static CORBA::TCKind const tckind_value;
00251
00252 typedef CORBA::Any insert_type;
00253 typedef CORBA::Any * extract_type;
00254 typedef CORBA::Any * return_type;
00255
00256 static return_type convert (extract_type& et);
00257 };
00258
00259 template<>
00260 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::Object_ptr>
00261 {
00262 static CORBA::TypeCode_ptr const tc_value;
00263 static CORBA::TCKind const tckind_value;
00264
00265 typedef CORBA::Object_ptr insert_type;
00266 typedef CORBA::Object_ptr extract_type;
00267 typedef CORBA::Object_ptr return_type;
00268
00269 static return_type convert (extract_type& et);
00270 };
00271
00272 template<>
00273 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::TypeCode_ptr>
00274 {
00275 static CORBA::TypeCode_ptr const tc_value;
00276 static CORBA::TCKind const tckind_value;
00277
00278 typedef CORBA::TypeCode_ptr insert_type;
00279 typedef CORBA::TypeCode_ptr extract_type;
00280 typedef CORBA::TypeCode_ptr return_type;
00281
00282 static return_type convert (extract_type& et);
00283 };
00284
00285 template<>
00286 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::BooleanSeq>
00287 {
00288 static CORBA::TypeCode_ptr const tc_value;
00289 static CORBA::TCKind const tckind_value;
00290
00291 typedef CORBA::BooleanSeq insert_type;
00292 typedef CORBA::BooleanSeq * extract_type;
00293 typedef CORBA::BooleanSeq * return_type;
00294
00295 static return_type convert (extract_type& et);
00296 };
00297
00298 template<>
00299 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::OctetSeq>
00300 {
00301 static CORBA::TypeCode_ptr const tc_value;
00302 static CORBA::TCKind const tckind_value ;
00303
00304 typedef CORBA::OctetSeq insert_type;
00305 typedef CORBA::OctetSeq * extract_type;
00306 typedef CORBA::OctetSeq * return_type;
00307
00308 static return_type convert (extract_type& et);
00309 };
00310
00311 template<>
00312 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::CharSeq>
00313 {
00314 static CORBA::TypeCode_ptr const tc_value;
00315 static CORBA::TCKind const tckind_value;
00316
00317 typedef CORBA::CharSeq insert_type;
00318 typedef CORBA::CharSeq * extract_type;
00319 typedef CORBA::CharSeq * return_type;
00320
00321 static return_type convert (extract_type& et);
00322 };
00323
00324 template<>
00325 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::WCharSeq>
00326 {
00327 static CORBA::TypeCode_ptr const tc_value;
00328 static CORBA::TCKind const tckind_value;
00329
00330 typedef CORBA::WCharSeq insert_type;
00331 typedef CORBA::WCharSeq * extract_type;
00332 typedef CORBA::WCharSeq * return_type;
00333
00334 static return_type convert (extract_type& et);
00335 };
00336
00337 template<>
00338 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ShortSeq>
00339 {
00340 static CORBA::TypeCode_ptr const tc_value;
00341 static CORBA::TCKind const tckind_value;
00342
00343 typedef CORBA::ShortSeq insert_type;
00344 typedef CORBA::ShortSeq * extract_type;
00345 typedef CORBA::ShortSeq * return_type;
00346
00347 static return_type convert (extract_type& et);
00348 };
00349
00350 template<>
00351 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::UShortSeq>
00352 {
00353 static CORBA::TypeCode_ptr const tc_value;
00354 static CORBA::TCKind const tckind_value;
00355
00356 typedef CORBA::UShortSeq insert_type;
00357 typedef CORBA::UShortSeq * extract_type;
00358 typedef CORBA::UShortSeq * return_type;
00359
00360 static return_type convert (extract_type& et);
00361 };
00362
00363 template<>
00364 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongSeq>
00365 {
00366 static CORBA::TypeCode_ptr const tc_value;
00367 static CORBA::TCKind const tckind_value;
00368
00369 typedef CORBA::LongSeq insert_type;
00370 typedef CORBA::LongSeq * extract_type;
00371 typedef CORBA::LongSeq * return_type;
00372
00373 static return_type convert (extract_type& et);
00374 };
00375
00376 template<>
00377 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULongSeq>
00378 {
00379 static CORBA::TypeCode_ptr const tc_value;
00380 static CORBA::TCKind const tckind_value;
00381
00382 typedef CORBA::ULongSeq insert_type;
00383 typedef CORBA::ULongSeq * extract_type;
00384 typedef CORBA::ULongSeq * return_type;
00385
00386 static return_type convert (extract_type& et);
00387 };
00388
00389 template<>
00390 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongLongSeq>
00391 {
00392 static CORBA::TypeCode_ptr const tc_value;
00393 static CORBA::TCKind const tckind_value;
00394
00395 typedef CORBA::LongLongSeq insert_type;
00396 typedef CORBA::LongLongSeq * extract_type;
00397 typedef CORBA::LongLongSeq * return_type;
00398
00399 static return_type convert (extract_type& et);
00400 };
00401
00402 template<>
00403 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::ULongLongSeq>
00404 {
00405 static CORBA::TypeCode_ptr const tc_value;
00406 static CORBA::TCKind const tckind_value;
00407
00408 typedef CORBA::ULongLongSeq insert_type;
00409 typedef CORBA::ULongLongSeq * extract_type;
00410 typedef CORBA::ULongLongSeq * return_type;
00411
00412 static return_type convert (extract_type& et);
00413 };
00414
00415 template<>
00416 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::FloatSeq>
00417 {
00418 static CORBA::TypeCode_ptr const tc_value;
00419 static CORBA::TCKind const tckind_value;
00420
00421 typedef CORBA::FloatSeq insert_type;
00422 typedef CORBA::FloatSeq * extract_type;
00423 typedef CORBA::FloatSeq * return_type;
00424
00425 static return_type convert (extract_type& et);
00426 };
00427
00428 template<>
00429 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::DoubleSeq>
00430 {
00431 static CORBA::TypeCode_ptr const tc_value;
00432 static CORBA::TCKind const tckind_value;
00433
00434 typedef CORBA::DoubleSeq insert_type;
00435 typedef CORBA::DoubleSeq * extract_type;
00436 typedef CORBA::DoubleSeq * return_type;
00437
00438 static return_type convert (extract_type& et);
00439 };
00440
00441 template<>
00442 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::LongDoubleSeq>
00443 {
00444 static CORBA::TypeCode_ptr const tc_value;
00445 static CORBA::TCKind const tckind_value;
00446
00447 typedef CORBA::LongDoubleSeq insert_type;
00448 typedef CORBA::LongDoubleSeq * extract_type;
00449 typedef CORBA::LongDoubleSeq * return_type;
00450
00451 static return_type convert (extract_type& et);
00452 };
00453
00454 template<>
00455 struct TAO_AnyTypeCode_Export BasicTypeTraits<CORBA::AnySeq>
00456 {
00457 static CORBA::TypeCode_ptr const tc_value;
00458 static CORBA::TCKind const tckind_value;
00459
00460 typedef CORBA::AnySeq insert_type;
00461 typedef CORBA::AnySeq * extract_type;
00462 typedef CORBA::AnySeq * return_type;
00463
00464 static return_type convert (extract_type& et);
00465 };
00466 }
00467
00468 TAO_END_VERSIONED_NAMESPACE_DECL
00469