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

# TAO_InputCDR Class Reference

A CDR stream for reading, i.e. for demarshalling. More...

`#include <CDR.h>`

Inheritance diagram for TAO_InputCDR:

[legend]
Collaboration diagram for TAO_InputCDR:

[legend]
List of all members.

## Public Methods
| TAO_InputCDR (const char *buf, size_t bufsiz, int byte_order=ACE_CDR_BYTE_ORDER, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR, TAO_ORB_Core *orb_core=0)
| TAO_InputCDR (size_t bufsiz, int byte_order=ACE_CDR_BYTE_ORDER, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR, TAO_ORB_Core *orb_core=0)
| Create an empty input stream. The caller is responsible for putting the right data and providing the right alignment. More...
| TAO_InputCDR (const ACE_Message_Block *data, int byte_order=ACE_CDR_BYTE_ORDER, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR, TAO_ORB_Core *orb_core=0)
| Create an input stream from an ACE_Message_Block. More...
| TAO_InputCDR (ACE_Data_Block *data, ACE_Message_Block::Message_Flags flag=0, int byte_order=ACE_CDR_BYTE_ORDER, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR, TAO_ORB_Core *orb_core=0)
| Create an input stream from an ACE_Data_Block. More...
| TAO_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, ACE_CDR::Octet major_version=TAO_DEF_GIOP_MAJOR, ACE_CDR::Octet minor_version=TAO_DEF_GIOP_MINOR, TAO_ORB_Core *orb_core=0)
| Create an input stream from an ACE_Data_Block. More...
| TAO_InputCDR (const TAO_InputCDR &rhs)
| TAO_InputCDR (const TAO_InputCDR &rhs, size_t size, ACE_CDR::Long offset)
| When interpreting indirected TypeCodes it is useful to make a "copy" of the stream starting in the new position. More...
| TAO_InputCDR (const TAO_InputCDR &rhs, size_t size)
| TAO_InputCDR (const TAO_OutputCDR &rhs, ACE_Allocator *buffer_allocator=0, ACE_Allocator *data_block_allocator=0, ACE_Allocator *message_block_allocator=0, TAO_ORB_Core *orb_core=0)
| Create an input CDR from an output CDR. More...
| TAO_InputCDR (ACE_InputCDR::Transfer_Contents rhs, TAO_ORB_Core *orb_core=0)
| Initialize the contents of one CDR from another, without data copying and with minimimum locking overhead. More...
| ~TAO_InputCDR (void)
| destructor. More...
TAO_ORB_Core * | orb_core (void) const
| Accessor. More...
## Private Methods
void | init_translators (void)
## Private Attributes
TAO_ORB_Core * | orb_core_
| The ORB_Core, required to extract object references. More...

## Detailed Description

A CDR stream for reading, i.e. for demarshalling.

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

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | const char * | buf,
|  | size_t | bufsiz,
|  | int | byte_order = ACE_CDR_BYTE_ORDER,
|  | ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR,
|  | ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Create an input stream from an arbitrary buffer, care must be exercised wrt alignment, because this contructor will *not* work if the buffer is unproperly aligned.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | size_t | bufsiz,
|  | int | byte_order = ACE_CDR_BYTE_ORDER,
|  | ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR,
|  | ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Create an empty input stream. The caller is responsible for putting the right data and providing the right alignment.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | const ACE_Message_Block * | data,
|  | int | byte_order = ACE_CDR_BYTE_ORDER,
|  | ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR,
|  | ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Create an input stream from an ACE_Message_Block.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | ACE_Data_Block * | data,
|  | ACE_Message_Block::Message_Flags | flag = 0,
|  | int | byte_order = ACE_CDR_BYTE_ORDER,
|  | ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR,
|  | ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Create an input stream from an ACE_Data_Block.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | ACE_Data_Block * | data,
|  | ACE_Message_Block::Message_Flags | flag,
|  | size_t | rd_pos,
|  | size_t | wr_pos,
|  | int | byte_order = ACE_CDR_BYTE_ORDER,
|  | ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR,
|  | ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Create an input stream from an ACE_Data_Block.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | const TAO_InputCDR & | rhs | ) |

| Make a copy of the current stream state, but does not copy the internal buffer; so the same stream can be read multiple times efficiently.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | const TAO_InputCDR & | rhs,
|  | size_t | size,
|  | ACE_CDR::Long | offset
| ) |

| When interpreting indirected TypeCodes it is useful to make a "copy" of the stream starting in the new position.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | const TAO_InputCDR & | rhs,
|  | size_t | size
| ) |

| This creates an encapsulated stream, the first byte must be (per the spec) the byte order of the encapsulation. The default values for the allocators in this constructor are not 0, but are generated by the ORB. Refer to the constructor body in CDR.cpp for the code that supplies these values to the base class constructor.

TAO_InputCDR::TAO_InputCDR | ( | const TAO_OutputCDR & | rhs,
|  | ACE_Allocator * | buffer_allocator = 0,
|  | ACE_Allocator * | data_block_allocator = 0,
|  | ACE_Allocator * | message_block_allocator = 0,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Create an input CDR from an output CDR.

ACE_INLINE TAO_InputCDR::TAO_InputCDR | ( | ACE_InputCDR::Transfer_Contents | rhs,
|  | TAO_ORB_Core * | orb_core = 0
| ) |

| Initialize the contents of one CDR from another, without data copying and with minimimum locking overhead.

ACE_INLINE TAO_InputCDR::~TAO_InputCDR | ( | void |  | ) |

| destructor.

## Member Function Documentation

void TAO_InputCDR::init_translators | ( | void |  | ) | `[private]`

ACE_INLINE TAO_ORB_Core * TAO_InputCDR::orb_core | ( | void |  | ) | const

| Accessor.

## Member Data Documentation

TAO_ORB_Core* TAO_InputCDR::orb_core_`[private]`

| The ORB_Core, required to extract object references.

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

- CDR.h
- CDR.cpp
- CDR.i