diff options
author | john_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-04-28 03:50:28 +0000 |
---|---|---|
committer | john_c <john_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-04-28 03:50:28 +0000 |
commit | 88556d568eb0a06bf8af2ddefacbc1ad5f00401e (patch) | |
tree | 72f4a0e33b9dd26d1783ff005d67494bfb79a9de /TAO/tao/Bounded_Sequence_CDR_T.h | |
parent | 317d8c1ce78436f0107f056418c0c5f5b4231069 (diff) | |
download | ATCD-88556d568eb0a06bf8af2ddefacbc1ad5f00401e.tar.gz |
4_27_06 branch merge in and compile error fixedoci_dave_wchar_refactor_branch
Diffstat (limited to 'TAO/tao/Bounded_Sequence_CDR_T.h')
-rw-r--r-- | TAO/tao/Bounded_Sequence_CDR_T.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/TAO/tao/Bounded_Sequence_CDR_T.h b/TAO/tao/Bounded_Sequence_CDR_T.h index 7213b9547f6..c0cbbdb5a01 100644 --- a/TAO/tao/Bounded_Sequence_CDR_T.h +++ b/TAO/tao/Bounded_Sequence_CDR_T.h @@ -12,6 +12,7 @@ */ #include "tao/orbconf.h" +#include "tao/SystemException.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -328,7 +329,9 @@ namespace TAO { namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Short, MAX> & source) { - const ::CORBA::ULong length = source.length (); + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); + ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; } @@ -337,7 +340,9 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Long, MAX> & source) { - const ::CORBA::ULong length = source.length (); + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); + ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; } @@ -346,6 +351,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::ULong, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -355,6 +362,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::UShort, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -364,6 +373,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Octet, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -373,6 +384,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Char, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -383,6 +396,8 @@ namespace TAO { # if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::WChar, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -393,6 +408,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Float, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -402,6 +419,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Double, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -411,6 +430,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::ULongLong, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -420,6 +441,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::LongDouble, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -429,6 +452,8 @@ namespace TAO { template <typename stream, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <CORBA::Boolean, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -438,6 +463,8 @@ namespace TAO { template <typename stream, typename value_t, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_value_sequence <value_t, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -452,6 +479,8 @@ namespace TAO { template <typename stream, typename charT, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::details::bounded_basic_string_sequence <charT, MAX> & source) { + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; @@ -467,6 +496,8 @@ namespace TAO { template <typename stream, typename object_t, typename object_t_var, CORBA::ULong MAX> bool marshal_sequence(stream & strm, const TAO::bounded_object_reference_sequence<object_t, object_t_var, MAX> & source) { typedef typename TAO::bounded_object_reference_sequence<object_t, object_t_var, MAX>::object_type object_type; + if (0 == &source) + ACE_THROW_RETURN (::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE), false); ::CORBA::ULong const length = source.length (); if (!(strm << length)) { return false; |