TAO_OutputCDR Class Reference

A CDR stream for writing, i.e. for marshalling. More...

#include <CDR.h>

Inheritance diagram for TAO_OutputCDR:

Inheritance graph
[legend]
Collaboration diagram for TAO_OutputCDR:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_OutputCDR (size_t size=0, int byte_order=ACE_CDR_BYTE_ORDER, ACE_Allocator *buffer_allocator=0, ACE_Allocator *data_block_allocator=0, ACE_Allocator *message_block_allocator=0, size_t memcpy_tradeoff=0, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR)
 TAO_OutputCDR (char *data, size_t size, int byte_order=ACE_CDR_BYTE_ORDER, ACE_Allocator *buffer_allocator=0, ACE_Allocator *data_block_allocator=0, ACE_Allocator *message_block_allocator=0, size_t memcpy_tradeoff=0, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR)
 TAO_OutputCDR (ACE_Message_Block *data, int byte_order=ACE_CDR_BYTE_ORDER, size_t memcpy_tradeoff=0, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR)
 ~TAO_OutputCDR (void)
 Destructor.

Static Public Member Functions

static void throw_stub_exception (int error_num ACE_ENV_ARG_DECL)
static void throw_skel_exception (int error_num ACE_ENV_ARG_DECL)

Private Member Functions

 TAO_OutputCDR (const TAO_OutputCDR &rhs)
 disallow copying...
TAO_OutputCDRoperator= (const TAO_OutputCDR &rhs)

Friends

class TAO_InputCDR
 For reading from a output CDR stream.

Detailed Description

A CDR stream for writing, i.e. for marshalling.

This class is based on the the CORBA spec for Java (98-02-29), java class omg.org.CORBA.portable.OutputStream. It diverts in a few ways: + Operations taking arrays don't have offsets, because in C++ it is easier to describe an array starting from x+offset. + Operations return an error status, because exceptions are not widely available in C++ (yet). A particularly useful static member function for this buffer is an interpretive encoding routine, usable as a typecode interpreter callback. Ditto for decoding. These are used to support all OMG-IDL datatypes, even those not supported directly by put/get primitives.


Constructor & Destructor Documentation

TAO_OutputCDR::TAO_OutputCDR size_t  size = 0,
int  byte_order = ACE_CDR_BYTE_ORDER,
ACE_Allocator buffer_allocator = 0,
ACE_Allocator data_block_allocator = 0,
ACE_Allocator message_block_allocator = 0,
size_t  memcpy_tradeoff = 0,
ACE_CDR::Octet  major_version = TAO_DEF_GIOP_MAJOR,
ACE_CDR::Octet  minor_version = TAO_DEF_GIOP_MINOR
 

Default constructor, allocates <size> bytes in the internal buffer, if <size> == 0 it allocates the default size.

TAO_OutputCDR::TAO_OutputCDR char *  data,
size_t  size,
int  byte_order = ACE_CDR_BYTE_ORDER,
ACE_Allocator buffer_allocator = 0,
ACE_Allocator data_block_allocator = 0,
ACE_Allocator message_block_allocator = 0,
size_t  memcpy_tradeoff = 0,
ACE_CDR::Octet  major_version = TAO_DEF_GIOP_MAJOR,
ACE_CDR::Octet  minor_version = TAO_DEF_GIOP_MINOR
 

Build a CDR stream with an initial buffer, it will *not* remove <data>, since it did not allocated it.

TAO_OutputCDR::TAO_OutputCDR ACE_Message_Block data,
int  byte_order = ACE_CDR_BYTE_ORDER,
size_t  memcpy_tradeoff = 0,
ACE_CDR::Octet  major_version = TAO_DEF_GIOP_MAJOR,
ACE_CDR::Octet  minor_version = TAO_DEF_GIOP_MINOR
 

Build a CDR stream with an initial Message_Block chain, it will *not* remove <data>, since it did not allocate it.

ACE_INLINE TAO_OutputCDR::~TAO_OutputCDR void   ) 
 

Destructor.

TAO_OutputCDR::TAO_OutputCDR const TAO_OutputCDR rhs  )  [private]
 

disallow copying...


Member Function Documentation

TAO_OutputCDR& TAO_OutputCDR::operator= const TAO_OutputCDR rhs  )  [private]
 

void TAO_OutputCDR::throw_skel_exception int error_num  ACE_ENV_ARG_DECL  )  [static]
 

void TAO_OutputCDR::throw_stub_exception int error_num  ACE_ENV_ARG_DECL  )  [static]
 


Friends And Related Function Documentation

friend class TAO_InputCDR [friend]
 

For reading from a output CDR stream.


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 16:03:39 2005 for TAO by  doxygen 1.4.5