diff options
Diffstat (limited to 'TAO/tao/CDR.cpp')
-rw-r--r-- | TAO/tao/CDR.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/TAO/tao/CDR.cpp b/TAO/tao/CDR.cpp index 2fe36da874d..9d682b195e9 100644 --- a/TAO/tao/CDR.cpp +++ b/TAO/tao/CDR.cpp @@ -170,6 +170,18 @@ TAO_OutputCDR::TAO_OutputCDR (char *data, size_t size, CDR::mb_align (this->start_); } +TAO_OutputCDR::TAO_OutputCDR (ACE_Message_Block *data, + int byte_order, + TAO_Marshal_Factory *factory) + : factory_ (factory), + do_byte_swap_ (byte_order != TAO_ENCAP_BYTE_ORDER), + good_bit_ (1) +{ + this->start_ = ACE_Message_Block::duplicate (data); + // We cannot trust the buffer to be properly aligned + CDR::mb_align (this->start_); +} + TAO_OutputCDR::~TAO_OutputCDR (void) { ACE_Message_Block::release (this->start_); @@ -468,6 +480,16 @@ TAO_InputCDR::TAO_InputCDR (const char *buf, size_t bufsiz, this->start_->wr_ptr (bufsiz); } +TAO_InputCDR::TAO_InputCDR (ACE_Message_Block *data, + int byte_order, + TAO_Marshal_Factory *factory) + : factory_ (factory), + do_byte_swap_ (byte_order != TAO_ENCAP_BYTE_ORDER), + good_bit_ (1) +{ + this->start_ = ACE_Message_Block::duplicate (data); +} + TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs, size_t size, CORBA::Long offset) |