|
Definition at line 61 of file DynAnyUtils_T.cpp.
References TAO_DynCommon::check_component(), TAO_DynCommon::destroyed(), TAO_DynCommon::has_components(), and TAO_DynCommon::the_any().
Referenced by TAO_DynCommon::get_boolean(), TAO_DynCommon::get_boolean_seq(), TAO_DynCommon::get_char(), TAO_DynCommon::get_char_seq(), TAO_DynCommon::get_double(), TAO_DynCommon::get_double_seq(), TAO_DynCommon::get_float(), TAO_DynCommon::get_float_seq(), TAO_DynCommon::get_long(), TAO_DynCommon::get_long_seq(), TAO_DynCommon::get_longdouble(), TAO_DynCommon::get_longdouble_seq(), TAO_DynCommon::get_longlong(), TAO_DynCommon::get_longlong_seq(), TAO_DynCommon::get_octet(), TAO_DynCommon::get_octet_seq(), TAO_DynCommon::get_short(), TAO_DynCommon::get_short_seq(), TAO_DynCommon::get_ulong(), TAO_DynCommon::get_ulong_seq(), TAO_DynCommon::get_ulonglong(), TAO_DynCommon::get_ulonglong_seq(), TAO_DynCommon::get_ushort(), TAO_DynCommon::get_ushort_seq(), and TAO_DynCommon::get_wchar_seq().
00062 {
00063 if (the_dynany->destroyed ())
00064 {
00065 throw ::CORBA::OBJECT_NOT_EXIST ();
00066 }
00067
00068 if (the_dynany->has_components ())
00069 {
00070 DynamicAny::DynAny_var cc = the_dynany->check_component ();
00071 TAO_DynCommon *dc = dynamic_cast<TAO_DynCommon *> (cc.in ());
00072 return DynAnyBasicTypeUtils<T>::get_value (dc);
00073 }
00074 else
00075 {
00076 typedef typename BasicTypeTraits<T>::return_type ret_type;
00077 typedef typename BasicTypeTraits<T>::extract_type ext_type;
00078 ret_type retval = ret_type ();
00079 ext_type extval (retval);
00080 const CORBA::Any &my_any = the_dynany->the_any ();
00081
00082 if (!(my_any >>= extval))
00083 {
00084 throw DynamicAny::DynAny::TypeMismatch ();
00085 }
00086
00087 return BasicTypeTraits<T>::convert (extval);
00088 }
00089 }
|