summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-17 16:23:25 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-17 16:23:25 +0000
commit576f72f5814ff2c4d48be7d284d377547b40060b (patch)
treee6affbc99a4f5ee44b3ddc388a7fc6cd814f1e00
parent95b026e7a7b064410257d10634f9cb349f394d8f (diff)
downloadATCD-576f72f5814ff2c4d48be7d284d377547b40060b.tar.gz
ChangeLogTag : Sat Jul 17 11:17:18 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r--ace/CDR_Stream.cpp11
-rw-r--r--ace/CDR_Stream.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp
index 9220778588b..aea3198e0dd 100644
--- a/ace/CDR_Stream.cpp
+++ b/ace/CDR_Stream.cpp
@@ -1039,6 +1039,17 @@ ACE_InputCDR::reset (const ACE_Message_Block* data,
}
}
+void
+ACE_InputCDR::steal_from (ACE_InputCDR &cdr)
+{
+ this->do_byte_swap_ = cdr.do_byte_swap_;
+ this->start_.data_block (cdr.start_.data_block ()->duplicate ());
+ this->start_.rd_ptr (cdr.start_.rd_ptr ());
+ this->start_.wr_ptr (cdr.start_.wr_ptr ());
+
+ cdr.reset_contents ();
+}
+
ACE_Message_Block*
ACE_InputCDR::steal_contents (void)
{
diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h
index f1e40d00864..95efb66f46a 100644
--- a/ace/CDR_Stream.h
+++ b/ace/CDR_Stream.h
@@ -732,6 +732,10 @@ public:
ACE_Message_Block *steal_contents (void);
// Steal the contents from the currect CDR.
+ void steal_from (ACE_InputCDR &cdr);
+ // Steal the contents of <cdr> and make a shallow copy into this
+ // stream.
+
void reset_contents (void);
// Re-initialize the CDR stream, forgetting about the old contents
// of the stream and allocating a new buffer (from the allocators).