Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_OutputCDR Class Reference

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

`#include <CDR_Stream.h>`

Collaboration diagram for ACE_OutputCDR:

[legend]
List of all members.

## Public Methods
| ACE_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=ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION)
| Default constructor, allocates <size> bytes in the internal buffer, if <size> == 0 it allocates the default size. More...
| ACE_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=ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, ACE_CDR::Octet giop_major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet giop_minor_version=ACE_CDR_GIOP_MINOR_VERSION)
| Create an output stream from an arbitrary buffer, care must be exercised with alignment, because this contructor will align if needed. More...
| ACE_OutputCDR (ACE_Message_Block *data, int byte_order=ACE_CDR_BYTE_ORDER, size_t memcpy_tradeoff=ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, ACE_CDR::Octet giop_major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet giop_minor_version=ACE_CDR_GIOP_MINOR_VERSION)
| Build a CDR stream with an initial Message_Block chain, it will *not* remove <data>, since it did not allocate it. More...
| ~ACE_OutputCDR (void)
| destructor. More...
int | good_bit (void) const
| Returns 0 if an error has ocurred, the only expected error is to run out of memory. More...
void | reset (void)
| Reuse the CDR stream to write on the old buffer. More...
size_t | total_length (void) const
| Add the length of each message block in the chain. More...
const ACE_Message_Block * | begin (void) const
| Return the start of the message block chain for this CDR stream. More...
const ACE_Message_Block * | end (void) const
| Return the last message in the chain that is is use. More...
const ACE_Message_Block * | current (void) const
| Return the <current_> message block in chain. More...
const char * | buffer (void) const
| Access the underlying buffer (read only). More...
size_t | length (void) const
| Return the start and size of the internal buffer. More...
int | align_write_ptr (size_t alignment)
| Utility function to allow the user more flexibility. More...
ACE_Char_Codeset_Translator * | char_translator (void) const
| Access the codeset translators. They can be nil! More...
ACE_WChar_Codeset_Translator * | wchar_translator (void) const
size_t | current_alignment (void) const
| Return alignment of the wr_ptr(), with respect to the start of the CDR stream. More...
int | adjust (size_t size, char *&buf)
| Returns (in <buf>) the next position in the buffer aligned to <size>, it advances the Message_Block wr_ptr past the data (i.e., <buf> + <size>). More...
int | adjust (size_t size, size_t align, char *&buf)
| As above, but now the size and alignment requirements may be different. More...
int | do_byte_swap (void) const
| If non-zero then this stream is writing in non-native byte order, this is only meaningful if ACE_ENABLE_SWAP_ON_WRITE is defined. More...
void | reset_byte_order (int byte_order)
| For use by a gateway, which creates the output stream for the reply to the client in its native byte order, but which must send the reply in the byte order of the target's reply to the gateway. More...
int | set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor)
| set GIOP version info. More...
int | get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor)
| Set the underlying GIOP version.. More...
Write operations
ACE_CDR::Boolean | write_boolean (ACE_CDR::Boolean x)
ACE_CDR::Boolean | write_char (ACE_CDR::Char x)
ACE_CDR::Boolean | write_wchar (ACE_CDR::WChar x)
ACE_CDR::Boolean | write_octet (ACE_CDR::Octet x)
ACE_CDR::Boolean | write_short (ACE_CDR::Short x)
ACE_CDR::Boolean | write_ushort (ACE_CDR::UShort x)
ACE_CDR::Boolean | write_long (ACE_CDR::Long x)
ACE_CDR::Boolean | write_ulong (ACE_CDR::ULong x)
ACE_CDR::Boolean | write_longlong (const ACE_CDR::LongLong &x)
ACE_CDR::Boolean | write_ulonglong (const ACE_CDR::ULongLong &x)
ACE_CDR::Boolean | write_float (ACE_CDR::Float x)
ACE_CDR::Boolean | write_double (const ACE_CDR::Double &x)
ACE_CDR::Boolean | write_longdouble (const ACE_CDR::LongDouble &x)
ACE_CDR::Boolean | write_string (const ACE_CDR::Char *x)
| For string we offer methods that accept a precomputed length. More...
ACE_CDR::Boolean | write_string (ACE_CDR::ULong len, const ACE_CDR::Char *x)
ACE_CDR::Boolean | write_string (const ACE_CString &x)
ACE_CDR::Boolean | write_wstring (const ACE_CDR::WChar *x)
ACE_CDR::Boolean | write_wstring (ACE_CDR::ULong length, const ACE_CDR::WChar *x)
Array write operations
ACE_CDR::Boolean | write_boolean_array (const ACE_CDR::Boolean *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_char_array (const ACE_CDR::Char *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_wchar_array (const ACE_CDR::WChar *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_octet_array (const ACE_CDR::Octet *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_short_array (const ACE_CDR::Short *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_ushort_array (const ACE_CDR::UShort *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_long_array (const ACE_CDR::Long *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_ulong_array (const ACE_CDR::ULong *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_longlong_array (const ACE_CDR::LongLong *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_ulonglong_array (const ACE_CDR::ULongLong *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_float_array (const ACE_CDR::Float *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_double_array (const ACE_CDR::Double *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_longdouble_array (const ACE_CDR::LongDouble *x, ACE_CDR::ULong length)
ACE_CDR::Boolean | write_octet_array_mb (const ACE_Message_Block *mb)
| Write an octet array contained inside a MB, this can be optimized to minimize copies. More...
Append contents of own CDR stream to another
ACE_CDR::Boolean | append_boolean (ACE_InputCDR &)
ACE_CDR::Boolean | append_char (ACE_InputCDR &)
ACE_CDR::Boolean | append_wchar (ACE_InputCDR &)
ACE_CDR::Boolean | append_octet (ACE_InputCDR &)
ACE_CDR::Boolean | append_short (ACE_InputCDR &)
ACE_CDR::Boolean | append_ushort (ACE_InputCDR &)
ACE_CDR::Boolean | append_long (ACE_InputCDR &)
ACE_CDR::Boolean | append_ulong (ACE_InputCDR &)
ACE_CDR::Boolean | append_longlong (ACE_InputCDR &)
ACE_CDR::Boolean | append_ulonglong (ACE_InputCDR &)
ACE_CDR::Boolean | append_float (ACE_InputCDR &)
ACE_CDR::Boolean | append_double (ACE_InputCDR &)
ACE_CDR::Boolean | append_longdouble (ACE_InputCDR &)
ACE_CDR::Boolean | append_wstring (ACE_InputCDR &)
ACE_CDR::Boolean | append_string (ACE_InputCDR &)
## Protected Attributes
ACE_CDR::Octet | major_version_
| GIOP version information. More...
ACE_CDR::Octet | minor_version_
ACE_Char_Codeset_Translator * | char_translator_
| If not nil, invoke for translation of character and string data. More...
ACE_WChar_Codeset_Translator * | wchar_translator_
## Private Methods
| ACE_OutputCDR (const ACE_OutputCDR &rhs)
| disallow copying... More...
ACE_OutputCDR & | operator= (const ACE_OutputCDR &rhs)
ACE_CDR::Boolean | write_1 (const ACE_CDR::Octet *x)
ACE_CDR::Boolean | write_2 (const ACE_CDR::UShort *x)
ACE_CDR::Boolean | write_4 (const ACE_CDR::ULong *x)
ACE_CDR::Boolean | write_8 (const ACE_CDR::ULongLong *x)
ACE_CDR::Boolean | write_16 (const ACE_CDR::LongDouble *x)
ACE_CDR::Boolean | write_array (const void *x, size_t size, size_t align, ACE_CDR::ULong length)
| write an array of <length> elements, each of <size> bytes and the start aligned at a multiple of <align>. More...
int | grow_and_adjust (size_t size, size_t align, char *&buf)
| Grow the CDR stream. More...
## Private Attributes
ACE_Message_Block | start_
| The start of the chain of message blocks. More...
ACE_Message_Block * | current_
| The current block in the chain were we are writing. More...
int | current_is_writable_
| Is the current block writable. More...
size_t | current_alignment_
| The current alignment as measured from the start of the buffer. More...
int | do_byte_swap_
| If not zero swap bytes at writing so the created CDR stream byte order does *not* match the machine byte order. More...
int | good_bit_
| Set to 0 when an error ocurrs. More...
size_t | memcpy_tradeoff_
| Break-even point for copying. More...
## Friends
class | ACE_Char_Codeset_Translator
| The Codeset translators need access to some private members to efficiently marshal arrays For reading from an output CDR stream. More...
class | ACE_WChar_Codeset_Translator
class | ACE_InputCDR

## 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).

## Constructor & Destructor Documentation

ACE_OutputCDR::ACE_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 = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF,
|  | ACE_CDR::Octet | major_version = ACE_CDR_GIOP_MAJOR_VERSION,
|  | ACE_CDR::Octet | minor_version = ACE_CDR_GIOP_MINOR_VERSION
| ) |

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

ACE_OutputCDR::ACE_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 = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF,
|  | ACE_CDR::Octet | major_version = ACE_CDR_GIOP_MAJOR_VERSION,
|  | ACE_CDR::Octet | minor_version = ACE_CDR_GIOP_MINOR_VERSION
| ) |

| Create an output stream from an arbitrary buffer, care must be exercised with alignment, because this contructor will align if needed. In this case <data> will not point to the start off the output stream. begin()->rd_prt() points to the start off the output stream. See ACE_ptr_align_binary() to properly align a pointer and use ACE_CDR::MAX_ALIGNMENT for the correct alignment.

ACE_OutputCDR::ACE_OutputCDR | ( | ACE_Message_Block * | data,
|  | int | byte_order = ACE_CDR_BYTE_ORDER,
|  | size_t | memcpy_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF,
|  | ACE_CDR::Octet | major_version = ACE_CDR_GIOP_MAJOR_VERSION,
|  | ACE_CDR::Octet | minor_version = ACE_CDR_GIOP_MINOR_VERSION
| ) |

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

ACE_INLINE ACE_OutputCDR::~ACE_OutputCDR | ( | void |  | ) |

| destructor.

ACE_OutputCDR::ACE_OutputCDR | ( | const ACE_OutputCDR & | rhs | ) | `[private]`

| disallow copying...

## Member Function Documentation

ACE_INLINE int ACE_OutputCDR::adjust | ( | size_t | size,
|  | size_t | align,
|  | char *& | buf
| ) |

| As above, but now the size and alignment requirements may be different.

ACE_INLINE int ACE_OutputCDR::adjust | ( | size_t | size,
|  | char *& | buf
| ) |

| Returns (in <buf>) the next position in the buffer aligned to <size>, it advances the Message_Block wr_ptr past the data (i.e., <buf> + <size>). If necessary it grows the Message_Block buffer. Sets the good_bit to 0 and returns a -1 on failure.

ACE_INLINE int ACE_OutputCDR::align_write_ptr | ( | size_t | alignment | ) |

| Utility function to allow the user more flexibility. Pads the stream up to the nearest <alignment>-byte boundary. Argument MUST be a power of 2. Returns 0 on success and -1 on failure.

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_boolean | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_char | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_double | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_float | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_long | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_longdouble | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_longlong | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_octet | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_short | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_string | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_ulong | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_ulonglong | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_ushort | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_wchar | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::append_wstring | ( | ACE_InputCDR & | stream | ) |

ACE_INLINE const ACE_Message_Block * ACE_OutputCDR::begin | ( | void |  | ) | const

| Return the start of the message block chain for this CDR stream. NOTE: The complete CDR stream is represented by a chain of message blocks.

ACE_INLINE const char * ACE_OutputCDR::buffer | ( | void |  | ) | const

| Access the underlying buffer (read only). NOTE: This method only returns a pointer to the first block in the chain.

ACE_INLINE ACE_Char_Codeset_Translator * ACE_OutputCDR::char_translator | ( | void |  | ) | const

| Access the codeset translators. They can be nil!

ACE_INLINE const ACE_Message_Block * ACE_OutputCDR::current | ( | void |  | ) | const

| Return the <current_> message block in chain.

ACE_INLINE size_t ACE_OutputCDR::current_alignment | ( | void |  | ) | const

| Return alignment of the wr_ptr(), with respect to the start of the CDR stream. This is not the same as the alignment of current->wr_ptr()!

ACE_INLINE int ACE_OutputCDR::do_byte_swap | ( | void |  | ) | const

| If non-zero then this stream is writing in non-native byte order, this is only meaningful if ACE_ENABLE_SWAP_ON_WRITE is defined.

ACE_INLINE const ACE_Message_Block * ACE_OutputCDR::end | ( | void |  | ) | const

| Return the last message in the chain that is is use.

ACE_INLINE int ACE_OutputCDR::get_version | ( | ACE_CDR::Octet & | major,
|  | ACE_CDR::Octet & | minor
| ) |

| Set the underlying GIOP version..

ACE_INLINE int ACE_OutputCDR::good_bit | ( | void |  | ) | const

| Returns 0 if an error has ocurred, the only expected error is to run out of memory.

int ACE_OutputCDR::grow_and_adjust | ( | size_t | size,
|  | size_t | align,
|  | char *& | buf
| ) | `[private]`

| Grow the CDR stream. When it returns <buf> contains a pointer to memory in the CDR stream, with at least <size> bytes ahead of it and aligned to an <align> boundary. It moved the <wr_ptr> to <buf + size>.

ACE_INLINE size_t ACE_OutputCDR::length | ( | void |  | ) | const

| Return the start and size of the internal buffer. NOTE: This method only returns information about the first block in the chain.

ACE_OutputCDR& ACE_OutputCDR::operator= | ( | const ACE_OutputCDR & | rhs | ) | `[private]`

ACE_INLINE void ACE_OutputCDR::reset | ( | void |  | ) |

| Reuse the CDR stream to write on the old buffer.

ACE_INLINE void ACE_OutputCDR::reset_byte_order | ( | int | byte_order | ) |

| For use by a gateway, which creates the output stream for the reply to the client in its native byte order, but which must send the reply in the byte order of the target's reply to the gateway.

ACE_INLINE int ACE_OutputCDR::set_version | ( | ACE_CDR::Octet | major,
|  | ACE_CDR::Octet | minor
| ) |

| set GIOP version info.

ACE_INLINE size_t ACE_OutputCDR::total_length | ( | void |  | ) | const

| Add the length of each message block in the chain.

ACE_INLINE ACE_WChar_Codeset_Translator * ACE_OutputCDR::wchar_translator | ( | void |  | ) | const

ACE_CDR::Boolean ACE_OutputCDR::write_1 | ( | const ACE_CDR::Octet * | x | ) | `[private]`

ACE_CDR::Boolean ACE_OutputCDR::write_16 | ( | const ACE_CDR::LongDouble * | x | ) | `[private]`

ACE_CDR::Boolean ACE_OutputCDR::write_2 | ( | const ACE_CDR::UShort * | x | ) | `[private]`

ACE_CDR::Boolean ACE_OutputCDR::write_4 | ( | const ACE_CDR::ULong * | x | ) | `[private]`

ACE_CDR::Boolean ACE_OutputCDR::write_8 | ( | const ACE_CDR::ULongLong * | x | ) | `[private]`

ACE_CDR::Boolean ACE_OutputCDR::write_array | ( | const void * | x,
|  | size_t | size,
|  | size_t | align,
|  | ACE_CDR::ULong | length
| ) | `[private]`

| write an array of <length> elements, each of <size> bytes and the start aligned at a multiple of <align>. The elements are assumed to be packed with the right alignment restrictions. It is mostly designed for buffers of the basic types. This operation uses <memcpy>; as explained above it is expected that using assignment is faster that <memcpy> for one element, but for several elements <memcpy> should be more efficient, it could be interesting to find the break even point and optimize for that case, but that would be too platform dependent.

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_boolean | ( | ACE_CDR::Boolean | x | ) |

ACE_CDR::Boolean ACE_OutputCDR::write_boolean_array | ( | const ACE_CDR::Boolean * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_char | ( | ACE_CDR::Char | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_char_array | ( | const ACE_CDR::Char * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_double | ( | const ACE_CDR::Double & | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_double_array | ( | const ACE_CDR::Double * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_float | ( | ACE_CDR::Float | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_float_array | ( | const ACE_CDR::Float * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_long | ( | ACE_CDR::Long | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_long_array | ( | const ACE_CDR::Long * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_longdouble | ( | const ACE_CDR::LongDouble & | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_longdouble_array | ( | const ACE_CDR::LongDouble * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_longlong | ( | const ACE_CDR::LongLong & | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_longlong_array | ( | const ACE_CDR::LongLong * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_octet | ( | ACE_CDR::Octet | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_octet_array | ( | const ACE_CDR::Octet * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_CDR::Boolean ACE_OutputCDR::write_octet_array_mb | ( | const ACE_Message_Block * | mb | ) |

| Write an octet array contained inside a MB, this can be optimized to minimize copies.

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_short | ( | ACE_CDR::Short | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_short_array | ( | const ACE_CDR::Short * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_CDR::Boolean ACE_OutputCDR::write_string | ( | const ACE_CString & | x | ) |

ACE_CDR::Boolean ACE_OutputCDR::write_string | ( | ACE_CDR::ULong | len,
|  | const ACE_CDR::Char * | x
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_string | ( | const ACE_CDR::Char * | x | ) |

| For string we offer methods that accept a precomputed length.

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_ulong | ( | ACE_CDR::ULong | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_ulong_array | ( | const ACE_CDR::ULong * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_ulonglong | ( | const ACE_CDR::ULongLong & | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_ulonglong_array | ( | const ACE_CDR::ULongLong * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_ushort | ( | ACE_CDR::UShort | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_ushort_array | ( | const ACE_CDR::UShort * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_CDR::Boolean ACE_OutputCDR::write_wchar | ( | ACE_CDR::WChar | x | ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_wchar_array | ( | const ACE_CDR::WChar * | x,
|  | ACE_CDR::ULong | length
| ) |

ACE_CDR::Boolean ACE_OutputCDR::write_wstring | ( | ACE_CDR::ULong | len,
|  | const ACE_CDR::WChar * | x
| ) |

ACE_INLINE ACE_CDR::Boolean ACE_OutputCDR::write_wstring | ( | const ACE_CDR::WChar * | x | ) |

## Friends And Related Function Documentation

friend class ACE_Char_Codeset_Translator`[friend]`

| The Codeset translators need access to some private members to efficiently marshal arrays For reading from an output CDR stream.

friend class ACE_InputCDR`[friend]`

friend class ACE_WChar_Codeset_Translator`[friend]`

## Member Data Documentation

ACE_Char_Codeset_Translator* ACE_OutputCDR::char_translator_`[protected]`

| If not nil, invoke for translation of character and string data.

ACE_Message_Block* ACE_OutputCDR::current_`[private]`

| The current block in the chain were we are writing.

size_t ACE_OutputCDR::current_alignment_`[private]`

| The current alignment as measured from the start of the buffer. Usually this coincides with the alignment of the buffer in memory, but, when we chain another buffer this "quasi invariant" is broken. The current_alignment is used to readjust the buffer following the stolen message block.

int ACE_OutputCDR::current_is_writable_`[private]`

| Is the current block writable. When we steal a buffer from the user and just chain it into the message block we are not supposed to write on it, even if it is past the start and end of the buffer.

int ACE_OutputCDR::do_byte_swap_`[private]`

| If not zero swap bytes at writing so the created CDR stream byte order does *not* match the machine byte order. The motivation for such a beast is that in some setting a few (fast) machines can be serving hundreds of slow machines with the opposite byte order, so it makes sense (as a load balancing device) to put the responsability in the writers. THIS IS NOT A STANDARD IN CORBA, USE AT YOUR OWN RISK

int ACE_OutputCDR::good_bit_`[private]`

| Set to 0 when an error ocurrs.

ACE_CDR::Octet ACE_OutputCDR::major_version_`[protected]`

| GIOP version information.

size_t ACE_OutputCDR::memcpy_tradeoff_`[private]`

| Break-even point for copying.

ACE_CDR::Octet ACE_OutputCDR::minor_version_`[protected]`

ACE_Message_Block ACE_OutputCDR::start_`[private]`

| The start of the chain of message blocks.

ACE_WChar_Codeset_Translator* ACE_OutputCDR::wchar_translator_`[protected]`

The documentation for this class was generated from the following files:

- CDR_Stream.h
- CDR_Stream.cpp
- CDR_Stream.i