#include <Any_Array_Impl_T.h>
Inheritance diagram for TAO::Any_Array_Impl_T< T_slice, T_forany >:
Public Member Functions | |
Any_Array_Impl_T (_tao_destructor destructor, CORBA::TypeCode_ptr, T_slice *const ) | |
virtual | ~Any_Array_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 destructor, CORBA::TypeCode_ptr, T_slice *const ) |
CORBA::Boolean | extract (const CORBA::Any &, _tao_destructor, CORBA::TypeCode_ptr, T_slice *&) |
Private Attributes | |
T_slice * | value_ |
Used for arrays
Definition at line 37 of file Any_Array_Impl_T.h.
|
Definition at line 23 of file Any_Array_Impl_T.cpp.
|
|
Definition at line 35 of file Any_Array_Impl_T.cpp.
00036 { 00037 } |
|
Reimplemented from TAO::Any_Impl. Definition at line 164 of file Any_Array_Impl_T.cpp. References TAO::Any_Array_Impl_T< T_slice, T_forany >::demarshal_value().
00166 { 00167 if (! this->demarshal_value (cdr)) 00168 { 00169 throw ::CORBA::MARSHAL (); 00170 } 00171 } |
|
Definition at line 10 of file Any_Array_Impl_T.inl. Referenced by TAO::Any_Array_Impl_T< T_slice, T_forany >::_tao_decode(), and TAO::Any_Array_Impl_T< T_slice, T_forany >::extract().
00011 {
00012 T_forany tmp (this->value_);
00013 return (cdr >> tmp);
00014 }
|
|
Definition at line 57 of file Any_Array_Impl_T.cpp. References TAO::Unknown_IDL_Type::_tao_get_cdr(), CORBA::Any::_tao_get_typecode(), ACE_NEW_RETURN, TAO::Any_Array_Impl_T< T_slice, T_forany >::demarshal_value(), TAO::Any_Impl::encoded(), CORBA::Any::impl(), ACE_Auto_Basic_Ptr< X >::release(), and TAO::Any_Array_Impl_T< T_slice, T_forany >::value_.
00061 { 00062 _tao_elem = 0; 00063 00064 try 00065 { 00066 CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); 00067 CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); 00068 00069 if (_tao_equiv == false) 00070 { 00071 return false; 00072 } 00073 00074 TAO::Any_Impl *impl = any.impl (); 00075 00076 if (!impl->encoded ()) 00077 { 00078 TAO::Any_Array_Impl_T<T_slice, T_forany> *narrow_impl = 00079 dynamic_cast <TAO::Any_Array_Impl_T <T_slice, T_forany> *> (impl); 00080 00081 if (narrow_impl == 0) 00082 { 00083 return false; 00084 } 00085 00086 _tao_elem = reinterpret_cast <T_slice*> (narrow_impl->value_); 00087 return true; 00088 } 00089 00090 TAO::Any_Array_Impl_T<T_slice, T_forany> *replacement = 0; 00091 typedef TAO::Any_Array_Impl_T<T_slice, T_forany> ARRAY_ANY_IMPL; 00092 ACE_NEW_RETURN (replacement, 00093 ARRAY_ANY_IMPL (destructor, 00094 any_tc, 00095 T_forany::tao_alloc ()), 00096 false); 00097 00098 auto_ptr<TAO::Any_Array_Impl_T<T_slice, T_forany> > replacement_safety ( 00099 replacement 00100 ); 00101 00102 // We know this will work since the unencoded case is covered above. 00103 TAO::Unknown_IDL_Type * const unk = 00104 dynamic_cast<TAO::Unknown_IDL_Type *> (impl); 00105 00106 if (!unk) 00107 return false; 00108 00109 // We don't want the rd_ptr of unk to move, in case it is 00110 // shared by another Any. This copies the state, not the buffer. 00111 TAO_InputCDR for_reading (unk->_tao_get_cdr ()); 00112 00113 CORBA::Boolean const good_decode = 00114 replacement->demarshal_value (for_reading); 00115 00116 if (good_decode) 00117 { 00118 _tao_elem = reinterpret_cast <T_slice*> (replacement->value_); 00119 const_cast<CORBA::Any &> (any).replace (replacement); 00120 replacement_safety.release (); 00121 return true; 00122 } 00123 00124 // Duplicated by Any_Impl base class constructor. 00125 ::CORBA::release (any_tc); 00126 } 00127 catch (const ::CORBA::Exception&) 00128 { 00129 } 00130 00131 return false; 00132 } |
|
Reimplemented from TAO::Any_Impl. Definition at line 150 of file Any_Array_Impl_T.cpp.
00151 { 00152 if (this->value_destructor_ != 0) 00153 { 00154 (*this->value_destructor_) (this->value_); 00155 this->value_destructor_ = 0; 00156 } 00157 00158 this->value_ = 0; 00159 ::CORBA::release (this->type_); 00160 } |
|
Definition at line 41 of file Any_Array_Impl_T.cpp. References ACE_NEW, and CORBA::Any::replace().
00045 { 00046 TAO::Any_Array_Impl_T<T_slice, T_forany> *new_impl = 0; 00047 typedef TAO::Any_Array_Impl_T<T_slice, T_forany> ARRAY_ANY_IMPL; 00048 ACE_NEW (new_impl, 00049 ARRAY_ANY_IMPL (destructor, 00050 tc, 00051 value)); 00052 any.replace (new_impl); 00053 } |
|
Implements TAO::Any_Impl. Definition at line 136 of file Any_Array_Impl_T.cpp.
00137 {
00138 return (cdr << T_forany (this->value_));
00139 }
|
|
Definition at line 143 of file Any_Array_Impl_T.cpp.
00144 { 00145 return this->value_; 00146 } |
|
Definition at line 63 of file Any_Array_Impl_T.h. Referenced by TAO::Any_Array_Impl_T< T_slice, T_forany >::extract(). |