TAO
2.1.0
|
A CDR stream for writing, i.e. for marshalling. More...
#include <CDR.h>
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:
typedef TAO_Intrusive_Ref_Count_Object<Codebase_URL_Map, ACE_Null_Mutex> TAO_OutputCDR::RC_Codebase_URL_Map |
typedef ACE_Hash_Map_Manager<ACE_CString, char*, ACE_Null_Mutex> TAO_OutputCDR::Repo_Id_Map |
typedef ACE_Hash_Map_Manager<void*, char*, ACE_Null_Mutex> TAO_OutputCDR::Value_Map |
TAO_OutputCDR::TAO_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 = 0 , |
||
ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR , |
||
ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR |
||
) |
Default constructor, allocates size bytes in the internal buffer, if size == 0 it allocates the default size.
TAO_OutputCDR::TAO_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 = 0 , |
||
ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR , |
||
ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR |
||
) |
Build a CDR stream with an initial buffer, it will not remove data, since it did not allocated it.
TAO_OutputCDR::TAO_OutputCDR | ( | char * | data, |
size_t | size, | ||
int | byte_order, | ||
ACE_Allocator * | buffer_allocator, | ||
ACE_Allocator * | data_block_allocator, | ||
ACE_Allocator * | message_block_allocator, | ||
size_t | memcpy_tradeoff, | ||
TAO_GIOP_Fragmentation_Strategy * | fs, | ||
ACE_CDR::Octet | major_version, | ||
ACE_CDR::Octet | minor_version | ||
) |
Build a CDR stream with an initial buffer, it will not remove data since it did not allocated it, and enable fragmentation support.
TAO_OutputCDR::TAO_OutputCDR | ( | ACE_Message_Block * | data, |
int | byte_order = ACE_CDR_BYTE_ORDER , |
||
size_t | memcpy_tradeoff = 0 , |
||
ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR , |
||
ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR |
||
) |
Build a CDR stream with an initial Message_Block chain, it will not remove data, since it did not allocate it.
TAO_OutputCDR::TAO_OutputCDR | ( | ACE_Data_Block * | data, |
int | byte_order = ACE_CDR_BYTE_ORDER , |
||
ACE_Allocator * | message_block_allocator = 0 , |
||
size_t | memcpy_tradeoff = 0 , |
||
TAO_GIOP_Fragmentation_Strategy * | fs = 0 , |
||
ACE_CDR::Octet | major_version = TAO_DEF_GIOP_MAJOR , |
||
ACE_CDR::Octet | minor_version = TAO_DEF_GIOP_MINOR |
||
) |
Build a CDR stream with an initial data block, it will not remove data, since it did not allocated it.
TAO_OutputCDR::~TAO_OutputCDR | ( | void | ) |
Destructor.
TAO_OutputCDR::TAO_OutputCDR | ( | const TAO_OutputCDR & | rhs | ) | [private] |
bool TAO_OutputCDR::fragment_stream | ( | ACE_CDR::ULong | pending_alignment, |
ACE_CDR::ULong | pending_length | ||
) |
Fragment this output CDR stream if necessary.
Fragmentation will done through GIOP fragments when the length of the CDR stream length will exceed the configured threshold.
These methods are used by valuetype indirection support. Accessor to the indirect maps.
void TAO_OutputCDR::get_version | ( | TAO_GIOP_Message_Version & | giop_version | ) |
void TAO_OutputCDR::message_attributes | ( | CORBA::ULong | request_id, |
TAO_Stub * | stub, | ||
TAO_Message_Semantics | message_semantics, | ||
ACE_Time_Value * | timeout | ||
) |
Set fragmented message attributes.
TAO_Message_Semantics TAO_OutputCDR::message_semantics | ( | void | ) | const |
Message semantics (twoway, oneway, reply)
bool TAO_OutputCDR::more_fragments | ( | void | ) | const |
Are there more data fragments to come?
void TAO_OutputCDR::more_fragments | ( | bool | more | ) |
Specify whether there are more data fragments to come.
int TAO_OutputCDR::offset | ( | char * | pos | ) |
Calculate the offset between pos and current wr_ptr.
TAO_OutputCDR& TAO_OutputCDR::operator= | ( | const TAO_OutputCDR & | rhs | ) | [private] |
CORBA::ULong TAO_OutputCDR::request_id | ( | void | ) | const |
Fragmented message request ID.
If indirect map is not nil and not empty, unbind all entries. Called after marshalling.
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_OutputCDR::set_value_map | ( | TAO_OutputCDR::Value_Map_Handle & | map | ) |
TAO_Stub * TAO_OutputCDR::stub | ( | void | ) | const |
Stub object associated with the request.
void TAO_OutputCDR::throw_skel_exception | ( | int | error_num | ) | [static] |
void TAO_OutputCDR::throw_stub_exception | ( | int | error_num | ) | [static] |
ACE_Time_Value * TAO_OutputCDR::timeout | ( | void | ) | const |
Maximum time to wait for outgoing message to be sent.
friend class TAO_InputCDR [friend] |
For reading from a output CDR stream.
TAO_GIOP_Fragmentation_Strategy* const TAO_OutputCDR::fragmentation_strategy_ [private] |
Strategy that sends data currently marshaled into this TAO_OutputCDR stream if necessary.
Twoway, oneway, reply?
bool TAO_OutputCDR::more_fragments_ [private] |
Are there more data fragments to come?
These maps are used by valuetype indirection support.
CORBA::ULong TAO_OutputCDR::request_id_ [private] |
Request ID for the request currently being marshaled.
TAO_Stub* TAO_OutputCDR::stub_ [private] |
Stub object associated with the request.
ACE_Time_Value* TAO_OutputCDR::timeout_ [private] |
Request/reply send timeout.
Value_Map_Handle TAO_OutputCDR::value_map_ [private] |