Generic container for IDL types. More...
#include <Any.h>
Generic container for IDL types.
This is the top-level class of the Any implementation. It exposes the spec-required functionality, but is mostly a wrapper for one of the template classes below.
Definition at line 64 of file Any.h.
typedef Any_out CORBA::Any::_out_type |
typedef Any_ptr CORBA::Any::_ptr_type |
typedef Any_var CORBA::Any::_var_type |
These are needed for insertion and extraction of booleans, octets, chars, and bounded strings. CORBA spec requires that they be here, we just typedef to the already-defined ACE_OutputCDR types.
These extract octets, chars, booleans, bounded strings, and object references. All these are defined in ACE_InputCDR.
CORBA::Any::Any | ( | const Any & | rhs | ) |
CORBA::Any::~Any | ( | void | ) |
void CORBA::Any::_tao_any_destructor | ( | void * | x | ) | [static] |
Used in our destruction if we ourselves are stored in an Any.
Definition at line 156 of file Any.cpp.
{ CORBA::Any *tmp = static_cast<CORBA::Any *> (x); delete tmp; }
int CORBA::Any::_tao_byte_order | ( | void | ) | const |
CORBA::TypeCode_ptr CORBA::Any::_tao_get_typecode | ( | void | ) | const |
void CORBA::Any::_tao_set_typecode | ( | const CORBA::TypeCode_ptr | tc | ) |
CORBA::Boolean CORBA::Any::checked_to_abstract_base | ( | CORBA::AbstractBase_ptr & | _tao_elem | ) | const [private] |
CORBA::Boolean CORBA::Any::checked_to_object | ( | CORBA::Object_ptr & | _tao_elem | ) | const [private] |
CORBA::Boolean CORBA::Any::checked_to_value | ( | CORBA::ValueBase *& | _tao_elem | ) | const [private] |
TAO::Any_Impl * CORBA::Any::impl | ( | void | ) | const |
void CORBA::Any::operator<<= | ( | from_string | s | ) |
Definition at line 332 of file Any.cpp.
{ if (s.bound_ > 0 && s.val_ != 0 && ACE_OS::strlen (s.val_) > s.bound_) { return; } TAO::Any_Special_Impl_T< char, CORBA::Any::from_string, CORBA::Any::to_string >::insert (*this, TAO::Any_Impl::_tao_any_string_destructor, CORBA::_tc_string, s.nocopy_ ? s.val_ : CORBA::string_dup (s.val_), s.bound_); }
void CORBA::Any::operator<<= | ( | from_wstring | ws | ) |
Definition at line 351 of file Any.cpp.
{ if (ws.bound_ > 0 && ws.val_ != 0 && ACE_OS::wslen (ws.val_) > ws.bound_) { return; } TAO::Any_Special_Impl_T< CORBA::WChar, CORBA::Any::from_wstring, CORBA::Any::to_wstring >::insert (*this, TAO::Any_Impl::_tao_any_wstring_destructor, CORBA::_tc_wstring, ws.nocopy_ ? ws.val_ : CORBA::wstring_dup (ws.val_), ws.bound_); }
void CORBA::Any::operator<<= | ( | from_boolean | b | ) |
Insertion of the special types.
Definition at line 308 of file Any.cpp.
{ TAO::Any_Basic_Impl::insert (*this, CORBA::_tc_boolean, &b.val_); }
void CORBA::Any::operator<<= | ( | from_char | c | ) |
Definition at line 320 of file Any.cpp.
{ TAO::Any_Basic_Impl::insert (*this, CORBA::_tc_char, &c.val_); }
void CORBA::Any::operator<<= | ( | from_wchar | wc | ) |
Definition at line 326 of file Any.cpp.
{ TAO::Any_Basic_Impl::insert (*this, CORBA::_tc_wchar, &wc.val_); }
void CORBA::Any::operator<<= | ( | from_octet | o | ) |
Definition at line 314 of file Any.cpp.
{ TAO::Any_Basic_Impl::insert (*this, CORBA::_tc_octet, &o.val_); }
void CORBA::Any::operator<<= | ( | unsigned | char | ) | [private] |
CORBA::Any & CORBA::Any::operator= | ( | const Any & | rhs | ) |
CORBA::Boolean CORBA::Any::operator>>= | ( | to_value | obj | ) | const |
Definition at line 604 of file Any.cpp.
{ return this->checked_to_value (obj.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_wchar | wc | ) | const |
Definition at line 556 of file Any.cpp.
{ return TAO::Any_Basic_Impl::extract (*this, CORBA::_tc_wchar, &wc.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_wstring | ws | ) | const |
Definition at line 577 of file Any.cpp.
{ return TAO::Any_Special_Impl_T< CORBA::WChar, CORBA::Any::from_wstring, CORBA::Any::to_wstring >::extract (*this, TAO::Any_Impl::_tao_any_wstring_destructor, CORBA::_tc_wstring, ws.val_, ws.bound_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_octet | o | ) | const |
Definition at line 544 of file Any.cpp.
{ return TAO::Any_Basic_Impl::extract (*this, CORBA::_tc_octet, &o.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_object | obj | ) | const |
Definition at line 592 of file Any.cpp.
{ return this->checked_to_object (obj.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | unsigned char & | ) | const [private] |
CORBA::Boolean CORBA::Any::operator>>= | ( | to_boolean | b | ) | const |
Extraction of the special types.
Definition at line 538 of file Any.cpp.
{ return TAO::Any_Basic_Impl::extract (*this, CORBA::_tc_boolean, &b.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_abstract_base | obj | ) | const |
Definition at line 598 of file Any.cpp.
{ return this->checked_to_abstract_base (obj.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_char | c | ) | const |
Definition at line 550 of file Any.cpp.
{ return TAO::Any_Basic_Impl::extract (*this, CORBA::_tc_char, &c.ref_); }
CORBA::Boolean CORBA::Any::operator>>= | ( | to_string | s | ) | const |
Definition at line 562 of file Any.cpp.
{ return TAO::Any_Special_Impl_T< char, CORBA::Any::from_string, CORBA::Any::to_string >::extract (*this, TAO::Any_Impl::_tao_any_string_destructor, CORBA::_tc_string, s.val_, s.bound_); }
void CORBA::Any::replace | ( | TAO::Any_Impl * | new_impl | ) |
void CORBA::Any::type | ( | CORBA::TypeCode_ptr | tc | ) |
For use along with <<= of a value of aliased type when the alias must be preserved.
Definition at line 135 of file Any.cpp.
{ CORBA::Boolean equiv = false; if (this->impl_ != 0) { equiv = this->impl_->_tao_get_typecode ()->equivalent (tc); } if (equiv) { this->impl_->type (tc); } else { throw ::CORBA::BAD_TYPECODE (); } }
CORBA::TypeCode_ptr CORBA::Any::type | ( | void | ) | const |
Return TypeCode of the element stored in the Any.
Definition at line 88 of file Any.cpp.
{ if (this->impl_ != 0) { return this->impl_->type (); } return CORBA::TypeCode::_duplicate (CORBA::_tc_null); }
friend class TAO_Marshal_Any [friend] |
TAO::Any_Impl* CORBA::Any::impl_ [private] |