Template Any class for pointer types. More...
#include <Any_Impl_T.h>
Template Any class for pointer types.
Used for interfaces and typecodes
Definition at line 42 of file Any_Impl_T.h.
TAO::Any_Impl_T< T >::Any_Impl_T | ( | _tao_destructor | destructor, | |
CORBA::TypeCode_ptr | tc, | |||
T * const | val | |||
) |
Definition at line 25 of file Any_Impl_T.cpp.
TAO::Any_Impl_T< T >::~Any_Impl_T | ( | void | ) | [virtual] |
Definition at line 35 of file Any_Impl_T.cpp.
{ }
void TAO::Any_Impl_T< T >::_tao_decode | ( | TAO_InputCDR & | cdr | ) | [virtual] |
Reimplemented from TAO::Any_Impl.
Definition at line 182 of file Any_Impl_T.cpp.
{
if (! this->demarshal_value (cdr))
{
throw ::CORBA::MARSHAL ();
}
}
CORBA::Boolean TAO::Any_Impl_T< T >::demarshal_value | ( | TAO_InputCDR & | cdr | ) |
Definition at line 12 of file Any_Impl_T.inl.
{
return (cdr >> this->value_);
}
CORBA::Boolean TAO::Any_Impl_T< RTCORBA::ProtocolProperties >::demarshal_value | ( | TAO_InputCDR & | ) |
Definition at line 93 of file RT_ProtocolPropertiesA.cpp.
{ return false; }
CORBA::Boolean TAO::Any_Impl_T< T >::extract | ( | const CORBA::Any & | any, | |
_tao_destructor | destructor, | |||
CORBA::TypeCode_ptr | tc, | |||
T *& | _tao_elem | |||
) | [static] |
Definition at line 56 of file Any_Impl_T.cpp.
{ _tao_elem = 0; try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == 0) { return false; } TAO::Any_Impl * const impl = any.impl (); if (impl && !impl->encoded ()) { TAO::Any_Impl_T<T> * const narrow_impl = dynamic_cast <TAO::Any_Impl_T<T> *> (impl); if (narrow_impl == 0) { return false; } _tao_elem = (T *) narrow_impl->value_; return true; } TAO::Any_Impl_T<T> *replacement = 0; ACE_NEW_RETURN (replacement, TAO::Any_Impl_T<T> (destructor, any_tc, 0), false); auto_ptr<TAO::Any_Impl_T<T> > replacement_safety (replacement); // We know this will work since the unencoded case is covered above. TAO::Unknown_IDL_Type * const unk = dynamic_cast<TAO::Unknown_IDL_Type *> (impl); if (!unk) return false; // We don't want the rd_ptr of unk to move, in case it is // shared by another Any. This copies the state, not the buffer. TAO_InputCDR for_reading (unk->_tao_get_cdr ()); CORBA::Boolean const good_decode = replacement->demarshal_value (for_reading); if (good_decode) { _tao_elem = const_cast<T *> (replacement->value_); const_cast<CORBA::Any &> (any).replace (replacement); replacement_safety.release (); return true; } // Duplicated by Any_Impl base class constructor. ::CORBA::release (any_tc); } catch (const ::CORBA::Exception&) { } return false; }
void TAO::Any_Impl_T< T >::free_value | ( | void | ) | [virtual] |
Reimplemented from TAO::Any_Impl.
Definition at line 168 of file Any_Impl_T.cpp.
{ if (this->value_destructor_ != 0) { (*this->value_destructor_) (this->value_); this->value_destructor_ = 0; } ::CORBA::release (this->type_); this->value_ = 0; }
void TAO::Any_Impl_T< T >::insert | ( | CORBA::Any & | any, | |
_tao_destructor | destructor, | |||
CORBA::TypeCode_ptr | tc, | |||
T * const | value | |||
) | [static] |
Definition at line 41 of file Any_Impl_T.cpp.
CORBA::Boolean TAO::Any_Impl_T< T >::marshal_value | ( | TAO_OutputCDR & | cdr | ) | [virtual] |
Implements TAO::Any_Impl.
Definition at line 154 of file Any_Impl_T.cpp.
{
return (cdr << this->value_);
}
CORBA::Boolean TAO::Any_Impl_T< RTCORBA::ProtocolProperties >::marshal_value | ( | TAO_OutputCDR & | ) | [virtual] |
Implements TAO::Any_Impl.
Definition at line 86 of file RT_ProtocolPropertiesA.cpp.
{ return false; }
CORBA::Boolean TAO::Any_Impl_T< T >::to_abstract_base | ( | CORBA::AbstractBase_ptr & | ) | const [virtual] |
CORBA::Boolean TAO::Any_Impl_T< RTCORBA::ProtocolProperties >::to_object | ( | ::CORBA::Object_ptr & | _tao_elem | ) | const |
Definition at line 73 of file RT_ProtocolPropertiesA.cpp.
{ _tao_elem = ::CORBA::Object::_duplicate (this->value_); return true; }
CORBA::Boolean TAO::Any_Impl_T< CORBA::Policy >::to_object | ( | CORBA::Object_ptr & | _tao_elem | ) | const [virtual] |
Reimplemented from TAO::Any_Impl.
Definition at line 320 of file PolicyA.cpp.
{ _tao_elem = CORBA::Object::_duplicate (this->value_); return true; }
CORBA::Boolean TAO::Any_Impl_T< CORBA::Object >::to_object | ( | CORBA::Object_ptr & | _tao_elem | ) | const [virtual] |
Reimplemented from TAO::Any_Impl.
Definition at line 753 of file Any.cpp.
{ _tao_elem = CORBA::Object::_duplicate (this->value_); return true; }
CORBA::Boolean TAO::Any_Impl_T< T >::to_object | ( | CORBA::Object_ptr & | ) | const [virtual] |
CORBA::Boolean TAO::Any_Impl_T< T >::to_value | ( | CORBA::ValueBase *& | ) | const [virtual] |
const void * TAO::Any_Impl_T< T >::value | ( | void | ) | const [virtual] |
Definition at line 161 of file Any_Impl_T.cpp.
{ return this->value_; }
T* TAO::Any_Impl_T< T >::value_ [private] |
Definition at line 70 of file Any_Impl_T.h.