Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

TAO::Any_Impl Class Reference

Base class for the Any template subclasses. More...

#include <Any_Impl.h>

Inheritance diagram for TAO::Any_Impl:
Inheritance graph
[legend]
Collaboration diagram for TAO::Any_Impl:
Collaboration graph
[legend]

List of all members.

Public Types

typedef void(* _tao_destructor )(void *)

Public Member Functions

CORBA::Boolean marshal (TAO_OutputCDR &)
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &)=0
virtual void free_value (void)
CORBA::TypeCode_ptr type (void) const
CORBA::TypeCode_ptr _tao_get_typecode (void) const
void type (CORBA::TypeCode_ptr)
virtual int _tao_byte_order (void) const
virtual void _add_ref (void)
virtual void _remove_ref (void)
virtual void _tao_decode (TAO_InputCDR &)
virtual CORBA::Boolean to_object (CORBA::Object_ptr &) const
virtual CORBA::Boolean to_value (CORBA::ValueBase *&) const
virtual CORBA::Boolean to_abstract_base (CORBA::AbstractBase_ptr &) const
bool encoded (void) const

Static Public Member Functions

static void _tao_any_string_destructor (void *)
 Used to release these CORBA basic types.
static void _tao_any_wstring_destructor (void *)

Protected Member Functions

 Any_Impl (_tao_destructor, CORBA::TypeCode_ptr, bool encoded=false)
virtual ~Any_Impl (void)

Protected Attributes

TAO::Any_Impl::_tao_destructor value_destructor_
CORBA::TypeCode_ptr type_
bool encoded_

Private Attributes

ACE_Atomic_Op< TAO_SYNCH_MUTEX,
unsigned long > 
refcount_
 Reference counter.

Detailed Description

Base class for the Any template subclasses.

Contains common functionality and some pure virtual methods.

Definition at line 64 of file Any_Impl.h.


Member Typedef Documentation

typedef void(* TAO::Any_Impl::_tao_destructor)(void *)

Generated data types define a 'destructor' function that correctly destroys an object stored in an Any.

Definition at line 69 of file Any_Impl.h.


Constructor & Destructor Documentation

TAO::Any_Impl::Any_Impl ( _tao_destructor  destructor,
CORBA::TypeCode_ptr  tc,
bool  encoded = false 
) [protected]

Definition at line 19 of file Any_Impl.cpp.

  : value_destructor_ (destructor)
  , type_ (CORBA::TypeCode::_duplicate (tc))
  , encoded_ (encoded)
  , refcount_ (1)
{
}

TAO::Any_Impl::~Any_Impl ( void   )  [protected, virtual]

Definition at line 29 of file Any_Impl.cpp.

{
}


Member Function Documentation

void TAO::Any_Impl::_add_ref ( void   )  [virtual]

Definition at line 91 of file Any_Impl.cpp.

{
  ++this->refcount_;
}

void TAO::Any_Impl::_remove_ref ( void   )  [virtual]

Definition at line 97 of file Any_Impl.cpp.

{
  const CORBA::ULong new_count = --this->refcount_;

  if (new_count != 0)
    return;

  this->free_value ();

  delete this;
}

void TAO::Any_Impl::_tao_any_string_destructor ( void *  x  )  [static]

Used to release these CORBA basic types.

Definition at line 77 of file Any_Impl.cpp.

{
  char *tmp = static_cast<char *> (x);
  CORBA::string_free (tmp);
}

void TAO::Any_Impl::_tao_any_wstring_destructor ( void *  x  )  [static]

Definition at line 84 of file Any_Impl.cpp.

{
  CORBA::WChar *tmp = static_cast<CORBA::WChar *> (x);
  CORBA::wstring_free (tmp);
}

int TAO::Any_Impl::_tao_byte_order ( void   )  const [virtual]

Reimplemented in TAO::Unknown_IDL_Type.

Definition at line 71 of file Any_Impl.cpp.

{
  return TAO_ENCAP_BYTE_ORDER;
}

void TAO::Any_Impl::_tao_decode ( TAO_InputCDR  )  [virtual]
CORBA::TypeCode_ptr TAO::Any_Impl::_tao_get_typecode ( void   )  const

Definition at line 58 of file Any_Impl.cpp.

{
  return this->type_;
}

bool TAO::Any_Impl::encoded ( void   )  const

Definition at line 135 of file Any_Impl.cpp.

{
  return this->encoded_;
}

void TAO::Any_Impl::free_value ( void   )  [virtual]
CORBA::Boolean TAO::Any_Impl::marshal ( TAO_OutputCDR cdr  ) 

Definition at line 34 of file Any_Impl.cpp.

{
  if ((cdr << this->type_) == 0)
    {
      return false;
    }

  return this->marshal_value (cdr);
}

virtual CORBA::Boolean TAO::Any_Impl::marshal_value ( TAO_OutputCDR  )  [pure virtual]
CORBA::Boolean TAO::Any_Impl::to_abstract_base ( CORBA::AbstractBase_ptr  )  const [virtual]

Reimplemented in TAO::Any_Impl_T< T >, and TAO::Unknown_IDL_Type.

Definition at line 129 of file Any_Impl.cpp.

{
  return false;
}

CORBA::Boolean TAO::Any_Impl::to_object ( CORBA::Object_ptr  )  const [virtual]

Reimplemented in TAO::Any_Impl_T< T >, TAO::Unknown_IDL_Type, TAO::Any_Impl_T< T >, and TAO::Any_Impl_T< T >.

Definition at line 117 of file Any_Impl.cpp.

{
  return false;
}

CORBA::Boolean TAO::Any_Impl::to_value ( CORBA::ValueBase *&   )  const [virtual]

Reimplemented in TAO::Any_Impl_T< T >, and TAO::Unknown_IDL_Type.

Definition at line 123 of file Any_Impl.cpp.

{
  return false;
}

CORBA::TypeCode_ptr TAO::Any_Impl::type ( void   )  const

Definition at line 52 of file Any_Impl.cpp.

{
  return CORBA::TypeCode::_duplicate (this->type_);
}

void TAO::Any_Impl::type ( CORBA::TypeCode_ptr  tc  ) 

Definition at line 64 of file Any_Impl.cpp.


Member Data Documentation

bool TAO::Any_Impl::encoded_ [protected]

Definition at line 105 of file Any_Impl.h.

ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> TAO::Any_Impl::refcount_ [private]

Reference counter.

Definition at line 109 of file Any_Impl.h.

CORBA::TypeCode_ptr TAO::Any_Impl::type_ [protected]

Definition at line 104 of file Any_Impl.h.

TAO::Any_Impl::_tao_destructor TAO::Any_Impl::value_destructor_ [protected]

Definition at line 103 of file Any_Impl.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines