summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-05-02 20:12:55 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-05-02 20:12:55 +0000
commite195f8a90b3ffd14ed32ff11c97b00cb8df21968 (patch)
tree626bb1e87d5a513c71c8e2602c781194e2f71b25
parentf25146f66ee7549ca5e30dd6a8cfbfe24a0ee6c6 (diff)
downloadATCD-e195f8a90b3ffd14ed32ff11c97b00cb8df21968.tar.gz
ChangeLogTag: Wed May 2 15:10:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLogs/ChangeLog-02a9
-rw-r--r--ChangeLogs/ChangeLog-03a9
-rw-r--r--ace/CDR_Stream.cpp22
-rw-r--r--ace/CDR_Stream.h9
5 files changed, 58 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bb68a2113b..e04529ffeff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed May 2 15:10:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * ace/CDR_Stream.h (ACE_InputCDR):
+ * ace/CDR_Stream.cpp: Added a new constructor for ACE_inputCDR
+ class. This constructor would take the data block with a
+ pre-determined read and write pointer positions. This is helpful
+ when an application would like to create a CDR stream with a
+ smei-processed data block.
+
Wed May 2 11:10:59 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* bin/auto_run_tests.lst: Added a colon to seperate the
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 5bb68a2113b..e04529ffeff 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,12 @@
+Wed May 2 15:10:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * ace/CDR_Stream.h (ACE_InputCDR):
+ * ace/CDR_Stream.cpp: Added a new constructor for ACE_inputCDR
+ class. This constructor would take the data block with a
+ pre-determined read and write pointer positions. This is helpful
+ when an application would like to create a CDR stream with a
+ smei-processed data block.
+
Wed May 2 11:10:59 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* bin/auto_run_tests.lst: Added a colon to seperate the
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 5bb68a2113b..e04529ffeff 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,12 @@
+Wed May 2 15:10:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * ace/CDR_Stream.h (ACE_InputCDR):
+ * ace/CDR_Stream.cpp: Added a new constructor for ACE_inputCDR
+ class. This constructor would take the data block with a
+ pre-determined read and write pointer positions. This is helpful
+ when an application would like to create a CDR stream with a
+ smei-processed data block.
+
Wed May 2 11:10:59 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* bin/auto_run_tests.lst: Added a colon to seperate the
diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp
index 87e70360bf3..0f64ff0d66d 100644
--- a/ace/CDR_Stream.cpp
+++ b/ace/CDR_Stream.cpp
@@ -525,6 +525,28 @@ ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data,
{
}
+ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data,
+ size_t rd_pos,
+ size_t wr_pos,
+ int byte_order)
+ : start_ (data),
+ do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
+ good_bit_ (1),
+ char_translator_ (0),
+ wchar_translator_ (0)
+{
+ // Set the read pointer
+ this->start_.rd_ptr (rd_pos);
+
+ // Set the write pointer after doing a sanity check.
+ char* wrpos = this->start_.rd_ptr () + wr_pos;
+ if (this->start_.end () >= wrpos)
+ {
+ this->start_.wr_ptr (wr_pos);
+ }
+}
+
+
ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs,
size_t size,
ACE_CDR::Long offset)
diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h
index ad8f7f9cd6d..f2dea99ee00 100644
--- a/ace/CDR_Stream.h
+++ b/ace/CDR_Stream.h
@@ -452,6 +452,15 @@ public:
ACE_InputCDR (ACE_Data_Block *data,
int byte_order = ACE_CDR_BYTE_ORDER);
+ /// Create an input stream from an ACE_Data_Block. It also sets the
+ /// read and write pointers at the desired positions. This would be
+ /// helpful if the applications desires to create a new CDR stream
+ /// from a semi-processed datablock.
+ ACE_InputCDR (ACE_Data_Block *data,
+ size_t read_pointer_position,
+ size_t write_pointer_position,
+ int byte_order = ACE_CDR_BYTE_ORDER);
+
/**
* These make a copy of the current stream state, but do not copy
* the internal buffer, so the same stream can be read multiple