summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-07 23:11:02 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-07 23:11:02 +0000
commit3446c5ccc9cff052eed518959e9e4f6144b39b5c (patch)
treeab063141fcaf6349e5c62a6b61a3348cc58931f0
parent8e7bcfd6e26360a5c8bfca144ef7bb839da9a189 (diff)
downloadATCD-3446c5ccc9cff052eed518959e9e4f6144b39b5c.tar.gz
Wed Jul 7 18:10:35 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r--ace/CDR_Stream.h9
-rw-r--r--ace/CDR_Stream.i9
2 files changed, 15 insertions, 3 deletions
diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h
index 38b5ada2e73..b4eafa98a62 100644
--- a/ace/CDR_Stream.h
+++ b/ace/CDR_Stream.h
@@ -722,9 +722,8 @@ public:
// Re-initialize the CDR stream, copying the contents of the chain
// of message_blocks starting from <data>.
- ACE_Message_Block * steal_contents (void);
- // Re-initialize the CDR stream, copying the contents of the chain
- // of message_blocks starting from <data>.
+ ACE_Message_Block *steal_contents (void);
+ // Steal the contents from the currect CDR.
char* rd_ptr (void);
// Returns the current position for the rd_ptr....
@@ -742,6 +741,10 @@ public:
// If non-zero then this stream is writing in non-native byte order,
// this is only meaningful if ACE_ENABLE_SWAP_ON_WRITE is defined.
+ int byte_order (void) const;
+ // If <do_byte_swap> returns 1, this returns ACE_CDR_BYTE_ORDER else
+ // it returns ~ACE_CDR_BYTE_ORDER.
+
ACE_Char_Codeset_Translator *char_translator (void) const;
ACE_WChar_Codeset_Translator *wchar_translator (void) const;
// Access the codeset translators. They can be nil!
diff --git a/ace/CDR_Stream.i b/ace/CDR_Stream.i
index 3b98423e2fa..b1d2f0bf978 100644
--- a/ace/CDR_Stream.i
+++ b/ace/CDR_Stream.i
@@ -1227,6 +1227,15 @@ ACE_InputCDR::do_byte_swap (void) const
}
ACE_INLINE int
+ACE_InputCDR::byte_order (void) const
+{
+ if (this->do_byte_swap ())
+ return ~ACE_CDR_BYTE_ORDER;
+ else
+ return ACE_CDR_BYTE_ORDER;
+}
+
+ACE_INLINE int
ACE_InputCDR::align_read_ptr (size_t alignment)
{
char *buf = ptr_align_binary (this->rd_ptr (),