Namespaces | Functions

Any.cpp File Reference

#include "tao/AnyTypeCode/Any.h"
#include "tao/AnyTypeCode/Any_Basic_Impl.h"
#include "tao/AnyTypeCode/Any_Impl_T.h"
#include "tao/AnyTypeCode/Any_Special_Impl_T.h"
#include "tao/AnyTypeCode/Any_Dual_Impl_T.h"
#include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h"
#include "tao/AnyTypeCode/TypeCode.h"
#include "tao/AnyTypeCode/TypeCode_Constants.h"
#include "tao/CDR.h"
#include "tao/SystemException.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_wchar.h"
#include "ace/OS_Memory.h"
Include dependency graph for Any.cpp:

Go to the source code of this file.

Namespaces

namespace  TAO
 

Define symbolic names for the ORB collocation strategies.


Functions

CORBA::Boolean operator<< (TAO_OutputCDR &cdr, const CORBA::Any &any)
CORBA::Boolean operator>> (TAO_InputCDR &cdr, CORBA::Any &any)
void operator<<= (CORBA::Any &any, CORBA::Short s)
 Typesafe insertion.
void operator<<= (CORBA::Any &any, CORBA::UShort us)
void operator<<= (CORBA::Any &any, CORBA::Long l)
void operator<<= (CORBA::Any &any, CORBA::ULong ul)
void operator<<= (CORBA::Any &any, CORBA::LongLong ll)
void operator<<= (CORBA::Any &any, CORBA::ULongLong ull)
void operator<<= (CORBA::Any &any, CORBA::Float f)
void operator<<= (CORBA::Any &any, CORBA::Double d)
void operator<<= (CORBA::Any &any, CORBA::LongDouble ld)
void operator<<= (CORBA::Any &any, const CORBA::Any &a)
void operator<<= (CORBA::Any &any, CORBA::Any *a)
void operator<<= (CORBA::Any &any, CORBA::TypeCode_ptr tc)
void operator<<= (CORBA::Any &any, CORBA::TypeCode_ptr *tc)
void operator<<= (CORBA::Any &any, const CORBA::Object_ptr obj)
void operator<<= (CORBA::Any &any, CORBA::Object_ptr *objptr)
void operator<<= (CORBA::Any &any, const char *s)
void operator<<= (CORBA::Any &any, const CORBA::WChar *ws)
void operator<<= (CORBA::Any &any, const std::string &str)
void operator<<= (CORBA::Any &, std::string *)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::Short &s)
 Typesafe extraction.
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::UShort &us)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::Long &l)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::ULong &ul)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::LongLong &ll)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::ULongLong &ull)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::Float &f)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::Double &d)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::LongDouble &ld)
CORBA::Boolean operator>>= (const CORBA::Any &any, const CORBA::Any *&a)
CORBA::Boolean operator>>= (const CORBA::Any &any, const CORBA::Char *&s)
CORBA::Boolean operator>>= (const CORBA::Any &any, const CORBA::WChar *&ws)
CORBA::Boolean operator>>= (const CORBA::Any &any, CORBA::TypeCode_ptr &tc)
CORBA::Boolean operator>>= (const CORBA::Any &any, std::string &str)

Function Documentation

CORBA::Boolean operator<< ( TAO_OutputCDR cdr,
const CORBA::Any any 
)

Definition at line 253 of file Any.cpp.

{
  TAO::Any_Impl *impl = any.impl ();

  if (impl != 0)
    {
      return impl->marshal (cdr);
    }

  return (cdr << CORBA::_tc_null);
}

void operator<<= ( CORBA::Any any,
CORBA::UShort  us 
)

Definition at line 378 of file Any.cpp.

void operator<<= ( CORBA::Any any,
CORBA::ULongLong  ull 
)

Definition at line 402 of file Any.cpp.

void operator<<= ( CORBA::Any any,
const CORBA::Object_ptr  obj 
)

Definition at line 472 of file Any.cpp.

{
  CORBA::Object_ptr dup = CORBA::Object::_duplicate (obj);
  any <<= &dup;
}

void operator<<= ( CORBA::Any any,
CORBA::Object_ptr objptr 
)

Definition at line 480 of file Any.cpp.

{
  TAO::Any_Impl_T<CORBA::Object>::insert (any,
                                          CORBA::Object::_tao_any_destructor,
                                          CORBA::_tc_Object,
                                          *objptr);
}

void operator<<= ( CORBA::Any any,
CORBA::Float  f 
)

Definition at line 408 of file Any.cpp.

void operator<<= ( CORBA::Any any,
const char *  s 
)

Definition at line 492 of file Any.cpp.

{
  TAO::Any_Special_Impl_T<
      char,
      CORBA::Any::from_string,
      CORBA::Any::to_string
    >::insert (any,
               TAO::Any_Impl::_tao_any_string_destructor,
               CORBA::_tc_string,
               CORBA::string_dup (s),
               0);
}

void operator<<= ( CORBA::Any any,
const CORBA::WChar ws 
)

Definition at line 506 of file Any.cpp.

{
  TAO::Any_Special_Impl_T<
      CORBA::WChar,
      CORBA::Any::from_wstring,
      CORBA::Any::to_wstring
    >::insert (any,
               TAO::Any_Impl::_tao_any_wstring_destructor,
               CORBA::_tc_wstring,
               CORBA::wstring_dup (ws),
               0);
}

void operator<<= ( CORBA::Any any,
CORBA::Long  l 
)

Definition at line 384 of file Any.cpp.

void operator<<= ( CORBA::Any any,
CORBA::Double  d 
)

Definition at line 414 of file Any.cpp.

void operator<<= ( CORBA::Any any,
const std::string &  str 
)

Definition at line 520 of file Any.cpp.

{
  any <<= str.c_str ();
}

void operator<<= ( CORBA::Any ,
std::string *   
)

Definition at line 526 of file Any.cpp.

{
  // TODO
}

void operator<<= ( CORBA::Any any,
CORBA::LongDouble  ld 
)

Definition at line 420 of file Any.cpp.

void operator<<= ( CORBA::Any any,
CORBA::Short  s 
)

Typesafe insertion.

Definition at line 372 of file Any.cpp.

void operator<<= ( CORBA::Any any,
CORBA::ULong  ul 
)

Definition at line 390 of file Any.cpp.

void operator<<= ( CORBA::Any any,
const CORBA::Any a 
)

Definition at line 427 of file Any.cpp.

{
  if (0 == &a) // Trying to de-reference NULL Any
    any <<= static_cast<CORBA::Any *>( 0 ); // Use non-copying insertion of a NULL
  else
    TAO::Any_Dual_Impl_T<CORBA::Any>::insert_copy (
        any,
        CORBA::Any::_tao_any_destructor,
        CORBA::_tc_any,
        a
      );
}

void operator<<= ( CORBA::Any any,
CORBA::Any a 
)

Definition at line 442 of file Any.cpp.

{
  TAO::Any_Dual_Impl_T<CORBA::Any>::insert (any,
                                            CORBA::Any::_tao_any_destructor,
                                            CORBA::_tc_any,
                                            a);
}

void operator<<= ( CORBA::Any any,
CORBA::LongLong  ll 
)

Definition at line 396 of file Any.cpp.

void operator<<= ( CORBA::Any any,
CORBA::TypeCode_ptr  tc 
)

Definition at line 452 of file Any.cpp.

void operator<<= ( CORBA::Any any,
CORBA::TypeCode_ptr tc 
)

Definition at line 460 of file Any.cpp.

{
  TAO::Any_Impl_T<CORBA::TypeCode>::insert (
      any,
      CORBA::TypeCode::_tao_any_destructor,
      CORBA::_tc_TypeCode,
      *tc
    );
}

CORBA::Boolean operator>> ( TAO_InputCDR cdr,
CORBA::Any any 
)

Definition at line 266 of file Any.cpp.

{
  CORBA::TypeCode_var tc;

  if ((cdr >> tc.out ()) == 0)
    {
      return false;
    }

  try
    {
      TAO::Unknown_IDL_Type *impl = 0;
      ACE_NEW_RETURN (impl,
                      TAO::Unknown_IDL_Type (tc.in ()),
                      false);

      any.replace (impl);
      impl->_tao_decode (cdr);
    }
  catch (const ::CORBA::Exception&)
    {
      return false;
    }

  return true;
}

CORBA::Boolean operator>>= ( const CORBA::Any any,
const CORBA::Char *&  s 
)

Definition at line 696 of file Any.cpp.

{
  return
    TAO::Any_Special_Impl_T<
        char,
        CORBA::Any::from_string,
        CORBA::Any::to_string
      >::extract (any,
                  TAO::Any_Impl::_tao_any_string_destructor,
                  CORBA::_tc_string,
                  s,
                  0);
}

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::Double d 
)

Definition at line 668 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::Short s 
)

Typesafe extraction.

Definition at line 612 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::UShort us 
)

Definition at line 618 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::LongLong ll 
)

Definition at line 642 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::ULongLong ull 
)

Definition at line 651 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
const CORBA::Any *&  a 
)

Definition at line 685 of file Any.cpp.

{
  return TAO::Any_Dual_Impl_T<CORBA::Any>::extract (
      any,
      CORBA::Any::_tao_any_destructor,
      CORBA::_tc_any,
      a
    );
}

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::LongDouble ld 
)

Definition at line 676 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
const CORBA::WChar *&  ws 
)

Definition at line 711 of file Any.cpp.

{
  return
    TAO::Any_Special_Impl_T<
        CORBA::WChar,
        CORBA::Any::from_wstring,
        CORBA::Any::to_wstring
      >::extract (any,
                  TAO::Any_Impl::_tao_any_wstring_destructor,
                  CORBA::_tc_wstring,
                  ws,
                  0);
}

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::Float f 
)

Definition at line 660 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::ULong ul 
)

Definition at line 634 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::Long l 
)

Definition at line 626 of file Any.cpp.

CORBA::Boolean operator>>= ( const CORBA::Any any,
std::string &  str 
)

Definition at line 737 of file Any.cpp.

{
  const char *buf = 0;
  CORBA::Boolean flag = any >>= buf;
  str.assign (buf);
  ACE::strdelete (const_cast <char *> (buf));
  return flag;
}

CORBA::Boolean operator>>= ( const CORBA::Any any,
CORBA::TypeCode_ptr tc 
)

Definition at line 726 of file Any.cpp.

{
  return TAO::Any_Impl_T<CORBA::TypeCode>::extract (
      any,
      CORBA::TypeCode::_tao_any_destructor,
      CORBA::_tc_TypeCode,
      tc
    );
}

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines