#include <Any_Dual_Impl_T.h>
Inheritance diagram for TAO::Any_Dual_Impl_T< T >:
Public Member Functions | |
Any_Dual_Impl_T (_tao_destructor destructor, CORBA::TypeCode_ptr, T *const ) | |
Any_Dual_Impl_T (_tao_destructor destructor, CORBA::TypeCode_ptr, const T &) | |
Any_Dual_Impl_T (CORBA::TypeCode_ptr) | |
virtual | ~Any_Dual_Impl_T (void) |
virtual CORBA::Boolean | marshal_value (TAO_OutputCDR &) |
CORBA::Boolean | demarshal_value (TAO_InputCDR &) |
virtual void | _tao_decode (TAO_InputCDR &) |
virtual const void * | value (void) const |
virtual void | free_value (void) |
Static Public Member Functions | |
void | insert (CORBA::Any &, _tao_destructor, CORBA::TypeCode_ptr, T *const ) |
void | insert_copy (CORBA::Any &, _tao_destructor destructor, CORBA::TypeCode_ptr, const T &) |
CORBA::Boolean | extract (const CORBA::Any &, _tao_destructor, CORBA::TypeCode_ptr, const T *&) |
Protected Member Functions | |
void | value (const T &) |
Protected Attributes | |
T * | value_ |
Used for the IDL types that have copying and non-copying insertion, but which are not (de)marshaled as pointers - struct, union, sequence, and exception.
Definition at line 40 of file Any_Dual_Impl_T.h.
|
Definition at line 25 of file Any_Dual_Impl_T.cpp.
|
|
Definition at line 42 of file Any_Dual_Impl_T.cpp. References TAO::Any_Dual_Impl_T< T >::value().
|
|
Definition at line 52 of file Any_Dual_Impl_T.cpp.
00053 : Any_Impl (0, 00054 tc) 00055 { 00056 } |
|
Definition at line 59 of file Any_Dual_Impl_T.cpp.
00060 { 00061 } |
|
Reimplemented from TAO::Any_Impl. Definition at line 203 of file Any_Dual_Impl_T.cpp. References TAO::Any_Dual_Impl_T< T >::demarshal_value().
00204 { 00205 if (! this->demarshal_value (cdr)) 00206 { 00207 throw ::CORBA::MARSHAL (); 00208 } 00209 } |
|
Definition at line 11 of file Any_Dual_Impl_T.inl. Referenced by TAO::Any_Dual_Impl_T< T >::_tao_decode(), and TAO::Any_Dual_Impl_T< T >::extract().
00012 { 00013 return (cdr >> *this->value_); 00014 } |
|
Definition at line 95 of file Any_Dual_Impl_T.cpp. References TAO::Unknown_IDL_Type::_tao_get_cdr(), CORBA::Any::_tao_get_typecode(), ACE_NEW_RETURN, TAO::Any_Dual_Impl_T< T >::demarshal_value(), TAO::Any_Impl::encoded(), CORBA::Any::impl(), ACE_Auto_Basic_Ptr< X >::release(), and TAO::Any_Dual_Impl_T< T >::value_. Referenced by operator>>=().
00099 { 00100 _tao_elem = 0; 00101 00102 try 00103 { 00104 CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); 00105 CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); 00106 00107 if (_tao_equiv == false) 00108 { 00109 return false; 00110 } 00111 00112 TAO::Any_Impl * const impl = any.impl (); 00113 00114 if (impl && !impl->encoded ()) 00115 { 00116 TAO::Any_Dual_Impl_T<T> * const narrow_impl = 00117 dynamic_cast <TAO::Any_Dual_Impl_T<T> *> (impl); 00118 00119 if (narrow_impl == 0) 00120 { 00121 return false; 00122 } 00123 00124 _tao_elem = narrow_impl->value_; 00125 return true; 00126 } 00127 00128 T *empty_value = 0; 00129 ACE_NEW_RETURN (empty_value, 00130 T, 00131 false); 00132 TAO::Any_Dual_Impl_T<T> *replacement = 0; 00133 ACE_NEW_RETURN (replacement, 00134 TAO::Any_Dual_Impl_T<T> (destructor, 00135 any_tc, 00136 empty_value), 00137 false); 00138 00139 auto_ptr<TAO::Any_Dual_Impl_T<T> > replacement_safety (replacement); 00140 00141 // We know this will work since the unencoded case is covered above. 00142 TAO::Unknown_IDL_Type * const unk = 00143 dynamic_cast<TAO::Unknown_IDL_Type *> (impl); 00144 00145 if (!unk) 00146 return false; 00147 00148 // We don't want the rd_ptr of unk to move, in case it is 00149 // shared by another Any. This copies the state, not the buffer. 00150 TAO_InputCDR for_reading (unk->_tao_get_cdr ()); 00151 00152 CORBA::Boolean const good_decode = 00153 replacement->demarshal_value (for_reading); 00154 00155 if (good_decode) 00156 { 00157 _tao_elem = replacement->value_; 00158 const_cast<CORBA::Any &> (any).replace (replacement); 00159 replacement_safety.release (); 00160 return true; 00161 } 00162 00163 // Duplicated by Any_Impl base class constructor. 00164 ::CORBA::release (any_tc); 00165 } 00166 catch (const ::CORBA::Exception&) 00167 { 00168 } 00169 00170 return false; 00171 } |
|
Reimplemented from TAO::Any_Impl. Definition at line 189 of file Any_Dual_Impl_T.cpp.
00190 { 00191 if (this->value_destructor_ != 0) 00192 { 00193 (*this->value_destructor_) (this->value_); 00194 this->value_destructor_ = 0; 00195 } 00196 00197 ::CORBA::release (this->type_); 00198 this->value_ = 0; 00199 } |
|
Definition at line 65 of file Any_Dual_Impl_T.cpp. References ACE_NEW, and CORBA::Any::replace(). Referenced by operator<<=().
|
|
Definition at line 80 of file Any_Dual_Impl_T.cpp. References ACE_NEW, and CORBA::Any::replace(). Referenced by operator<<=().
|
|
Implements TAO::Any_Impl. Definition at line 175 of file Any_Dual_Impl_T.cpp.
00176 { 00177 return (cdr << *this->value_); 00178 } |
|
Definition at line 35 of file Any_Dual_Impl_T.cpp. References ACE_NEW.
00036 { 00037 ACE_NEW (this->value_, 00038 T (val)); 00039 } |
|
Definition at line 182 of file Any_Dual_Impl_T.cpp. Referenced by TAO::Any_Dual_Impl_T< T >::Any_Dual_Impl_T().
00183 { 00184 return this->value_; 00185 } |
|
Definition at line 75 of file Any_Dual_Impl_T.h. Referenced by TAO::Any_Dual_Impl_T< T >::extract(). |