TAO  2.3.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TAO_InputCDR Class Reference

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

#include <CDR.h>

Inheritance diagram for TAO_InputCDR:
Inheritance graph
[legend]
Collaboration diagram for TAO_InputCDR:
Collaboration graph
[legend]

Classes

struct  to_std_string
 Helper classes for extracting bounded strings into std::string/wstring. More...
 
struct  to_std_wstring
 

Public Types

typedef ACE_Hash_Map_Manager< void *, ACE_CString, ACE_Null_MutexRepo_Id_Map
 
typedef Repo_Id_Map Codebase_URL_Map
 
typedef ACE_Hash_Map_Manager< void *, void *, ACE_Null_MutexValue_Map
 
typedef TAO_Intrusive_Ref_Count_Object< Repo_Id_Map, ACE_Null_MutexRC_Repo_Id_Map
 
typedef TAO_Intrusive_Ref_Count_Object< Codebase_URL_Map, ACE_Null_MutexRC_Codebase_URL_Map
 
typedef TAO_Intrusive_Ref_Count_Object< Value_Map, ACE_Null_MutexRC_Value_Map
 
typedef TAO_Intrusive_Ref_Count_Handle< RC_Repo_Id_MapRepo_Id_Map_Handle
 
typedef TAO_Intrusive_Ref_Count_Handle< RC_Codebase_URL_MapCodebase_URL_Map_Handle
 
typedef TAO_Intrusive_Ref_Count_Handle< RC_Value_MapValue_Map_Handle
 

Public Member Functions

 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)
 
 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 (const ACE_Message_Block *data, ACE_Lock *lock, 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 (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)
 
 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)
 
virtual ~TAO_InputCDR (void)
 Destructor. More...
 
TAO_ORB_Coreorb_core (void) const
 Accessor. More...
 
ACE_Message_Block::Message_Flags clr_mb_flags (ACE_Message_Block::Message_Flags less_flags)
 
Repo_Id_Map_Handleget_repo_id_map ()
 
Codebase_URL_Map_Handleget_codebase_url_map ()
 
Value_Map_Handleget_value_map ()
 
void set_repo_id_map (Repo_Id_Map_Handle &map)
 
void set_codebase_url_map (Codebase_URL_Map_Handle &map)
 
void set_value_map (Value_Map_Handle &map)
 
void reset_vt_indirect_maps ()
 
- Public Member Functions inherited from ACE_InputCDR
 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)
 
 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_InputCDRoperator= (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)
 
 ACE_InputCDR (Transfer_Contents rhs)
 
virtual ~ACE_InputCDR (void)
 
ACE_CDR::Boolean skip_wstring (void)
 
ACE_CDR::Boolean skip_string (void)
 
ACE_CDR::Boolean skip_bytes (size_t n)
 
bool good_bit (void) const
 
const ACE_Message_Blockstart (void) 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_Blocksteal_contents (void)
 
void steal_from (ACE_InputCDR &cdr)
 
void exchange_data_blocks (ACE_InputCDR &cdr)
 
ACE_Data_Blockclone_from (ACE_InputCDR &cdr)
 
void reset_contents (void)
 
char * rd_ptr (void)
 
char * wr_ptr (void)
 
size_t length (void) const
 
int align_read_ptr (size_t alignment)
 
bool do_byte_swap (void) const
 
int byte_order (void) const
 
ACE_Char_Codeset_Translatorchar_translator (void) const
 
ACE_WChar_Codeset_Translatorwchar_translator (void) const
 
void char_translator (ACE_Char_Codeset_Translator *)
 
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)
 
void get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor)
 
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_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_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 skip_boolean (void)
 
ACE_CDR::Boolean skip_char (void)
 
ACE_CDR::Boolean skip_wchar (void)
 
ACE_CDR::Boolean skip_octet (void)
 
ACE_CDR::Boolean skip_short (void)
 
ACE_CDR::Boolean skip_ushort (void)
 
ACE_CDR::Boolean skip_long (void)
 
ACE_CDR::Boolean skip_ulong (void)
 
ACE_CDR::Boolean skip_longlong (void)
 
ACE_CDR::Boolean skip_ulonglong (void)
 
ACE_CDR::Boolean skip_float (void)
 
ACE_CDR::Boolean skip_double (void)
 
ACE_CDR::Boolean skip_longdouble (void)
 
ACE_CDR::Boolean skip_fixed (void)
 
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_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_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 skip_boolean (void)
 
ACE_CDR::Boolean skip_char (void)
 
ACE_CDR::Boolean skip_wchar (void)
 
ACE_CDR::Boolean skip_octet (void)
 
ACE_CDR::Boolean skip_short (void)
 
ACE_CDR::Boolean skip_ushort (void)
 
ACE_CDR::Boolean skip_long (void)
 
ACE_CDR::Boolean skip_ulong (void)
 
ACE_CDR::Boolean skip_longlong (void)
 
ACE_CDR::Boolean skip_ulonglong (void)
 
ACE_CDR::Boolean skip_float (void)
 
ACE_CDR::Boolean skip_double (void)
 
ACE_CDR::Boolean skip_longdouble (void)
 
ACE_CDR::Boolean skip_fixed (void)
 

Static Public Member Functions

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

Private Attributes

TAO_ORB_Coreorb_core_
 The ORB_Core, required to extract object references. More...
 
Repo_Id_Map_Handle repo_id_map_
 These maps are used by valuetype indirection support. More...
 
Codebase_URL_Map_Handle codebase_map_
 
Value_Map_Handle value_map_
 

Additional Inherited Members

- Protected Attributes inherited from ACE_InputCDR
ACE_Message_Block start_
 
bool do_byte_swap_
 
bool good_bit_
 
ACE_CDR::Octet major_version_
 
ACE_CDR::Octet minor_version_
 
ACE_Char_Codeset_Translatorchar_translator_
 
ACE_WChar_Codeset_Translatorwchar_translator_
 

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:

Member Typedef Documentation

Constructor & Destructor Documentation

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.

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.

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.

TAO_InputCDR::TAO_InputCDR ( const ACE_Message_Block data,
ACE_Lock lock,
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 with an optional lock used to protect the data.

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.

TAO_InputCDR::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.

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.

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.

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.

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.

TAO_InputCDR::~TAO_InputCDR ( void  )
virtual

Destructor.

Member Function Documentation

ACE_Message_Block::Message_Flags TAO_InputCDR::clr_mb_flags ( ACE_Message_Block::Message_Flags  less_flags)
TAO_InputCDR::Codebase_URL_Map_Handle & TAO_InputCDR::get_codebase_url_map ( )
TAO_InputCDR::Repo_Id_Map_Handle & TAO_InputCDR::get_repo_id_map ( )

These methods are used by valuetype indirection support. Accessor to the indirect maps.

TAO_InputCDR::Value_Map_Handle & TAO_InputCDR::get_value_map ( )
TAO_ORB_Core * TAO_InputCDR::orb_core ( void  ) const

Accessor.

void TAO_InputCDR::reset_vt_indirect_maps ( )

If indirect map is not nil and not empty, unbind all entries. Called after demarshalling.

void TAO_InputCDR::set_codebase_url_map ( TAO_InputCDR::Codebase_URL_Map_Handle map)
void TAO_InputCDR::set_repo_id_map ( TAO_InputCDR::Repo_Id_Map_Handle map)

Updater of the maps. These updaters are used to make indirect maps in original stream take effect even during marshalling/demarshalling a redirected stream.

void TAO_InputCDR::set_value_map ( TAO_InputCDR::Value_Map_Handle map)
void TAO_InputCDR::throw_skel_exception ( int  error_num)
static
void TAO_InputCDR::throw_stub_exception ( int  error_num)
static

Member Data Documentation

Codebase_URL_Map_Handle TAO_InputCDR::codebase_map_
private
TAO_ORB_Core* TAO_InputCDR::orb_core_
private

The ORB_Core, required to extract object references.

Repo_Id_Map_Handle TAO_InputCDR::repo_id_map_
private

These maps are used by valuetype indirection support.

Value_Map_Handle TAO_InputCDR::value_map_
private

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