summaryrefslogtreecommitdiff
path: root/TAO/tao/CDR.i
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-20 05:11:47 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-20 05:11:47 +0000
commit2c408e080f8fb72e72fbbf43d529faff471011cd (patch)
treea352ed9f55d048f43cf0202c53c5c5716b54bf3f /TAO/tao/CDR.i
parentc55a1223e913c285cb16ed10e3dd4e9a93c9ce39 (diff)
downloadATCD-2c408e080f8fb72e72fbbf43d529faff471011cd.tar.gz
ChangeLogTag:Sat Jun 20 00:00:56 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/CDR.i')
-rw-r--r--TAO/tao/CDR.i84
1 files changed, 60 insertions, 24 deletions
diff --git a/TAO/tao/CDR.i b/TAO/tao/CDR.i
index d944cb700ef..f01c4c92c3c 100644
--- a/TAO/tao/CDR.i
+++ b/TAO/tao/CDR.i
@@ -614,12 +614,12 @@ TAO_InputCDR::rd_ptr (void)
// ****************************************************************
// TODO: Use the CORBA_* types when they become available.
-#if 0
#if defined (ACE_HAS_BOOL)
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Boolean x)
{
- cdr.write_boolean (x);
+ if (cdr.good_bit ())
+ cdr.write_boolean (x);
return cdr;
}
#endif /* ACE_HAS_BOOL */
@@ -627,70 +627,88 @@ operator<< (TAO_OutputCDR& cdr, CORBA::Boolean x)
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Octet x)
{
- cdr.write_octet (x);
+ if (cdr.good_bit ())
+ cdr.write_octet (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Short x)
{
- cdr.write_short (x);
+ if (cdr.good_bit ())
+ cdr.write_short (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::UShort x)
{
- cdr.write_short (x);
+ if (cdr.good_bit ())
+ cdr.write_short (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Long x)
{
- cdr.write_long (x);
+ if (cdr.good_bit ())
+ cdr.write_long (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::ULong x)
{
- cdr.write_long (x);
+ if (cdr.good_bit ())
+ cdr.write_long (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::LongLong x)
{
- cdr.write_longlong (x);
+ if (cdr.good_bit ())
+ cdr.write_longlong (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::ULongLong x)
{
- cdr.write_ulonglong (x);
+ if (cdr.good_bit ())
+ cdr.write_ulonglong (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Float x)
{
- cdr.write_float (x);
+ if (cdr.good_bit ())
+ cdr.write_float (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Double x)
{
- cdr.write_double (x);
+ if (cdr.good_bit ())
+ cdr.write_double (x);
return cdr;
}
ACE_INLINE TAO_OutputCDR&
operator<< (TAO_OutputCDR& cdr, CORBA::Char x)
{
- cdr.write_char (x);
+ if (cdr.good_bit ())
+ cdr.write_char (x);
+ return cdr;
+}
+
+ACE_INLINE TAO_OutputCDR&
+operator<< (TAO_OutputCDR& cdr, const CORBA::Char* x)
+{
+ if (cdr.good_bit ())
+ cdr.write_string (x);
return cdr;
}
@@ -698,7 +716,8 @@ operator<< (TAO_OutputCDR& cdr, CORBA::Char x)
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Boolean &x)
{
- cdr.read_boolean (x);
+ if (cdr.good_bit ())
+ cdr.read_boolean (x);
return cdr;
}
#endif /* ACE_HAS_BOOL */
@@ -706,73 +725,90 @@ operator>> (TAO_InputCDR& cdr, CORBA::Boolean &x)
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Octet &x)
{
- cdr.read_octet (x);
+ if (cdr.good_bit ())
+ cdr.read_octet (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Short &x)
{
- cdr.read_short (x);
+ if (cdr.good_bit ())
+ cdr.read_short (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::UShort &x)
{
- cdr.read_ushort (x);
+ if (cdr.good_bit ())
+ cdr.read_ushort (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Long &x)
{
- cdr.read_long (x);
+ if (cdr.good_bit ())
+ cdr.read_long (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::ULong &x)
{
- cdr.read_ulong (x);
+ if (cdr.good_bit ())
+ cdr.read_ulong (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::LongLong &x)
{
- cdr.read_longlong (x);
+ if (cdr.good_bit ())
+ cdr.read_longlong (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::ULongLong &x)
{
- cdr.read_ulonglong (x);
+ if (cdr.good_bit ())
+ cdr.read_ulonglong (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Float &x)
{
- cdr.read_float (x);
+ if (cdr.good_bit ())
+ cdr.read_float (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Double &x)
{
- cdr.read_double (x);
+ if (cdr.good_bit ())
+ cdr.read_double (x);
return cdr;
}
ACE_INLINE TAO_InputCDR&
operator>> (TAO_InputCDR& cdr, CORBA::Char &x)
{
- cdr.read_char (x);
+ if (cdr.good_bit ())
+ cdr.read_char (x);
+ return cdr;
+}
+
+ACE_INLINE TAO_InputCDR&
+operator>> (TAO_InputCDR& cdr, CORBA::Char*&x)
+{
+ if (cdr.good_bit ())
+ cdr.read_string (x);
return cdr;
}
-#endif /* 0 */
// ***************************************************************************
// We must define these methods here because they use the "read_*" inlined