ACE_SizeCDR Class Reference

A CDR stream for calculating size of the representation. More...

#include <CDR_Size.h>

List of all members.

Public Member Functions

 ACE_SizeCDR (ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION)
 Default constructor.
bool good_bit (void) const
 Returns false if an error has ocurred.
void reset (void)
 Reset current size.
size_t total_length (void) const
 Return current size.
ACE_CDR::Boolean write_boolean (ACE_CDR::Boolean x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_char (ACE_CDR::Char x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_wchar (ACE_CDR::WChar x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_octet (ACE_CDR::Octet x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_short (ACE_CDR::Short x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_ushort (ACE_CDR::UShort x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_long (ACE_CDR::Long x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_ulong (ACE_CDR::ULong x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_longlong (const ACE_CDR::LongLong &x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_ulonglong (const ACE_CDR::ULongLong &x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_float (ACE_CDR::Float x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_double (const ACE_CDR::Double &x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_longdouble (const ACE_CDR::LongDouble &x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_string (const ACE_CDR::Char *x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_string (ACE_CDR::ULong len, const ACE_CDR::Char *x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_string (const ACE_CString &x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_wstring (const ACE_CDR::WChar *x)
 For string we offer methods that accept a precomputed length.
ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length, const ACE_CDR::WChar *x)
 For string we offer methods that accept a precomputed length.
bool good_bit_
 Set to false when an error ocurrs.
size_t size_
 Current size.
ACE_CDR::Octet major_version_
 GIOP version information.
ACE_CDR::Octet minor_version_
 Set to false when an error ocurrs.
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)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_wchar_array (const ACE_CDR::WChar *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_octet_array (const ACE_CDR::Octet *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_short_array (const ACE_CDR::Short *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_ushort_array (const ACE_CDR::UShort *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_long_array (const ACE_CDR::Long *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_ulong_array (const ACE_CDR::ULong *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_longlong_array (const ACE_CDR::LongLong *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_ulonglong_array (const ACE_CDR::ULongLong *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_float_array (const ACE_CDR::Float *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_double_array (const ACE_CDR::Double *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_longdouble_array (const ACE_CDR::LongDouble *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.
void adjust (size_t size)
void adjust (size_t size, size_t align)
 ACE_SizeCDR (const ACE_SizeCDR &rhs)
 disallow copying...
ACE_SizeCDRoperator= (const ACE_SizeCDR &rhs)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_1 (const ACE_CDR::Octet *x)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_2 (const ACE_CDR::UShort *x)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_4 (const ACE_CDR::ULong *x)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_8 (const ACE_CDR::ULongLong *x)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_16 (const ACE_CDR::LongDouble *x)
 Set to false when an error ocurrs.
ACE_CDR::Boolean write_array (const void *x, size_t size, size_t align, ACE_CDR::ULong length)
ACE_CDR::Boolean write_wchar_array_i (const ACE_CDR::WChar *x, ACE_CDR::ULong length)
 Set to false when an error ocurrs.


Detailed Description

A CDR stream for calculating size of the representation.

Constructor & Destructor Documentation

ACE_SizeCDR::ACE_SizeCDR ( ACE_CDR::Octet  major_version = ACE_CDR_GIOP_MAJOR_VERSION,
ACE_CDR::Octet  minor_version = ACE_CDR_GIOP_MINOR_VERSION 
) [inline]

Default constructor.

ACE_SizeCDR::ACE_SizeCDR ( const ACE_SizeCDR rhs  )  [private]

disallow copying...


Member Function Documentation

void ACE_SizeCDR::adjust ( size_t  size,
size_t  align 
)

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

void ACE_SizeCDR::adjust ( size_t  size  ) 

Adjust to size and count <size> octets.

bool ACE_SizeCDR::good_bit ( void   )  const [inline]

Returns false if an error has ocurred.

ACE_SizeCDR& ACE_SizeCDR::operator= ( const ACE_SizeCDR rhs  )  [private]

Set to false when an error ocurrs.

void ACE_SizeCDR::reset ( void   )  [inline]

Reset current size.

size_t ACE_SizeCDR::total_length ( void   )  const [inline]

Return current size.

ACE_CDR::Boolean ACE_SizeCDR::write_1 ( const ACE_CDR::Octet x  )  [private]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_16 ( const ACE_CDR::LongDouble x  )  [private]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_2 ( const ACE_CDR::UShort x  )  [private]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_4 ( const ACE_CDR::ULong x  )  [private]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_8 ( const ACE_CDR::ULongLong x  )  [private]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::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_CDR::Boolean ACE_SizeCDR::write_boolean ( ACE_CDR::Boolean  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_boolean_array ( const ACE_CDR::Boolean x,
ACE_CDR::ULong  length 
)

Note:
the portion written starts at <x> and ends at <x + length>. The length is *NOT* stored into the CDR stream.

ACE_CDR::Boolean ACE_SizeCDR::write_char ( ACE_CDR::Char  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_char_array ( const ACE_CDR::Char x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_double ( const ACE_CDR::Double x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_double_array ( const ACE_CDR::Double x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_float ( ACE_CDR::Float  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_float_array ( const ACE_CDR::Float x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_long ( ACE_CDR::Long  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_long_array ( const ACE_CDR::Long x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_longdouble ( const ACE_CDR::LongDouble x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_longdouble_array ( const ACE_CDR::LongDouble x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_longlong ( const ACE_CDR::LongLong x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_longlong_array ( const ACE_CDR::LongLong x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_octet ( ACE_CDR::Octet  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_octet_array ( const ACE_CDR::Octet x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_short ( ACE_CDR::Short  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_short_array ( const ACE_CDR::Short x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_string ( const ACE_CString x  ) 

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_string ( ACE_CDR::ULong  len,
const ACE_CDR::Char x 
)

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_string ( const ACE_CDR::Char x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_ulong ( ACE_CDR::ULong  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_ulong_array ( const ACE_CDR::ULong x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_ulonglong ( const ACE_CDR::ULongLong x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_ulonglong_array ( const ACE_CDR::ULongLong x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_ushort ( ACE_CDR::UShort  x  )  [inline]

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_ushort_array ( const ACE_CDR::UShort x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_wchar ( ACE_CDR::WChar  x  ) 

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_wchar_array ( const ACE_CDR::WChar x,
ACE_CDR::ULong  length 
) [inline]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_wchar_array_i ( const ACE_CDR::WChar x,
ACE_CDR::ULong  length 
) [private]

Set to false when an error ocurrs.

ACE_CDR::Boolean ACE_SizeCDR::write_wstring ( ACE_CDR::ULong  length,
const ACE_CDR::WChar x 
)

For string we offer methods that accept a precomputed length.

ACE_CDR::Boolean ACE_SizeCDR::write_wstring ( const ACE_CDR::WChar x  )  [inline]

For string we offer methods that accept a precomputed length.


Member Data Documentation

bool ACE_SizeCDR::good_bit_ [private]

Set to false when an error ocurrs.

GIOP version information.

Set to false when an error ocurrs.

size_t ACE_SizeCDR::size_ [private]

Current size.


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

Generated on Mon Jul 13 16:13:04 2009 for ACE by  doxygen 1.5.8