|
| ACE_InputCDR (const char *buf, size_t bufsiz, int byte_order=ACE_CDR::BYTE_ORDER_NATIVE, ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION) |
|
| ACE_InputCDR (size_t bufsiz, int byte_order=ACE_CDR::BYTE_ORDER_NATIVE, ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION) |
|
| ACE_InputCDR (const ACE_Message_Block *data, int byte_order=ACE_CDR::BYTE_ORDER_NATIVE, ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION, ACE_Lock *lock=0) |
| Create an input stream from an ACE_Message_Block.
|
|
| ACE_InputCDR (ACE_Data_Block *data, ACE_Message_Block::Message_Flags flag=0, int byte_order=ACE_CDR::BYTE_ORDER_NATIVE, ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION) |
|
| ACE_InputCDR (ACE_Data_Block *data, ACE_Message_Block::Message_Flags flag, size_t read_pointer_position, size_t write_pointer_position, int byte_order=ACE_CDR::BYTE_ORDER_NATIVE, ACE_CDR::Octet major_version=ACE_CDR_GIOP_MAJOR_VERSION, ACE_CDR::Octet minor_version=ACE_CDR_GIOP_MINOR_VERSION) |
|
| ACE_InputCDR (const ACE_InputCDR &rhs) |
|
ACE_InputCDR & | operator= (const ACE_InputCDR &rhs) |
|
| ACE_InputCDR (const ACE_InputCDR &rhs, size_t size, ACE_CDR::Long offset) |
|
| ACE_InputCDR (const ACE_InputCDR &rhs, size_t size) |
|
| ACE_InputCDR (const ACE_OutputCDR &rhs, ACE_Allocator *buffer_allocator=0, ACE_Allocator *data_block_allocator=0, ACE_Allocator *message_block_allocator=0) |
| Create an input CDR from an output CDR.
|
|
| ACE_InputCDR (Transfer_Contents rhs) |
| Transfer the contents from rhs to a new CDR.
|
|
virtual | ~ACE_InputCDR () |
| Destructor.
|
|
ACE_CDR::Boolean | read_boolean (ACE_CDR::Boolean &x) |
|
ACE_CDR::Boolean | read_char (ACE_CDR::Char &x) |
|
ACE_CDR::Boolean | read_wchar (ACE_CDR::WChar &x) |
|
ACE_CDR::Boolean | read_octet (ACE_CDR::Octet &x) |
|
ACE_CDR::Boolean | read_short (ACE_CDR::Short &x) |
|
ACE_CDR::Boolean | read_ushort (ACE_CDR::UShort &x) |
|
ACE_CDR::Boolean | read_long (ACE_CDR::Long &x) |
|
ACE_CDR::Boolean | read_ulong (ACE_CDR::ULong &x) |
|
ACE_CDR::Boolean | read_longlong (ACE_CDR::LongLong &x) |
|
ACE_CDR::Boolean | read_ulonglong (ACE_CDR::ULongLong &x) |
|
ACE_CDR::Boolean | read_float (ACE_CDR::Float &x) |
|
ACE_CDR::Boolean | read_double (ACE_CDR::Double &x) |
|
ACE_CDR::Boolean | read_longdouble (ACE_CDR::LongDouble &x) |
|
ACE_CDR::Boolean | read_fixed (ACE_CDR::Fixed &x) |
|
ACE_CDR::Boolean | read_int8 (ACE_CDR::Int8 &x) |
|
ACE_CDR::Boolean | read_uint8 (ACE_CDR::UInt8 &x) |
|
ACE_CDR::Boolean | read_string (ACE_CDR::Char *&x) |
|
ACE_CDR::Boolean | read_string (ACE_CString &x) |
|
ACE_CDR::Boolean | read_wstring (ACE_CDR::WChar *&x) |
|
ACE_CDR::Boolean | read_string (std::string &x) |
|
ACE_CDR::Boolean | read_wstring (std::wstring &x) |
|
ACE_CDR::Boolean | read_boolean_array (ACE_CDR::Boolean *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_char_array (ACE_CDR::Char *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_wchar_array (ACE_CDR::WChar *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_octet_array (ACE_CDR::Octet *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_short_array (ACE_CDR::Short *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_ushort_array (ACE_CDR::UShort *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_long_array (ACE_CDR::Long *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_ulong_array (ACE_CDR::ULong *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_longlong_array (ACE_CDR::LongLong *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_ulonglong_array (ACE_CDR::ULongLong *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_float_array (ACE_CDR::Float *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_double_array (ACE_CDR::Double *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_longdouble_array (ACE_CDR::LongDouble *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_int8_array (ACE_CDR::Int8 *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | read_uint8_array (ACE_CDR::UInt8 *x, ACE_CDR::ULong length) |
|
ACE_CDR::Boolean | skip_boolean () |
|
ACE_CDR::Boolean | skip_char () |
|
ACE_CDR::Boolean | skip_wchar () |
|
ACE_CDR::Boolean | skip_octet () |
|
ACE_CDR::Boolean | skip_short () |
|
ACE_CDR::Boolean | skip_ushort () |
|
ACE_CDR::Boolean | skip_long () |
|
ACE_CDR::Boolean | skip_ulong () |
|
ACE_CDR::Boolean | skip_longlong () |
|
ACE_CDR::Boolean | skip_ulonglong () |
|
ACE_CDR::Boolean | skip_float () |
|
ACE_CDR::Boolean | skip_double () |
|
ACE_CDR::Boolean | skip_longdouble () |
|
ACE_CDR::Boolean | skip_fixed () |
|
ACE_CDR::Boolean | skip_wstring () |
|
ACE_CDR::Boolean | skip_string () |
|
ACE_CDR::Boolean | skip_bytes (size_t n) |
| Skip n bytes in the CDR stream.
|
|
bool | good_bit () const |
| returns false if a problem has been detected.
|
|
const ACE_Message_Block * | start () const |
|
int | grow (size_t newsize) |
|
void | reset_byte_order (int byte_order) |
|
void | reset (const ACE_Message_Block *data, int byte_order) |
|
ACE_Message_Block * | steal_contents () |
| Steal the contents from the current CDR.
|
|
void | steal_from (ACE_InputCDR &cdr) |
|
void | exchange_data_blocks (ACE_InputCDR &cdr) |
|
ACE_Data_Block * | clone_from (ACE_InputCDR &cdr) |
|
void | reset_contents () |
|
char * | rd_ptr () |
| Returns the current position for the rd_ptr .
|
|
char * | wr_ptr () |
| Returns the current position for the wr_ptr .
|
|
size_t | length () const |
| Return how many bytes are left in the stream.
|
|
int | align_read_ptr (size_t alignment) |
|
bool | do_byte_swap () const |
|
int | byte_order () const |
|
ACE_Char_Codeset_Translator * | char_translator () const |
| Access the codeset translators. They can be nil!
|
|
ACE_WChar_Codeset_Translator * | wchar_translator () const |
|
void | char_translator (ACE_Char_Codeset_Translator *) |
| Set the codeset translators.
|
|
void | wchar_translator (ACE_WChar_Codeset_Translator *) |
|
int | adjust (size_t size, char *&buf) |
|
int | adjust (size_t size, size_t align, char *&buf) |
|
void | set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor) |
| Set the underlying GIOP version..
|
|
void | get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor) |
| Set the underlying GIOP version..
|
|
A CDR stream for demarshalling CDR-encoded data.
This class is based on the the CORBA spec for Java (98-02-29), java class omg.org.CORBA.portable.InputStream. It diverts in a few ways:
- Operations to retrieve basic types take parameters by reference.
- 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).
Read 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.