summaryrefslogtreecommitdiff
path: root/TAO/tao/Unbounded_Sequence_CDR_T.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Unbounded_Sequence_CDR_T.h')
-rw-r--r--TAO/tao/Unbounded_Sequence_CDR_T.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/TAO/tao/Unbounded_Sequence_CDR_T.h b/TAO/tao/Unbounded_Sequence_CDR_T.h
index 5c5d2cc982e..d942e07e9f3 100644
--- a/TAO/tao/Unbounded_Sequence_CDR_T.h
+++ b/TAO/tao/Unbounded_Sequence_CDR_T.h
@@ -12,6 +12,7 @@
*/
#include "tao/orbconf.h"
+#include "tao/SystemException.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -363,6 +364,8 @@ namespace TAO {
namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Short> & 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;
@@ -372,6 +375,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Long> & 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;
@@ -381,6 +386,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::ULong> & 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;
@@ -390,6 +397,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::UShort> & 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;
@@ -400,6 +409,8 @@ namespace TAO {
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Octet> & 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;
@@ -412,6 +423,8 @@ namespace TAO {
#else
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Octet> & 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;
@@ -422,6 +435,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Char> & 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;
@@ -432,6 +447,8 @@ namespace TAO {
# if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::WChar> & 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;
@@ -442,6 +459,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Float> & 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;
@@ -451,6 +470,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Double> & 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;
@@ -460,6 +481,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::ULongLong> & 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;
@@ -469,6 +492,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::LongDouble> & 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;
@@ -478,6 +503,8 @@ namespace TAO {
template <typename stream>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <CORBA::Boolean> & 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;
@@ -487,6 +514,8 @@ namespace TAO {
template <typename stream, typename value_t>
bool marshal_sequence(stream & strm, const TAO::unbounded_value_sequence <value_t> & 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;
@@ -501,6 +530,8 @@ namespace TAO {
template <typename stream, typename charT>
bool marshal_sequence(stream & strm, const TAO::details::unbounded_basic_string_sequence <charT> & 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;
@@ -516,6 +547,8 @@ namespace TAO {
template <typename stream, typename object_t, typename object_t_var>
bool marshal_sequence(stream & strm, const TAO::unbounded_object_reference_sequence<object_t, object_t_var> & source) {
typedef typename TAO::unbounded_object_reference_sequence<object_t, object_t_var>::object_type objec_t;
+ 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;