summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-19 21:06:23 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-19 21:06:23 +0000
commita117498b0bbe723eb1cd950ff80810a8cc91f56c (patch)
tree4bea86a77e2d9ad3cc7c2b25f82323effd6d6324 /ace
parent3aef8ddeae99c1e53684326b919b7280f6027ccd (diff)
downloadATCD-a117498b0bbe723eb1cd950ff80810a8cc91f56c.tar.gz
ChangeLogTag:Fri Mar 19 15:03:54 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'ace')
-rw-r--r--ace/CDR_Stream.cpp308
-rw-r--r--ace/CDR_Stream.h475
-rw-r--r--ace/CDR_Stream.i685
3 files changed, 749 insertions, 719 deletions
diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp
index f0be64bbb19..1faa090850b 100644
--- a/ace/CDR_Stream.cpp
+++ b/ace/CDR_Stream.cpp
@@ -40,7 +40,7 @@
#endif /* ! __ACE_INLINE__ */
int
-CDR::grow (ACE_Message_Block *mb, size_t minsize)
+ACE_CDR::grow (ACE_Message_Block *mb, size_t minsize)
{
// Calculate the new buffer's length; if growing for encode, we
// don't grow in "small" chunks because of the cost.
@@ -53,31 +53,31 @@ CDR::grow (ACE_Message_Block *mb, size_t minsize)
// TODO The growth strategy should be controlled using
// the ORB parameters....
if (newsize == 0)
- newsize = CDR::DEFAULT_BUFSIZE;
- else if (size < CDR::EXP_GROWTH_MAX)
+ newsize = ACE_CDR::DEFAULT_BUFSIZE;
+ else if (size < ACE_CDR::EXP_GROWTH_MAX)
newsize *= 2;
else
- newsize += CDR::LINEAR_GROWTH_CHUNK;
+ newsize += ACE_CDR::LINEAR_GROWTH_CHUNK;
}
- else if (minsize + CDR::MAX_ALIGNMENT <= size)
+ else if (minsize + ACE_CDR::MAX_ALIGNMENT <= size)
return 0;
else
{
if (newsize == 0)
- newsize = CDR::DEFAULT_BUFSIZE;
+ newsize = ACE_CDR::DEFAULT_BUFSIZE;
- while (newsize < minsize + CDR::MAX_ALIGNMENT)
+ while (newsize < minsize + ACE_CDR::MAX_ALIGNMENT)
{
- if (newsize < CDR::EXP_GROWTH_MAX)
+ if (newsize < ACE_CDR::EXP_GROWTH_MAX)
newsize *= 2;
else
- newsize += CDR::LINEAR_GROWTH_CHUNK;
+ newsize += ACE_CDR::LINEAR_GROWTH_CHUNK;
}
}
ACE_Message_Block tmp (newsize);
- CDR::mb_align (&tmp);
+ ACE_CDR::mb_align (&tmp);
tmp.copy (mb->rd_ptr (), mb->length());
mb->data_block (tmp.data_block ()->duplicate ());
@@ -87,15 +87,29 @@ CDR::grow (ACE_Message_Block *mb, size_t minsize)
return 0;
}
+size_t
+ACE_CDR::total_length (const ACE_Message_Block* begin,
+ const ACE_Message_Block* end)
+{
+ size_t l = 0;
+ // Compute the total size.
+ for (const ACE_Message_Block *i = begin;
+ i != end;
+ i = i->cont ())
+ l += i->length ();
+ return l;
+}
+
+
#if defined (NONNATIVE_LONGDOUBLE)
int
-CDR::LongDouble::operator== (const CDR::LongDouble &rhs) const
+ACE_CDR::LongDouble::operator== (const ACE_CDR::LongDouble &rhs) const
{
return ACE_OS::memcmp (this->ld, rhs.ld, 16) == 0;
}
int
-CDR::LongDouble::operator!= (const CDR::LongDouble &rhs) const
+ACE_CDR::LongDouble::operator!= (const ACE_CDR::LongDouble &rhs) const
{
return ACE_OS::memcmp (this->ld, rhs.ld, 16) != 0;
}
@@ -108,7 +122,7 @@ ACE_OutputCDR::ACE_OutputCDR (size_t size,
ACE_Allocator *buffer_allocator,
ACE_Allocator *data_block_allocator,
size_t memcpy_tradeoff)
- : start_ (size ? size : CDR::DEFAULT_BUFSIZE + CDR::MAX_ALIGNMENT,
+ : start_ (size ? size : ACE_CDR::DEFAULT_BUFSIZE + ACE_CDR::MAX_ALIGNMENT,
ACE_Message_Block::MB_DATA,
0,
0,
@@ -122,7 +136,7 @@ ACE_OutputCDR::ACE_OutputCDR (size_t size,
good_bit_ (1),
memcpy_tradeoff_ (memcpy_tradeoff)
{
- CDR::mb_align (&this->start_);
+ ACE_CDR::mb_align (&this->start_);
this->current_ = &this->start_;
}
@@ -146,7 +160,7 @@ ACE_OutputCDR::ACE_OutputCDR (char *data, size_t size,
memcpy_tradeoff_ (memcpy_tradeoff)
{
// We cannot trust the buffer to be properly aligned
- CDR::mb_align (&this->start_);
+ ACE_CDR::mb_align (&this->start_);
this->current_ = &this->start_;
}
@@ -159,7 +173,7 @@ ACE_OutputCDR::ACE_OutputCDR (ACE_Message_Block *data,
memcpy_tradeoff_ (memcpy_tradeoff)
{
// We cannot trust the buffer to be properly aligned
- CDR::mb_align (&this->start_);
+ ACE_CDR::mb_align (&this->start_);
this->current_ = &this->start_;
}
@@ -177,19 +191,13 @@ void
ACE_OutputCDR::reset (void)
{
this->current_ = &this->start_;
- CDR::mb_align (&this->start_);
+ ACE_CDR::mb_align (&this->start_);
}
size_t
ACE_OutputCDR::total_length (void) const
{
- size_t l = 0;
- // Compute the total size.
- for (const ACE_Message_Block *i = this->begin ();
- i != this->end ();
- i = i->cont ())
- l += i->length ();
- return l;
+ return ACE_CDR::total_length (this->begin (), this->end ());
}
int
@@ -198,16 +206,16 @@ ACE_OutputCDR::grow_and_adjust (size_t size,
char*& buf)
{
if (this->current_->cont () == 0
- || this->current_->cont ()->size () < size + CDR::MAX_ALIGNMENT)
+ || this->current_->cont ()->size () < size + ACE_CDR::MAX_ALIGNMENT)
{
// Allocate the next block, it must be large enough.
- size_t block_size = CDR::DEFAULT_BUFSIZE;
- while (block_size < size + CDR::MAX_ALIGNMENT)
+ size_t block_size = ACE_CDR::DEFAULT_BUFSIZE;
+ while (block_size < size + ACE_CDR::MAX_ALIGNMENT)
{
- if (block_size < CDR::EXP_GROWTH_MAX)
+ if (block_size < ACE_CDR::EXP_GROWTH_MAX)
block_size *= 2;
else
- block_size += CDR::LINEAR_GROWTH_CHUNK;
+ block_size += ACE_CDR::LINEAR_GROWTH_CHUNK;
}
this->good_bit_ = 0;
ACE_Message_Block* tmp;
@@ -228,12 +236,12 @@ ACE_OutputCDR::grow_and_adjust (size_t size,
// The new block must start with the same alignment as the
// previous block finished.
ptr_arith_t tmpalign =
- ptr_arith_t(tmp->wr_ptr ()) % CDR::MAX_ALIGNMENT;
+ ptr_arith_t(tmp->wr_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
ptr_arith_t curalign =
- ptr_arith_t(this->current_->wr_ptr ()) % CDR::MAX_ALIGNMENT;
+ ptr_arith_t(this->current_->wr_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
int offset = curalign - tmpalign;
if (offset < 0)
- offset += CDR::MAX_ALIGNMENT;
+ offset += ACE_CDR::MAX_ALIGNMENT;
tmp->rd_ptr (offset);
tmp->wr_ptr (tmp->rd_ptr ());
@@ -250,8 +258,8 @@ ACE_OutputCDR::grow_and_adjust (size_t size,
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_string (CDR::ULong len,
+ACE_CDR::Boolean
+ACE_OutputCDR::write_string (ACE_CDR::ULong len,
const char *x)
{
if (len != 0)
@@ -276,9 +284,9 @@ ACE_OutputCDR::write_string (CDR::ULong len,
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_wstring (CDR::ULong len,
- const CDR::WChar *x)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_wstring (ACE_CDR::ULong len,
+ const ACE_CDR::WChar *x)
{
if (x != 0)
{
@@ -297,7 +305,7 @@ ACE_OutputCDR::write_wstring (CDR::ULong len,
return 0;
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_OutputCDR::write_octet_array_mb (const ACE_Message_Block* mb)
{
// If the buffer is small and it fits in the current message
@@ -313,8 +321,8 @@ ACE_OutputCDR::write_octet_array_mb (const ACE_Message_Block* mb)
ACE_Message_Block::DONT_DELETE))
{
if (! this->write_array (i->rd_ptr (),
- CDR::OCTET_SIZE,
- CDR::OCTET_ALIGN,
+ ACE_CDR::OCTET_SIZE,
+ ACE_CDR::OCTET_ALIGN,
length))
{
return 0;
@@ -326,8 +334,8 @@ ACE_OutputCDR::write_octet_array_mb (const ACE_Message_Block* mb)
&& this->current_->wr_ptr () + length < this->current_->end ())
{
if (! this->write_array (i->rd_ptr (),
- CDR::OCTET_SIZE,
- CDR::OCTET_ALIGN,
+ ACE_CDR::OCTET_SIZE,
+ ACE_CDR::OCTET_ALIGN,
length))
{
return 0;
@@ -351,37 +359,37 @@ ACE_OutputCDR::write_octet_array_mb (const ACE_Message_Block* mb)
return 1;
}
-CDR::Boolean
-ACE_OutputCDR::write_1 (const CDR::Octet *x)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_1 (const ACE_CDR::Octet *x)
{
char *buf;
if (this->adjust (1, buf) == 0)
{
- *ACE_reinterpret_cast(CDR::Octet*, buf) = *x;
+ *ACE_reinterpret_cast(ACE_CDR::Octet*, buf) = *x;
return 1;
}
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_2 (const CDR::UShort *x)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_2 (const ACE_CDR::UShort *x)
{
char *buf;
- if (this->adjust (CDR::SHORT_SIZE, buf) == 0)
+ if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0)
{
#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(CDR::UShort*,buf) = *x;
+ *ACE_reinterpret_cast(ACE_CDR::UShort*,buf) = *x;
return 1;
#else
if (!this->do_byte_swap_)
{
- *ACE_reinterpret_cast (CDR::UShort *, buf) = *x;
+ *ACE_reinterpret_cast (ACE_CDR::UShort *, buf) = *x;
return 1;
}
else
{
- CDR::swap_2 (ACE_reinterpret_cast (const char*, x), buf);
+ ACE_CDR::swap_2 (ACE_reinterpret_cast (const char*, x), buf);
return 1;
}
#endif /* ACE_ENABLE_SWAP_ON_WRITE */
@@ -390,24 +398,24 @@ ACE_OutputCDR::write_2 (const CDR::UShort *x)
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_4 (const CDR::ULong *x)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_4 (const ACE_CDR::ULong *x)
{
char *buf;
- if (this->adjust (CDR::LONG_SIZE, buf) == 0)
+ if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0)
{
#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(CDR::ULong*,buf) = *x;
+ *ACE_reinterpret_cast(ACE_CDR::ULong*,buf) = *x;
return 1;
#else
if (!this->do_byte_swap_)
{
- *ACE_reinterpret_cast (CDR::ULong *, buf) = *x;
+ *ACE_reinterpret_cast (ACE_CDR::ULong *, buf) = *x;
return 1;
}
else
{
- CDR::swap_4 (ACE_reinterpret_cast (const char*, x), buf);
+ ACE_CDR::swap_4 (ACE_reinterpret_cast (const char*, x), buf);
return 1;
}
#endif /* ACE_ENABLE_SWAP_ON_WRITE */
@@ -416,24 +424,24 @@ ACE_OutputCDR::write_4 (const CDR::ULong *x)
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_8 (const CDR::ULongLong *x)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_8 (const ACE_CDR::ULongLong *x)
{
char *buf;
- if (this->adjust (CDR::LONGLONG_SIZE, buf) == 0)
+ if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0)
{
#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(CDR::ULongLong*,buf) = *x;
+ *ACE_reinterpret_cast(ACE_CDR::ULongLong*,buf) = *x;
return 1;
#else
if (!this->do_byte_swap_)
{
- *ACE_reinterpret_cast (CDR::ULongLong *, buf) = *x;
+ *ACE_reinterpret_cast (ACE_CDR::ULongLong *, buf) = *x;
return 1;
}
else
{
- CDR::swap_8 (ACE_reinterpret_cast (const char*, x), buf);
+ ACE_CDR::swap_8 (ACE_reinterpret_cast (const char*, x), buf);
return 1;
}
#endif /* ACE_ENABLE_SWAP_ON_WRITE */
@@ -442,26 +450,26 @@ ACE_OutputCDR::write_8 (const CDR::ULongLong *x)
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_16 (const CDR::LongDouble *x)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_16 (const ACE_CDR::LongDouble *x)
{
char* buf;
- if (this->adjust (CDR::LONGDOUBLE_SIZE,
- CDR::LONGDOUBLE_ALIGN,
+ if (this->adjust (ACE_CDR::LONGDOUBLE_SIZE,
+ ACE_CDR::LONGDOUBLE_ALIGN,
buf) == 0)
{
#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(CDR::LongDouble*,buf) = *x;
+ *ACE_reinterpret_cast(ACE_CDR::LongDouble*,buf) = *x;
return 1;
#else
if (!this->do_byte_swap_)
{
- *ACE_reinterpret_cast (CDR::LongDouble *, buf) = *x;
+ *ACE_reinterpret_cast (ACE_CDR::LongDouble *, buf) = *x;
return 1;
}
else
{
- CDR::swap_16 (ACE_reinterpret_cast (const char*, x), buf);
+ ACE_CDR::swap_16 (ACE_reinterpret_cast (const char*, x), buf);
return 1;
}
#endif /* ACE_ENABLE_SWAP_ON_WRITE */
@@ -470,11 +478,11 @@ ACE_OutputCDR::write_16 (const CDR::LongDouble *x)
return 0;
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_OutputCDR::write_array (const void *x,
- size_t size,
- size_t align,
- CDR::ULong length)
+ size_t size,
+ size_t align,
+ ACE_CDR::ULong length)
{
char *buf;
if (this->adjust (size * length, align, buf) == 0)
@@ -496,16 +504,16 @@ ACE_OutputCDR::write_array (const void *x,
switch (size)
{
case 2:
- swapper = CDR::swap_2;
+ swapper = ACE_CDR::swap_2;
break;
case 4:
- swapper = CDR::swap_4;
+ swapper = ACE_CDR::swap_4;
break;
case 8:
- swapper = CDR::swap_8;
+ swapper = ACE_CDR::swap_8;
break;
case 16:
- swapper = CDR::swap_16;
+ swapper = ACE_CDR::swap_16;
break;
default:
// TODO: print something?
@@ -529,17 +537,17 @@ ACE_OutputCDR::write_array (const void *x,
return 0;
}
-CDR::Boolean
-ACE_OutputCDR::write_boolean_array (const CDR::Boolean* x,
- CDR::ULong length)
+ACE_CDR::Boolean
+ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x,
+ ACE_CDR::ULong length)
{
// It is hard to optimize this, the spec requires that on the wire
// booleans be represented as a byte with value 0 or 1, but in
// memoery it is possible (though very unlikely) that a boolean has
// a non-zero value (different from 1).
// We resort to a simple loop.
- const CDR::Boolean* end = x + length;
- for (const CDR::Boolean* i = x; i != end && this->good_bit (); ++i)
+ const ACE_CDR::Boolean* end = x + length;
+ for (const ACE_CDR::Boolean* i = x; i != end && this->good_bit (); ++i)
{
this->write_boolean (*i);
}
@@ -566,14 +574,32 @@ ACE_InputCDR::ACE_InputCDR (size_t bufsiz,
{
}
-ACE_InputCDR::ACE_InputCDR (ACE_Message_Block *data,
+ACE_InputCDR::ACE_InputCDR (const ACE_Message_Block *data,
int byte_order)
- : start_ (data->data_block ()->duplicate ()),
+ : start_ (ACE_CDR::total_length (data, 0) + ACE_CDR::MAX_ALIGNMENT),
+ // @@ We may need allocators for the previous line, and the size may
+ // be a standard ACE_*CDR size...
do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
good_bit_ (1)
{
- this->start_.rd_ptr (data->rd_ptr ());
- this->start_.wr_ptr (data->wr_ptr ());
+ // We must copy the contents of <data> into the new buffer, but
+ // respecting the alignment.
+ ptr_arith_t curalign =
+ ptr_arith_t(data->wr_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
+ ptr_arith_t tmpalign =
+ ptr_arith_t(this->start_.rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
+ int offset = curalign - tmpalign;
+ if (offset < 0)
+ offset += ACE_CDR::MAX_ALIGNMENT;
+ this->start_.rd_ptr (offset);
+ this->start_.wr_ptr (offset);
+
+ for (const ACE_Message_Block* i = data;
+ i != 0;
+ i = i->cont ())
+ {
+ this->start_.copy (i->rd_ptr (), i->length ());
+ }
}
ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data,
@@ -586,7 +612,7 @@ ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data,
ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs,
size_t size,
- CDR::Long offset)
+ ACE_CDR::Long offset)
: start_ (rhs.start_.data_block ()->duplicate ()),
do_byte_swap_ (rhs.do_byte_swap_),
good_bit_ (1)
@@ -621,7 +647,7 @@ ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs,
this->start_.rd_ptr (newpos);
this->start_.wr_ptr (newpos + size);
- CDR::Octet byte_order;
+ ACE_CDR::Octet byte_order;
this->read_octet (byte_order);
this->do_byte_swap_ = (byte_order != ACE_CDR_BYTE_ORDER);
}
@@ -657,7 +683,7 @@ ACE_InputCDR::operator= (const ACE_InputCDR& rhs)
ACE_InputCDR::ACE_InputCDR (const ACE_OutputCDR& rhs,
ACE_Allocator* buffer_allocator,
ACE_Allocator* data_block_allocator)
- : start_ (rhs.total_length () + CDR::MAX_ALIGNMENT,
+ : start_ (rhs.total_length () + ACE_CDR::MAX_ALIGNMENT,
ACE_Message_Block::MB_DATA,
0,
0,
@@ -670,7 +696,7 @@ ACE_InputCDR::ACE_InputCDR (const ACE_OutputCDR& rhs,
do_byte_swap_ (rhs.do_byte_swap_),
good_bit_ (1)
{
- CDR::mb_align (&this->start_);
+ ACE_CDR::mb_align (&this->start_);
for (const ACE_Message_Block *i = rhs.begin ();
i != rhs.end ();
i = i->cont ())
@@ -681,15 +707,15 @@ ACE_InputCDR::~ACE_InputCDR (void)
{
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_InputCDR::read_string (char *&x)
{
- CDR::ULong len;
+ ACE_CDR::ULong len;
this->read_ulong (len);
if (len > 0)
{
- ACE_NEW_RETURN (x, CDR::Char[len], 0);
+ ACE_NEW_RETURN (x, ACE_CDR::Char[len], 0);
if (this->read_char_array (x, len))
return 1;
delete [] x;
@@ -699,10 +725,10 @@ ACE_InputCDR::read_string (char *&x)
return 0;
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_InputCDR::read_string (ACE_CString &x)
{
- CDR::Char *data;
+ ACE_CDR::Char *data;
if (this->read_string (data))
{
x = data;
@@ -714,14 +740,14 @@ ACE_InputCDR::read_string (ACE_CString &x)
return 0;
}
-CDR::Boolean
-ACE_InputCDR::read_wstring (CDR::WChar*& x)
+ACE_CDR::Boolean
+ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x)
{
- CDR::ULong len;
+ ACE_CDR::ULong len;
this->read_ulong (len);
if (this->good_bit())
{
- ACE_NEW_RETURN (x, CDR::WChar[len], 0);
+ ACE_NEW_RETURN (x, ACE_CDR::WChar[len], 0);
if (this->read_wchar_array (x, len))
return 1;
@@ -731,11 +757,11 @@ ACE_InputCDR::read_wstring (CDR::WChar*& x)
return 0;
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_InputCDR::read_array (void* x,
size_t size,
size_t align,
- CDR::ULong length)
+ ACE_CDR::ULong length)
{
char* buf;
if (this->adjust (size * length, align, buf) == 0)
@@ -755,25 +781,25 @@ ACE_InputCDR::read_array (void* x,
case 2:
for (; target != end; target += size, buf += size)
{
- CDR::swap_2 (buf, target);
+ ACE_CDR::swap_2 (buf, target);
}
break;
case 4:
for (; target != end; target += size, buf += size)
{
- CDR::swap_4 (buf, target);
+ ACE_CDR::swap_4 (buf, target);
}
break;
case 8:
for (; target != end; target += size, buf += size)
{
- CDR::swap_8 (buf, target);
+ ACE_CDR::swap_8 (buf, target);
}
break;
case 16:
for (; target != end; target += size, buf += size)
{
- CDR::swap_16 (buf, target);
+ ACE_CDR::swap_16 (buf, target);
}
break;
default:
@@ -790,28 +816,28 @@ ACE_InputCDR::read_array (void* x,
return 0;
}
-CDR::Boolean
-ACE_InputCDR::read_boolean_array (CDR::Boolean *x,
- CDR::ULong length)
+ACE_CDR::Boolean
+ACE_InputCDR::read_boolean_array (ACE_CDR::Boolean *x,
+ ACE_CDR::ULong length)
{
// It is hard to optimize this, the spec requires that on the wire
// booleans be represented as a byte with value 0 or 1, but in
// memoery it is possible (though very unlikely) that a boolean has
// a non-zero value (different from 1).
// We resort to a simple loop.
- for (CDR::ULong i = 0; i != length && this->good_bit_; ++i)
+ for (ACE_CDR::ULong i = 0; i != length && this->good_bit_; ++i)
{
this->read_boolean (x[i]);
}
return this->good_bit_;
}
-CDR::Boolean
-ACE_InputCDR::read_1 (CDR::Octet *x)
+ACE_CDR::Boolean
+ACE_InputCDR::read_1 (ACE_CDR::Octet *x)
{
if (this->rd_ptr () < this->end ())
{
- *x = *ACE_reinterpret_cast (CDR::Octet*,this->rd_ptr());
+ *x = *ACE_reinterpret_cast (ACE_CDR::Octet*,this->rd_ptr());
this->start_.rd_ptr (1);
return 1;
}
@@ -820,104 +846,104 @@ ACE_InputCDR::read_1 (CDR::Octet *x)
return 0;
}
-CDR::Boolean
-ACE_InputCDR::read_2 (CDR::UShort *x)
+ACE_CDR::Boolean
+ACE_InputCDR::read_2 (ACE_CDR::UShort *x)
{
char *buf;
- if (this->adjust (CDR::SHORT_SIZE, buf) == 0)
+ if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0)
{
#if !defined (ACE_DISABLE_SWAP_ON_READ)
if (!this->do_byte_swap_)
{
- *x = *ACE_reinterpret_cast (CDR::UShort*, buf);
+ *x = *ACE_reinterpret_cast (ACE_CDR::UShort*, buf);
}
else
{
- CDR::swap_2 (buf, ACE_reinterpret_cast (char*, x));
+ ACE_CDR::swap_2 (buf, ACE_reinterpret_cast (char*, x));
}
#else
- *x = *ACE_reinterpret_cast(CDR::UShort*,buf);
+ *x = *ACE_reinterpret_cast(ACE_CDR::UShort*,buf);
#endif /* ACE_DISABLE_SWAP_ON_READ */
return 1;
}
return 0;
}
-CDR::Boolean
-ACE_InputCDR::read_4 (CDR::ULong *x)
+ACE_CDR::Boolean
+ACE_InputCDR::read_4 (ACE_CDR::ULong *x)
{
char *buf;
- if (this->adjust (CDR::LONG_SIZE, buf) == 0)
+ if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0)
{
#if !defined (ACE_DISABLE_SWAP_ON_READ)
if (!this->do_byte_swap_)
{
- *x = *ACE_reinterpret_cast (CDR::ULong*, buf);
+ *x = *ACE_reinterpret_cast (ACE_CDR::ULong*, buf);
}
else
{
- CDR::swap_4 (buf, ACE_reinterpret_cast (char*, x));
+ ACE_CDR::swap_4 (buf, ACE_reinterpret_cast (char*, x));
}
#else
- *x = *ACE_reinterpret_cast(CDR::ULong*,buf);
+ *x = *ACE_reinterpret_cast(ACE_CDR::ULong*,buf);
#endif /* ACE_DISABLE_SWAP_ON_READ */
return 1;
}
return 0;
}
-CDR::Boolean
-ACE_InputCDR::read_8 (CDR::ULongLong *x)
+ACE_CDR::Boolean
+ACE_InputCDR::read_8 (ACE_CDR::ULongLong *x)
{
char *buf;
- if (this->adjust (CDR::LONGLONG_SIZE, buf) == 0)
+ if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0)
{
#if !defined (ACE_DISABLE_SWAP_ON_READ)
if (!this->do_byte_swap_)
{
- *x = *ACE_reinterpret_cast (CDR::ULongLong *, buf);
+ *x = *ACE_reinterpret_cast (ACE_CDR::ULongLong *, buf);
}
else
{
- CDR::swap_8 (buf, ACE_reinterpret_cast (char*, x));
+ ACE_CDR::swap_8 (buf, ACE_reinterpret_cast (char*, x));
}
#else
- *x = *ACE_reinterpret_cast(CDR::ULongLong*,buf);
+ *x = *ACE_reinterpret_cast(ACE_CDR::ULongLong*,buf);
#endif /* ACE_DISABLE_SWAP_ON_READ */
return 1;
}
return 0;
}
-CDR::Boolean
-ACE_InputCDR::read_16 (CDR::LongDouble *x)
+ACE_CDR::Boolean
+ACE_InputCDR::read_16 (ACE_CDR::LongDouble *x)
{
char *buf;
- if (this->adjust (CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ if (this->adjust (ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
buf) == 0)
{
#if !defined (ACE_DISABLE_SWAP_ON_READ)
if (!this->do_byte_swap_)
{
- *x = *ACE_reinterpret_cast (CDR::LongDouble *, buf);
+ *x = *ACE_reinterpret_cast (ACE_CDR::LongDouble *, buf);
}
else
{
- CDR::swap_16 (buf, ACE_reinterpret_cast (char*, x));
+ ACE_CDR::swap_16 (buf, ACE_reinterpret_cast (char*, x));
}
#else
- *x = *ACE_reinterpret_cast(CDR::LongDouble*,buf);
+ *x = *ACE_reinterpret_cast(ACE_CDR::LongDouble*,buf);
#endif /* ACE_DISABLE_SWAP_ON_READ */
return 1;
}
return 0;
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_InputCDR::skip_string (void)
{
- CDR::ULong len;
+ ACE_CDR::ULong len;
if (this->read_ulong (len))
{
if (this->rd_ptr () + len <= this->end ())
@@ -931,7 +957,7 @@ ACE_InputCDR::skip_string (void)
return 0;
}
-CDR::Boolean
+ACE_CDR::Boolean
ACE_InputCDR::skip_bytes (size_t len)
{
if (this->rd_ptr () + len <= this->end ())
diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h
index 106c92c074b..36c2f683526 100644
--- a/ace/CDR_Stream.h
+++ b/ace/CDR_Stream.h
@@ -54,11 +54,12 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-class ACE_Export CDR
+class ACE_Export ACE_CDR
{
// = TITLE
// Keep constants and some routines common to both Output and
// Input CDR streams.
+ //
public:
// = Constants defined by the CDR protocol.
// By defining as many of these constants as possible as enums we
@@ -122,6 +123,9 @@ public:
// large enough to contain any of the basic IDL types. Return -1 on
// failure, 0 on success.
+ static size_t total_length (const ACE_Message_Block *begin,
+ const ACE_Message_Block *end);
+
// Definitions of the IDL basic types, for use in the CDR
// classes. The cleanest way to avoid complaints from all compilers
// is to define them all.
@@ -163,9 +167,9 @@ public:
// application can cope with the loss of range, it can define
// conversion operators itself.
# if defined (ACE_BIG_ENDIAN)
- struct LongLong { CDR::Long h, l; };
+ struct LongLong { ACE_CDR::Long h, l; };
# else
- struct LongLong { CDR::Long l, h; };
+ struct LongLong { ACE_CDR::Long l, h; };
# endif /* ! ACE_BIG_ENDIAN */
# endif /* no native 64 bit integer type */
@@ -277,114 +281,115 @@ public:
struct ACE_Export from_boolean
{
- from_boolean (CDR::Boolean b);
- CDR::Boolean val_;
+ from_boolean (ACE_CDR::Boolean b);
+ ACE_CDR::Boolean val_;
};
struct ACE_Export from_octet
{
- from_octet (CDR::Octet o);
- CDR::Octet val_;
+ from_octet (ACE_CDR::Octet o);
+ ACE_CDR::Octet val_;
};
struct ACE_Export from_char
{
- from_char (CDR::Char c);
- CDR::Char val_;
+ from_char (ACE_CDR::Char c);
+ ACE_CDR::Char val_;
};
struct ACE_Export from_wchar
{
- from_wchar (CDR::WChar wc);
- CDR::WChar val_;
+ from_wchar (ACE_CDR::WChar wc);
+ ACE_CDR::WChar val_;
};
struct ACE_Export from_string
{
- from_string (CDR::Char* s,
- CDR::ULong b,
- CDR::Boolean nocopy = 0);
- CDR::Char *val_;
- CDR::ULong bound_;
- CDR::Boolean nocopy_;
+ from_string (ACE_CDR::Char* s,
+ ACE_CDR::ULong b,
+ ACE_CDR::Boolean nocopy = 0);
+ ACE_CDR::Char *val_;
+ ACE_CDR::ULong bound_;
+ ACE_CDR::Boolean nocopy_;
};
// = We have one method per basic IDL type....
// They return 0 on failure and 1 on success.
- CDR::Boolean write_boolean (CDR::Boolean x);
- CDR::Boolean write_char (CDR::Char x);
- CDR::Boolean write_wchar (CDR::WChar x);
- CDR::Boolean write_octet (CDR::Octet x);
- CDR::Boolean write_short (CDR::Short x);
- CDR::Boolean write_ushort (CDR::UShort x);
- CDR::Boolean write_long (CDR::Long x);
- CDR::Boolean write_ulong (CDR::ULong x);
- CDR::Boolean write_longlong (const CDR::LongLong &x);
- CDR::Boolean write_ulonglong (const CDR::ULongLong &x);
- CDR::Boolean write_float (CDR::Float x);
- CDR::Boolean write_double (const CDR::Double &x);
- CDR::Boolean write_longdouble (const CDR::LongDouble &x);
+ ACE_CDR::Boolean write_boolean (ACE_CDR::Boolean x);
+ ACE_CDR::Boolean write_char (ACE_CDR::Char x);
+ ACE_CDR::Boolean write_wchar (ACE_CDR::WChar x);
+ ACE_CDR::Boolean write_octet (ACE_CDR::Octet x);
+ ACE_CDR::Boolean write_short (ACE_CDR::Short x);
+ ACE_CDR::Boolean write_ushort (ACE_CDR::UShort x);
+ ACE_CDR::Boolean write_long (ACE_CDR::Long x);
+ ACE_CDR::Boolean write_ulong (ACE_CDR::ULong x);
+ ACE_CDR::Boolean write_longlong (const ACE_CDR::LongLong &x);
+ ACE_CDR::Boolean write_ulonglong (const ACE_CDR::ULongLong &x);
+ ACE_CDR::Boolean write_float (ACE_CDR::Float x);
+ ACE_CDR::Boolean write_double (const ACE_CDR::Double &x);
+ ACE_CDR::Boolean write_longdouble (const ACE_CDR::LongDouble &x);
// = For string we offer methods that accept a precomputed length.
- CDR::Boolean write_string (const CDR::Char *x);
- CDR::Boolean write_string (CDR::ULong len, const CDR::Char *x);
- CDR::Boolean write_string (const ACE_CString &x);
- CDR::Boolean write_wstring (const CDR::WChar *x);
- CDR::Boolean write_wstring (CDR::ULong length,
- const CDR::WChar *x);
+ ACE_CDR::Boolean write_string (const ACE_CDR::Char *x);
+ ACE_CDR::Boolean write_string (ACE_CDR::ULong len,
+ const ACE_CDR::Char *x);
+ ACE_CDR::Boolean write_string (const ACE_CString &x);
+ ACE_CDR::Boolean write_wstring (const ACE_CDR::WChar *x);
+ ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length,
+ const ACE_CDR::WChar *x);
// = We add one method to write arrays of basic IDL types.
// Note: the portion written starts at <x> and ends at <x + length>.
// The length is *NOT* stored into the CDR stream.
- CDR::Boolean write_boolean_array (const CDR::Boolean *x,
- CDR::ULong length);
- CDR::Boolean write_char_array (const CDR::Char *x,
- CDR::ULong length);
- CDR::Boolean write_wchar_array (const CDR::WChar* x,
- CDR::ULong length);
- CDR::Boolean write_octet_array (const CDR::Octet* x,
- CDR::ULong length);
- CDR::Boolean write_short_array (const CDR::Short *x,
- CDR::ULong length);
- CDR::Boolean write_ushort_array (const CDR::UShort *x,
- CDR::ULong length);
- CDR::Boolean write_long_array (const CDR::Long *x,
- CDR::ULong length);
- CDR::Boolean write_ulong_array (const CDR::ULong *x,
- CDR::ULong length);
- CDR::Boolean write_longlong_array (const CDR::LongLong* x,
- CDR::ULong length);
- CDR::Boolean write_ulonglong_array (const CDR::ULongLong *x,
- CDR::ULong length);
- CDR::Boolean write_float_array (const CDR::Float *x,
- CDR::ULong length);
- CDR::Boolean write_double_array (const CDR::Double *x,
- CDR::ULong length);
- CDR::Boolean write_longdouble_array (const CDR::LongDouble* x,
- CDR::ULong length);
-
- CDR::Boolean write_octet_array_mb (const ACE_Message_Block* mb);
+ ACE_CDR::Boolean write_boolean_array (const ACE_CDR::Boolean *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_char_array (const ACE_CDR::Char *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_wchar_array (const ACE_CDR::WChar* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_octet_array (const ACE_CDR::Octet* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_short_array (const ACE_CDR::Short *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_ushort_array (const ACE_CDR::UShort *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_long_array (const ACE_CDR::Long *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_ulong_array (const ACE_CDR::ULong *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_longlong_array (const ACE_CDR::LongLong* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_ulonglong_array (const ACE_CDR::ULongLong *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_float_array (const ACE_CDR::Float *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_double_array (const ACE_CDR::Double *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean write_longdouble_array (const ACE_CDR::LongDouble* x,
+ ACE_CDR::ULong length);
+
+ ACE_CDR::Boolean write_octet_array_mb (const ACE_Message_Block* mb);
// Write an octet array contained inside a MB, this can be optimized
// to minimize copies.
// = We have one method per basic IDL type....
// They return 0 on failure and 1 on success.
- CDR::Boolean append_boolean (ACE_InputCDR &);
- CDR::Boolean append_char (ACE_InputCDR &);
- CDR::Boolean append_wchar (ACE_InputCDR &);
- CDR::Boolean append_octet (ACE_InputCDR &);
- CDR::Boolean append_short (ACE_InputCDR &);
- CDR::Boolean append_ushort (ACE_InputCDR &);
- CDR::Boolean append_long (ACE_InputCDR &);
- CDR::Boolean append_ulong (ACE_InputCDR &);
- CDR::Boolean append_longlong (ACE_InputCDR &);
- CDR::Boolean append_ulonglong (ACE_InputCDR &);
- CDR::Boolean append_float (ACE_InputCDR &);
- CDR::Boolean append_double (ACE_InputCDR &);
- CDR::Boolean append_longdouble (ACE_InputCDR &);
-
- CDR::Boolean append_wstring (ACE_InputCDR &);
- CDR::Boolean append_string (ACE_InputCDR &);
+ ACE_CDR::Boolean append_boolean (ACE_InputCDR &);
+ ACE_CDR::Boolean append_char (ACE_InputCDR &);
+ ACE_CDR::Boolean append_wchar (ACE_InputCDR &);
+ ACE_CDR::Boolean append_octet (ACE_InputCDR &);
+ ACE_CDR::Boolean append_short (ACE_InputCDR &);
+ ACE_CDR::Boolean append_ushort (ACE_InputCDR &);
+ ACE_CDR::Boolean append_long (ACE_InputCDR &);
+ ACE_CDR::Boolean append_ulong (ACE_InputCDR &);
+ ACE_CDR::Boolean append_longlong (ACE_InputCDR &);
+ ACE_CDR::Boolean append_ulonglong (ACE_InputCDR &);
+ ACE_CDR::Boolean append_float (ACE_InputCDR &);
+ ACE_CDR::Boolean append_double (ACE_InputCDR &);
+ ACE_CDR::Boolean append_longdouble (ACE_InputCDR &);
+
+ ACE_CDR::Boolean append_wstring (ACE_InputCDR &);
+ ACE_CDR::Boolean append_string (ACE_InputCDR &);
int good_bit (void) const;
// Returns 0 if an error has ocurred, the only expected error is to
@@ -422,16 +427,16 @@ private:
ACE_OutputCDR& operator= (const ACE_OutputCDR& rhs);
// disallow copying...
- CDR::Boolean write_1 (const CDR::Octet *x);
- CDR::Boolean write_2 (const CDR::UShort *x);
- CDR::Boolean write_4 (const CDR::ULong *x);
- CDR::Boolean write_8 (const CDR::ULongLong *x);
- CDR::Boolean write_16 (const CDR::LongDouble *x);
+ ACE_CDR::Boolean write_1 (const ACE_CDR::Octet *x);
+ ACE_CDR::Boolean write_2 (const ACE_CDR::UShort *x);
+ ACE_CDR::Boolean write_4 (const ACE_CDR::ULong *x);
+ ACE_CDR::Boolean write_8 (const ACE_CDR::ULongLong *x);
+ ACE_CDR::Boolean write_16 (const ACE_CDR::LongDouble *x);
- CDR::Boolean write_array (const void *x,
- size_t size,
- size_t align,
- CDR::ULong length);
+ ACE_CDR::Boolean write_array (const void *x,
+ size_t size,
+ size_t align,
+ ACE_CDR::ULong length);
// write an array of <length> elements, each of <size> bytes and the
// start aligned at a multiple of <align>. The elements are assumed
// to be packed with the right alignment restrictions. It is mostly
@@ -525,7 +530,7 @@ public:
// Create an empty input stream. The caller is responsible for
// putting the right data and providing the right alignment.
- ACE_InputCDR (ACE_Message_Block *data,
+ ACE_InputCDR (const ACE_Message_Block *data,
int byte_order = ACE_CDR_BYTE_ORDER);
// Create an input stream from an ACE_Message_Block
@@ -541,7 +546,7 @@ public:
ACE_InputCDR (const ACE_InputCDR& rhs,
size_t size,
- CDR::Long offset);
+ ACE_CDR::Long offset);
// When interpreting indirected TypeCodes it is useful to make a
// "copy" of the stream starting in the new position.
@@ -563,109 +568,109 @@ public:
struct ACE_Export to_boolean
{
- to_boolean (CDR::Boolean &b);
- CDR::Boolean &ref_;
+ to_boolean (ACE_CDR::Boolean &b);
+ ACE_CDR::Boolean &ref_;
};
struct ACE_Export to_char
{
- to_char (CDR::Char &c);
- CDR::Char &ref_;
+ to_char (ACE_CDR::Char &c);
+ ACE_CDR::Char &ref_;
};
struct ACE_Export to_wchar
{
- to_wchar (CDR::WChar &wc);
- CDR::WChar &ref_;
+ to_wchar (ACE_CDR::WChar &wc);
+ ACE_CDR::WChar &ref_;
};
struct ACE_Export to_octet
{
- to_octet (CDR::Octet &o);
- CDR::Octet &ref_;
+ to_octet (ACE_CDR::Octet &o);
+ ACE_CDR::Octet &ref_;
};
struct ACE_Export to_string
{
- to_string (CDR::Char *&s, CDR::ULong b);
- CDR::Char *&val_;
- CDR::ULong bound_;
+ to_string (ACE_CDR::Char *&s, ACE_CDR::ULong b);
+ ACE_CDR::Char *&val_;
+ ACE_CDR::ULong bound_;
};
// = We have one method per basic IDL type....
// They return 0 on failure and 1 on success.
- CDR::Boolean read_boolean (CDR::Boolean& x);
- CDR::Boolean read_char (CDR::Char &x);
- CDR::Boolean read_wchar (CDR::WChar& x);
- CDR::Boolean read_octet (CDR::Octet& x);
- CDR::Boolean read_short (CDR::Short &x);
- CDR::Boolean read_ushort (CDR::UShort &x);
- CDR::Boolean read_long (CDR::Long &x);
- CDR::Boolean read_ulong (CDR::ULong &x);
- CDR::Boolean read_longlong (CDR::LongLong& x);
- CDR::Boolean read_ulonglong (CDR::ULongLong& x);
- CDR::Boolean read_float (CDR::Float &x);
- CDR::Boolean read_double (CDR::Double &x);
- CDR::Boolean read_longdouble (CDR::LongDouble &x);
-
- CDR::Boolean read_string (CDR::Char *&x);
- CDR::Boolean read_string (ACE_CString &x);
- CDR::Boolean read_wstring (CDR::WChar*& x);
+ ACE_CDR::Boolean read_boolean (ACE_CDR::Boolean& x);
+ ACE_CDR::Boolean read_char (ACE_CDR::Char &x);
+ ACE_CDR::Boolean read_wchar (ACE_CDR::WChar& x);
+ ACE_CDR::Boolean read_octet (ACE_CDR::Octet& x);
+ ACE_CDR::Boolean read_short (ACE_CDR::Short &x);
+ ACE_CDR::Boolean read_ushort (ACE_CDR::UShort &x);
+ ACE_CDR::Boolean read_long (ACE_CDR::Long &x);
+ ACE_CDR::Boolean read_ulong (ACE_CDR::ULong &x);
+ ACE_CDR::Boolean read_longlong (ACE_CDR::LongLong& x);
+ ACE_CDR::Boolean read_ulonglong (ACE_CDR::ULongLong& x);
+ ACE_CDR::Boolean read_float (ACE_CDR::Float &x);
+ ACE_CDR::Boolean read_double (ACE_CDR::Double &x);
+ ACE_CDR::Boolean read_longdouble (ACE_CDR::LongDouble &x);
+
+ ACE_CDR::Boolean read_string (ACE_CDR::Char *&x);
+ ACE_CDR::Boolean read_string (ACE_CString &x);
+ ACE_CDR::Boolean read_wstring (ACE_CDR::WChar*& x);
// = One method for each basic type...
// The buffer <x> must be large enough to contain <length>
// elements.
// They return -1 on failure and 0 on success.
- CDR::Boolean read_boolean_array (CDR::Boolean* x,
- CDR::ULong length);
- CDR::Boolean read_char_array (CDR::Char *x,
- CDR::ULong length);
- CDR::Boolean read_wchar_array (CDR::WChar* x,
- CDR::ULong length);
- CDR::Boolean read_octet_array (CDR::Octet* x,
- CDR::ULong length);
- CDR::Boolean read_short_array (CDR::Short *x,
- CDR::ULong length);
- CDR::Boolean read_ushort_array (CDR::UShort *x,
- CDR::ULong length);
- CDR::Boolean read_long_array (CDR::Long *x,
- CDR::ULong length);
- CDR::Boolean read_ulong_array (CDR::ULong *x,
- CDR::ULong length);
- CDR::Boolean read_longlong_array (CDR::LongLong* x,
- CDR::ULong length);
- CDR::Boolean read_ulonglong_array (CDR::ULongLong* x,
- CDR::ULong length);
- CDR::Boolean read_float_array (CDR::Float *x,
- CDR::ULong length);
- CDR::Boolean read_double_array (CDR::Double *x,
- CDR::ULong length);
- CDR::Boolean read_longdouble_array (CDR::LongDouble* x,
- CDR::ULong length);
+ ACE_CDR::Boolean read_boolean_array (ACE_CDR::Boolean* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_char_array (ACE_CDR::Char *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_wchar_array (ACE_CDR::WChar* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_octet_array (ACE_CDR::Octet* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_short_array (ACE_CDR::Short *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_ushort_array (ACE_CDR::UShort *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_long_array (ACE_CDR::Long *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_ulong_array (ACE_CDR::ULong *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_longlong_array (ACE_CDR::LongLong* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_ulonglong_array (ACE_CDR::ULongLong* x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_float_array (ACE_CDR::Float *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_double_array (ACE_CDR::Double *x,
+ ACE_CDR::ULong length);
+ ACE_CDR::Boolean read_longdouble_array (ACE_CDR::LongDouble* x,
+ ACE_CDR::ULong length);
// = We have one method per basic IDL type....
// They return 0 on failure and 1 on success.
- CDR::Boolean skip_boolean (void);
- CDR::Boolean skip_char (void);
- CDR::Boolean skip_wchar (void);
- CDR::Boolean skip_octet (void);
- CDR::Boolean skip_short (void);
- CDR::Boolean skip_ushort (void);
- CDR::Boolean skip_long (void);
- CDR::Boolean skip_ulong (void);
- CDR::Boolean skip_longlong (void);
- CDR::Boolean skip_ulonglong (void);
- CDR::Boolean skip_float (void);
- CDR::Boolean skip_double (void);
- CDR::Boolean skip_longdouble (void);
-
- CDR::Boolean skip_wstring (void);
- CDR::Boolean skip_string (void);
+ ACE_CDR::Boolean skip_boolean (void);
+ ACE_CDR::Boolean skip_char (void);
+ ACE_CDR::Boolean skip_wchar (void);
+ ACE_CDR::Boolean skip_octet (void);
+ ACE_CDR::Boolean skip_short (void);
+ ACE_CDR::Boolean skip_ushort (void);
+ ACE_CDR::Boolean skip_long (void);
+ ACE_CDR::Boolean skip_ulong (void);
+ ACE_CDR::Boolean skip_longlong (void);
+ ACE_CDR::Boolean skip_ulonglong (void);
+ ACE_CDR::Boolean skip_float (void);
+ ACE_CDR::Boolean skip_double (void);
+ ACE_CDR::Boolean skip_longdouble (void);
+
+ ACE_CDR::Boolean skip_wstring (void);
+ ACE_CDR::Boolean skip_string (void);
// The next field must be a string, this method skips it. It is
// useful in parsing a TypeCode.
// Return 0 on failure and 1 on success.
- CDR::Boolean skip_bytes (size_t n);
+ ACE_CDR::Boolean skip_bytes (size_t n);
// Skip <n> bytes in the CDR stream.
// Return 0 on failure and 1 on success.
@@ -706,11 +711,11 @@ protected:
// set to 0 when an error occurs.
private:
- CDR::Boolean read_1 (CDR::Octet *x);
- CDR::Boolean read_2 (CDR::UShort *x);
- CDR::Boolean read_4 (CDR::ULong *x);
- CDR::Boolean read_8 (CDR::ULongLong *x);
- CDR::Boolean read_16 (CDR::LongDouble *x);
+ ACE_CDR::Boolean read_1 (ACE_CDR::Octet *x);
+ ACE_CDR::Boolean read_2 (ACE_CDR::UShort *x);
+ ACE_CDR::Boolean read_4 (ACE_CDR::ULong *x);
+ ACE_CDR::Boolean read_8 (ACE_CDR::ULongLong *x);
+ ACE_CDR::Boolean read_16 (ACE_CDR::LongDouble *x);
// Several types can be read using the same routines, since TAO
// tries to use native types with known size for each CORBA type.
@@ -719,10 +724,10 @@ private:
// alignment requirements of CDR streams and implement the
// operations using asignment.
- CDR::Boolean read_array (void* x,
- size_t size,
- size_t align,
- CDR::ULong length);
+ ACE_CDR::Boolean read_array (void* x,
+ size_t size,
+ size_t align,
+ ACE_CDR::ULong length);
// Read an array of <length> elements, each of <size> bytes and the
// start aligned at a multiple of <align>. The elements are assumed
// to be packed with the right alignment restrictions. It is mostly
@@ -757,75 +762,75 @@ private:
#else
// CDR output operators for primitive types
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::Short x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::UShort x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::Long x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::ULong x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::LongLong x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::ULongLong x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR& os,
- CDR::LongDouble x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::Float x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- CDR::Double x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- const ACE_CString &x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::Short x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::UShort x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::Long x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::ULong x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::LongLong x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::ULongLong x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR& os,
+ ACE_CDR::LongDouble x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::Float x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_CDR::Double x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ const ACE_CString &x);
// CDR output operator from helper classes
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_boolean x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_char x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_wchar x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_octet x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_string x);
-extern ACE_Export CDR::Boolean operator<< (ACE_OutputCDR &os,
- const CDR::Char* x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_OutputCDR::from_boolean x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_OutputCDR::from_char x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_OutputCDR::from_wchar x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_OutputCDR::from_octet x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ ACE_OutputCDR::from_string x);
+extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
+ const ACE_CDR::Char* x);
// CDR input operators for primitive types
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::Short &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::UShort &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::Long &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::ULong &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::LongLong &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::ULongLong &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::LongDouble &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::Float &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::Double &x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CString &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::Short &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::UShort &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::Long &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::ULong &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::LongLong &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::ULongLong &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::LongDouble &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::Float &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::Double &x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CString &x);
// CDR input operator from helper classes
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_boolean x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_char x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_wchar x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_octet x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_string x);
-extern ACE_Export CDR::Boolean operator>> (ACE_InputCDR &is,
- CDR::Char*& x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_InputCDR::to_boolean x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_InputCDR::to_char x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_InputCDR::to_wchar x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_InputCDR::to_octet x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_InputCDR::to_string x);
+extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
+ ACE_CDR::Char*& x);
#endif /* __ACE_INLINE */
diff --git a/ace/CDR_Stream.i b/ace/CDR_Stream.i
index 7b92b59fc63..ce6541b006b 100644
--- a/ace/CDR_Stream.i
+++ b/ace/CDR_Stream.i
@@ -4,14 +4,14 @@
// ****************************************************************
ACE_INLINE void
-CDR::swap_2 (const char *orig, char* target)
+ACE_CDR::swap_2 (const char *orig, char* target)
{
target[1] = *orig++;
target[0] = *orig++;
}
ACE_INLINE void
-CDR::swap_4 (const char *orig, char* target)
+ACE_CDR::swap_4 (const char *orig, char* target)
{
target [3] = *orig++;
target [2] = *orig++;
@@ -20,7 +20,7 @@ CDR::swap_4 (const char *orig, char* target)
}
ACE_INLINE void
-CDR::swap_8 (const char *orig, char* target)
+ACE_CDR::swap_8 (const char *orig, char* target)
{
target [7] = *orig++;
target [6] = *orig++;
@@ -33,7 +33,7 @@ CDR::swap_8 (const char *orig, char* target)
}
ACE_INLINE void
-CDR::swap_16 (const char *orig, char* target)
+ACE_CDR::swap_16 (const char *orig, char* target)
{
target [15] = *orig++;
target [14] = *orig++;
@@ -54,10 +54,10 @@ CDR::swap_16 (const char *orig, char* target)
}
ACE_INLINE void
-CDR::mb_align (ACE_Message_Block *mb)
+ACE_CDR::mb_align (ACE_Message_Block *mb)
{
char *start = ptr_align_binary (mb->base (),
- CDR::MAX_ALIGNMENT);
+ ACE_CDR::MAX_ALIGNMENT);
mb->rd_ptr (start);
mb->wr_ptr (start);
@@ -75,57 +75,57 @@ CDR::mb_align (ACE_Message_Block *mb)
// implementing the special types
ACE_INLINE
-ACE_OutputCDR::from_boolean::from_boolean (CDR::Boolean b)
+ACE_OutputCDR::from_boolean::from_boolean (ACE_CDR::Boolean b)
: val_ (b)
{
}
ACE_INLINE
-ACE_InputCDR::to_boolean::to_boolean (CDR::Boolean &b)
+ACE_InputCDR::to_boolean::to_boolean (ACE_CDR::Boolean &b)
: ref_ (b)
{
}
ACE_INLINE
-ACE_OutputCDR::from_octet::from_octet (CDR::Octet o)
+ACE_OutputCDR::from_octet::from_octet (ACE_CDR::Octet o)
: val_ (o)
{
}
ACE_INLINE
-ACE_InputCDR::to_octet::to_octet (CDR::Octet &o)
+ACE_InputCDR::to_octet::to_octet (ACE_CDR::Octet &o)
: ref_ (o)
{
}
ACE_INLINE
-ACE_OutputCDR::from_char::from_char (CDR::Char c)
+ACE_OutputCDR::from_char::from_char (ACE_CDR::Char c)
: val_ (c)
{
}
ACE_INLINE
-ACE_InputCDR::to_char::to_char (CDR::Char &c)
+ACE_InputCDR::to_char::to_char (ACE_CDR::Char &c)
: ref_ (c)
{
}
ACE_INLINE
-ACE_OutputCDR::from_wchar::from_wchar (CDR::WChar wc)
+ACE_OutputCDR::from_wchar::from_wchar (ACE_CDR::WChar wc)
: val_ (wc)
{
}
ACE_INLINE
-ACE_InputCDR::to_wchar::to_wchar (CDR::WChar &wc)
+ACE_InputCDR::to_wchar::to_wchar (ACE_CDR::WChar &wc)
: ref_ (wc)
{
}
ACE_INLINE
-ACE_OutputCDR::from_string::from_string (CDR::Char *s,
- CDR::ULong b,
- CDR::Boolean nocopy)
+ACE_OutputCDR::from_string::from_string (ACE_CDR::Char *s,
+ ACE_CDR::ULong b,
+ ACE_CDR::Boolean nocopy)
: val_ (s),
bound_ (b),
nocopy_ (nocopy)
@@ -133,8 +133,8 @@ ACE_OutputCDR::from_string::from_string (CDR::Char *s,
}
ACE_INLINE
-ACE_InputCDR::to_string::to_string (CDR::Char *&s,
- CDR::ULong b)
+ACE_InputCDR::to_string::to_string (ACE_CDR::Char *&s,
+ ACE_CDR::ULong b)
: val_ (s),
bound_ (b)
{
@@ -144,224 +144,224 @@ ACE_InputCDR::to_string::to_string (CDR::Char *&s,
// Decode the CDR stream.
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_octet (CDR::Octet x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_octet (ACE_CDR::Octet x)
{
- return this->write_1 (ACE_reinterpret_cast (const CDR::Octet*,&x));
+ return this->write_1 (ACE_reinterpret_cast (const ACE_CDR::Octet*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_boolean (CDR::Boolean x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_boolean (ACE_CDR::Boolean x)
{
return this->write_octet (x ? 1 : 0);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_char (CDR::Char x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_char (ACE_CDR::Char x)
{
- return this->write_1 (ACE_reinterpret_cast (const CDR::Octet*, &x));
+ return this->write_1 (ACE_reinterpret_cast (const ACE_CDR::Octet*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_wchar (CDR::WChar x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_wchar (ACE_CDR::WChar x)
{
- return this->write_2 (ACE_reinterpret_cast (const CDR::UShort*,&x));
+ return this->write_2 (ACE_reinterpret_cast (const ACE_CDR::UShort*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_short (CDR::Short x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_short (ACE_CDR::Short x)
{
- return this->write_2 (ACE_reinterpret_cast (const CDR::UShort*, &x));
+ return this->write_2 (ACE_reinterpret_cast (const ACE_CDR::UShort*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_ushort (CDR::UShort x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_ushort (ACE_CDR::UShort x)
{
- return this->write_2 (ACE_reinterpret_cast (const CDR::UShort*, &x));
+ return this->write_2 (ACE_reinterpret_cast (const ACE_CDR::UShort*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_long (CDR::Long x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_long (ACE_CDR::Long x)
{
- return this->write_4 (ACE_reinterpret_cast (const CDR::ULong*, &x));
+ return this->write_4 (ACE_reinterpret_cast (const ACE_CDR::ULong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_ulong (CDR::ULong x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_ulong (ACE_CDR::ULong x)
{
- return this->write_4 (ACE_reinterpret_cast (const CDR::ULong*, &x));
+ return this->write_4 (ACE_reinterpret_cast (const ACE_CDR::ULong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_longlong (const CDR::LongLong &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_longlong (const ACE_CDR::LongLong &x)
{
- return this->write_8 (ACE_reinterpret_cast (const CDR::ULongLong*, &x));
+ return this->write_8 (ACE_reinterpret_cast (const ACE_CDR::ULongLong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_ulonglong (const CDR::ULongLong &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_ulonglong (const ACE_CDR::ULongLong &x)
{
- return this->write_8 (ACE_reinterpret_cast (const CDR::ULongLong*,&x));
+ return this->write_8 (ACE_reinterpret_cast (const ACE_CDR::ULongLong*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_float (CDR::Float x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_float (ACE_CDR::Float x)
{
- return this->write_4 (ACE_reinterpret_cast (const CDR::ULong*, &x));
+ return this->write_4 (ACE_reinterpret_cast (const ACE_CDR::ULong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_double (const CDR::Double &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_double (const ACE_CDR::Double &x)
{
- return this->write_8 (ACE_reinterpret_cast (const CDR::ULongLong*, &x));
+ return this->write_8 (ACE_reinterpret_cast (const ACE_CDR::ULongLong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_longdouble (const CDR::LongDouble &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_longdouble (const ACE_CDR::LongDouble &x)
{
- return this->write_16 (ACE_reinterpret_cast (const CDR::LongDouble*,&x));
+ return this->write_16 (ACE_reinterpret_cast (const ACE_CDR::LongDouble*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_string (const CDR::Char *x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_string (const ACE_CDR::Char *x)
{
if (x != 0)
return this->write_string (ACE_OS::strlen(x), x);
return this->write_string (0, 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::write_string (const ACE_CString &x)
{
return this->write_string (x.length(), x.c_str());
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_wstring (const CDR::WChar *x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_wstring (const ACE_CDR::WChar *x)
{
if (x != 0)
return this->write_wstring (ACE_OS::wslen (x), x);
return this->write_wstring (0, 0);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_char_array (const CDR::Char *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_char_array (const ACE_CDR::Char *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::OCTET_SIZE,
- CDR::OCTET_ALIGN,
+ ACE_CDR::OCTET_SIZE,
+ ACE_CDR::OCTET_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_wchar_array (const CDR::WChar* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_wchar_array (const ACE_CDR::WChar* x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::SHORT_SIZE,
- CDR::SHORT_ALIGN,
+ ACE_CDR::SHORT_SIZE,
+ ACE_CDR::SHORT_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_octet_array (const CDR::Octet* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_octet_array (const ACE_CDR::Octet* x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::OCTET_SIZE,
- CDR::OCTET_ALIGN,
+ ACE_CDR::OCTET_SIZE,
+ ACE_CDR::OCTET_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_short_array (const CDR::Short *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_short_array (const ACE_CDR::Short *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::SHORT_SIZE,
- CDR::SHORT_ALIGN,
+ ACE_CDR::SHORT_SIZE,
+ ACE_CDR::SHORT_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_ushort_array (const CDR::UShort *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_ushort_array (const ACE_CDR::UShort *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::SHORT_SIZE,
- CDR::SHORT_ALIGN,
+ ACE_CDR::SHORT_SIZE,
+ ACE_CDR::SHORT_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_long_array (const CDR::Long *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_long_array (const ACE_CDR::Long *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONG_SIZE,
- CDR::LONG_ALIGN,
+ ACE_CDR::LONG_SIZE,
+ ACE_CDR::LONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_ulong_array (const CDR::ULong *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_ulong_array (const ACE_CDR::ULong *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONG_SIZE,
- CDR::LONG_ALIGN,
+ ACE_CDR::LONG_SIZE,
+ ACE_CDR::LONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_longlong_array (const CDR::LongLong *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_longlong_array (const ACE_CDR::LongLong *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_ulonglong_array (const CDR::ULongLong *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_ulonglong_array (const ACE_CDR::ULongLong *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_float_array (const CDR::Float *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_float_array (const ACE_CDR::Float *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONG_SIZE,
- CDR::LONG_ALIGN,
+ ACE_CDR::LONG_SIZE,
+ ACE_CDR::LONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_double_array (const CDR::Double *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_double_array (const ACE_CDR::Double *x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_OutputCDR::write_longdouble_array (const CDR::LongDouble* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_OutputCDR::write_longdouble_array (const ACE_CDR::LongDouble* x,
+ ACE_CDR::ULong length)
{
return this->write_array (x,
- CDR::LONGDOUBLE_SIZE,
- CDR::LONGDOUBLE_ALIGN,
+ ACE_CDR::LONGDOUBLE_SIZE,
+ ACE_CDR::LONGDOUBLE_ALIGN,
length);
}
@@ -429,7 +429,7 @@ ACE_INLINE int
ACE_OutputCDR::align_write_ptr (size_t alignment)
{
char *buf = ptr_align_binary (this->current_->wr_ptr (),
- alignment);
+ alignment);
if (buf <= this->current_->end ())
{
@@ -438,307 +438,307 @@ ACE_OutputCDR::align_write_ptr (size_t alignment)
}
return this->grow_and_adjust (0, alignment, buf);
-}
+}
// ****************************************************************
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_octet (CDR::Octet& x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_octet (ACE_CDR::Octet& x)
{
return this->read_1 (&x);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_boolean (CDR::Boolean& x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_boolean (ACE_CDR::Boolean& x)
{
- CDR::Octet tmp;
+ ACE_CDR::Octet tmp;
this->read_octet (tmp);
x = tmp ? 1 : 0;
return this->good_bit_;
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_char (CDR::Char &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_char (ACE_CDR::Char &x)
{
- return this->read_1 (ACE_reinterpret_cast (CDR::Octet*, &x));
+ return this->read_1 (ACE_reinterpret_cast (ACE_CDR::Octet*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_wchar (CDR::WChar& x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_wchar (ACE_CDR::WChar& x)
{
- return this->read_2 (ACE_reinterpret_cast (CDR::UShort*,&x));
+ return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_short (CDR::Short &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_short (ACE_CDR::Short &x)
{
- return this->read_2 (ACE_reinterpret_cast (CDR::UShort*, &x));
+ return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_ushort (CDR::UShort &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_ushort (ACE_CDR::UShort &x)
{
- return this->read_2 (ACE_reinterpret_cast (CDR::UShort*, &x));
+ return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_long (CDR::Long &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_long (ACE_CDR::Long &x)
{
- return this->read_4 (ACE_reinterpret_cast (CDR::ULong*, &x));
+ return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_ulong (CDR::ULong &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_ulong (ACE_CDR::ULong &x)
{
- return this->read_4 (ACE_reinterpret_cast (CDR::ULong*, &x));
+ return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_longlong (CDR::LongLong &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_longlong (ACE_CDR::LongLong &x)
{
- return this->read_8 (ACE_reinterpret_cast (CDR::ULongLong*, &x));
+ return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_ulonglong (CDR::ULongLong &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_ulonglong (ACE_CDR::ULongLong &x)
{
- return this->read_8 (ACE_reinterpret_cast (CDR::ULongLong*,&x));
+ return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_float (CDR::Float &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_float (ACE_CDR::Float &x)
{
- return this->read_4 (ACE_reinterpret_cast (CDR::ULong*, &x));
+ return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_double (CDR::Double &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_double (ACE_CDR::Double &x)
{
- return this->read_8 (ACE_reinterpret_cast (CDR::ULongLong*, &x));
+ return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*, &x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_longdouble (CDR::LongDouble &x)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_longdouble (ACE_CDR::LongDouble &x)
{
- return this->read_16 (ACE_reinterpret_cast (CDR::LongDouble*,&x));
+ return this->read_16 (ACE_reinterpret_cast (ACE_CDR::LongDouble*,&x));
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_char_array (CDR::Char* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_char_array (ACE_CDR::Char* x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::OCTET_SIZE,
- CDR::OCTET_ALIGN,
+ ACE_CDR::OCTET_SIZE,
+ ACE_CDR::OCTET_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_wchar_array (CDR::WChar* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_wchar_array (ACE_CDR::WChar* x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::SHORT_SIZE,
- CDR::SHORT_ALIGN,
+ ACE_CDR::SHORT_SIZE,
+ ACE_CDR::SHORT_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_octet_array (CDR::Octet* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_octet_array (ACE_CDR::Octet* x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::OCTET_SIZE,
- CDR::OCTET_ALIGN,
+ ACE_CDR::OCTET_SIZE,
+ ACE_CDR::OCTET_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_short_array (CDR::Short *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_short_array (ACE_CDR::Short *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::SHORT_SIZE,
- CDR::SHORT_ALIGN,
+ ACE_CDR::SHORT_SIZE,
+ ACE_CDR::SHORT_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_ushort_array (CDR::UShort *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_ushort_array (ACE_CDR::UShort *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::SHORT_SIZE,
- CDR::SHORT_ALIGN,
+ ACE_CDR::SHORT_SIZE,
+ ACE_CDR::SHORT_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_long_array (CDR::Long *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_long_array (ACE_CDR::Long *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONG_SIZE,
- CDR::LONG_ALIGN,
+ ACE_CDR::LONG_SIZE,
+ ACE_CDR::LONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_ulong_array (CDR::ULong *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_ulong_array (ACE_CDR::ULong *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONG_SIZE,
- CDR::LONG_ALIGN,
+ ACE_CDR::LONG_SIZE,
+ ACE_CDR::LONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_longlong_array (CDR::LongLong *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_longlong_array (ACE_CDR::LongLong *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_ulonglong_array (CDR::ULongLong *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_ulonglong_array (ACE_CDR::ULongLong *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_float_array (CDR::Float *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_float_array (ACE_CDR::Float *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONG_SIZE,
- CDR::LONG_ALIGN,
+ ACE_CDR::LONG_SIZE,
+ ACE_CDR::LONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_double_array (CDR::Double *x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_double_array (ACE_CDR::Double *x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONGLONG_SIZE,
- CDR::LONGLONG_ALIGN,
+ ACE_CDR::LONGLONG_SIZE,
+ ACE_CDR::LONGLONG_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
-ACE_InputCDR::read_longdouble_array (CDR::LongDouble* x,
- CDR::ULong length)
+ACE_INLINE ACE_CDR::Boolean
+ACE_InputCDR::read_longdouble_array (ACE_CDR::LongDouble* x,
+ ACE_CDR::ULong length)
{
return this->read_array (x,
- CDR::LONGDOUBLE_SIZE,
- CDR::LONGDOUBLE_ALIGN,
+ ACE_CDR::LONGDOUBLE_SIZE,
+ ACE_CDR::LONGDOUBLE_ALIGN,
length);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_char (void)
{
- CDR::Char x;
- return this->read_1 (ACE_reinterpret_cast (CDR::Octet*,&x));
+ ACE_CDR::Char x;
+ return this->read_1 (ACE_reinterpret_cast (ACE_CDR::Octet*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_wchar (void)
{
- CDR::WChar x;
- return this->read_2 (ACE_reinterpret_cast (CDR::UShort*,&x));
+ ACE_CDR::WChar x;
+ return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_octet (void)
{
- CDR::Octet x;
+ ACE_CDR::Octet x;
return this->read_1 (&x);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_boolean (void)
{
- CDR::Octet tmp;
+ ACE_CDR::Octet tmp;
this->read_octet (tmp);
return this->good_bit_;
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_short (void)
{
- CDR::Short x;
- return this->read_2 (ACE_reinterpret_cast (CDR::UShort*,&x));
+ ACE_CDR::Short x;
+ return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_ushort (void)
{
- CDR::UShort x;
- return this->read_2 (ACE_reinterpret_cast (CDR::UShort*,&x));
+ ACE_CDR::UShort x;
+ return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_long (void)
{
- CDR::Long x;
- return this->read_4 (ACE_reinterpret_cast (CDR::ULong*,&x));
+ ACE_CDR::Long x;
+ return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_ulong (void)
{
- CDR::ULong x;
- return this->read_4 (ACE_reinterpret_cast (CDR::ULong*,&x));
+ ACE_CDR::ULong x;
+ return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_longlong (void)
{
- CDR::LongLong x;
- return this->read_8 (ACE_reinterpret_cast (CDR::ULongLong*,&x));
+ ACE_CDR::LongLong x;
+ return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_ulonglong (void)
{
- CDR::ULongLong x;
- return this->read_8 (ACE_reinterpret_cast (CDR::ULongLong*,&x));
+ ACE_CDR::ULongLong x;
+ return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_float (void)
{
float x;
- return this->read_4 (ACE_reinterpret_cast (CDR::ULong*,&x));
+ return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_double (void)
{
double x;
- return this->read_8 (ACE_reinterpret_cast (CDR::ULongLong*,&x));
+ return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::skip_longdouble (void)
{
- CDR::LongDouble x;
- return this->read_16 (ACE_reinterpret_cast (CDR::LongDouble*,&x));
+ ACE_CDR::LongDouble x;
+ return this->read_16 (ACE_reinterpret_cast (ACE_CDR::LongDouble*,&x));
}
ACE_INLINE char*
@@ -778,7 +778,7 @@ ACE_InputCDR::adjust (size_t size,
ACE_INLINE int
ACE_InputCDR::adjust (size_t size,
- char*& buf)
+ char*& buf)
{
return this->adjust (size, size, buf);
}
@@ -803,77 +803,77 @@ ACE_InputCDR::good_bit (void) const
// ****************************************************************
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::Short x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::Short x)
{
os.write_short (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::UShort x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::UShort x)
{
os.write_ushort (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::Long x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::Long x)
{
os.write_long (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::ULong x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::ULong x)
{
os.write_ulong (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::LongLong x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::LongLong x)
{
os.write_longlong (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::ULongLong x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::ULongLong x)
{
os.write_ulonglong (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::LongDouble x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::LongDouble x)
{
os.write_longdouble (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::Float x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::Float x)
{
os.write_float (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, CDR::Double x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, ACE_CDR::Double x)
{
os.write_double (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator<< (ACE_OutputCDR &os, const CDR::Char *x)
+ACE_INLINE ACE_CDR::Boolean
+operator<< (ACE_OutputCDR &os, const ACE_CDR::Char *x)
{
os.write_string (x);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_OutputCDR &os, const ACE_CString &x)
{
os.write_string (x);
@@ -881,35 +881,35 @@ operator<< (ACE_OutputCDR &os, const ACE_CString &x)
}
// The following use the helper classes
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_boolean x)
{
os.write_boolean (x.val_);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_char x)
{
os.write_char (x.val_);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wchar x)
{
os.write_wchar (x.val_);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_octet x)
{
os.write_octet (x.val_);
return os.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_string x)
{
os.write_string (x.bound_, x.val_);
@@ -918,77 +918,77 @@ operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_string x)
// ****************************************************************
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR &is, CDR::Short &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR &is, ACE_CDR::Short &x)
{
is.read_short (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR &is, CDR::UShort &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR &is, ACE_CDR::UShort &x)
{
is.read_ushort (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>>(ACE_InputCDR &is, CDR::Long &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>>(ACE_InputCDR &is, ACE_CDR::Long &x)
{
is.read_long (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR &is, CDR::ULong &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR &is, ACE_CDR::ULong &x)
{
is.read_ulong (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR& is, CDR::LongLong &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR& is, ACE_CDR::LongLong &x)
{
is.read_longlong (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR& is, CDR::ULongLong &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR& is, ACE_CDR::ULongLong &x)
{
is.read_ulonglong (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR& is, CDR::LongDouble &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR& is, ACE_CDR::LongDouble &x)
{
is.read_longdouble (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR &is, CDR::Float &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR &is, ACE_CDR::Float &x)
{
is.read_float (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR &is, CDR::Double &x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR &is, ACE_CDR::Double &x)
{
is.read_double (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
-operator>> (ACE_InputCDR &is, CDR::Char *&x)
+ACE_INLINE ACE_CDR::Boolean
+operator>> (ACE_InputCDR &is, ACE_CDR::Char *&x)
{
is.read_string (x);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator>> (ACE_InputCDR &is, ACE_CString &x)
{
is.read_string (x);
@@ -996,35 +996,35 @@ operator>> (ACE_InputCDR &is, ACE_CString &x)
}
// The following use the helper classes
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator>> (ACE_InputCDR &is, ACE_InputCDR::to_boolean x)
{
is.read_boolean (x.ref_);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator>> (ACE_InputCDR &is, ACE_InputCDR::to_char x)
{
is.read_char (x.ref_);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator>> (ACE_InputCDR &is, ACE_InputCDR::to_wchar x)
{
is.read_wchar (x.ref_);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator>> (ACE_InputCDR &is, ACE_InputCDR::to_octet x)
{
is.read_octet (x.ref_);
return is.good_bit ();
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
operator>> (ACE_InputCDR &is, ACE_InputCDR::to_string x)
{
is.read_string (x.val_);
@@ -1038,112 +1038,112 @@ operator>> (ACE_InputCDR &is, ACE_InputCDR::to_string x)
// methods of the ACE_InputCDR class
// ***************************************************************************
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_boolean (ACE_InputCDR &stream)
{
- CDR::Boolean x;
+ ACE_CDR::Boolean x;
return (stream.read_boolean (x) ? this->write_boolean (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_char (ACE_InputCDR &stream)
{
- CDR::Char x;
+ ACE_CDR::Char x;
return (stream.read_char (x) ? this->write_char (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_wchar (ACE_InputCDR &stream)
{
- CDR::WChar x;
+ ACE_CDR::WChar x;
return (stream.read_wchar (x) ? this->write_wchar (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_octet (ACE_InputCDR &stream)
{
- CDR::Octet x;
+ ACE_CDR::Octet x;
return (stream.read_octet (x) ? this->write_octet (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_short (ACE_InputCDR &stream)
{
- CDR::Short x;
+ ACE_CDR::Short x;
return (stream.read_short (x) ? this->write_short (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_ushort (ACE_InputCDR &stream)
{
- CDR::UShort x;
+ ACE_CDR::UShort x;
return (stream.read_ushort (x) ? this->write_ushort (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_long (ACE_InputCDR &stream)
{
- CDR::Long x;
+ ACE_CDR::Long x;
return (stream.read_long (x) ? this->write_long (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_ulong (ACE_InputCDR &stream)
{
- CDR::ULong x;
+ ACE_CDR::ULong x;
return (stream.read_ulong (x) ? this->write_ulong (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_longlong (ACE_InputCDR &stream)
{
- CDR::LongLong x;
+ ACE_CDR::LongLong x;
return (stream.read_longlong (x) ? this->write_longlong (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_ulonglong (ACE_InputCDR &stream)
{
- CDR::ULongLong x;
+ ACE_CDR::ULongLong x;
return (stream.read_ulonglong (x) ? this->write_ulonglong (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_float (ACE_InputCDR &stream)
{
- CDR::Float x;
+ ACE_CDR::Float x;
return (stream.read_float (x) ? this->write_float (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_double (ACE_InputCDR &stream)
{
- CDR::Double x;
+ ACE_CDR::Double x;
return (stream.read_double (x) ? this->write_double (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_longdouble (ACE_InputCDR &stream)
{
- CDR::LongDouble x;
+ ACE_CDR::LongDouble x;
return (stream.read_longdouble (x) ? this->write_longdouble (x) : 0);
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_string (ACE_InputCDR &stream)
{
- CDR::Char *x;
- CDR::Boolean flag =
+ ACE_CDR::Char *x;
+ ACE_CDR::Boolean flag =
(stream.read_string (x) ? this->write_string (x) : 0);
delete [] x;
return flag;
}
-ACE_INLINE CDR::Boolean
+ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::append_wstring (ACE_InputCDR &stream)
{
- CDR::WChar *x;
- CDR::Boolean flag =
+ ACE_CDR::WChar *x;
+ ACE_CDR::Boolean flag =
(stream.read_wstring (x) ? this->write_wstring (x) : 0);
delete [] x;
return flag;
@@ -1170,4 +1170,3 @@ ACE_InputCDR::align_read_ptr (size_t alignment)
this->good_bit_ = 0;
return -1;
}
-