summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2006-05-25 03:37:25 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2006-05-25 03:37:25 +0000
commitb0a8c1b8a864db64561a5816bf551004fa63aaaf (patch)
tree823edae21d7eabc40e1a42b273d38ba5b6374de0 /TAO/tao
parentf3992f40685d1c0aa977cbf87488b44d4a0f6b39 (diff)
downloadATCD-b0a8c1b8a864db64561a5816bf551004fa63aaaf.tar.gz
ChangeLog tag: Thu May 25 03:27:44 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/OctetSeqC.cpp20
-rw-r--r--TAO/tao/OctetSeqC.h8
-rw-r--r--TAO/tao/Unbounded_Octet_Sequence_T.h79
-rw-r--r--TAO/tao/diffs/OctetSeq.diff53
4 files changed, 39 insertions, 121 deletions
diff --git a/TAO/tao/OctetSeqC.cpp b/TAO/tao/OctetSeqC.cpp
index b89a39ff914..93c712762cb 100644
--- a/TAO/tao/OctetSeqC.cpp
+++ b/TAO/tao/OctetSeqC.cpp
@@ -119,26 +119,6 @@ CORBA::Boolean operator>> (
return TAO::demarshal_sequence(strm, _tao_sequence);
}
-#if (TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE)
-
-bool
-operator==(const CORBA::OctetSeq &lhs, const CORBA::OctetSeq &rhs)
-{
- return ::operator==
- (static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(lhs),
- static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(rhs));
-}
-
-bool
-operator!=(const CORBA::OctetSeq &lhs, const CORBA::OctetSeq &rhs)
-{
- return !::operator==
- (static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(lhs),
- static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(rhs));
-}
-
-#endif /* TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE */
-
#endif /* _TAO_CDR_OP_CORBA_OctetSeq_CPP_ */
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/OctetSeqC.h b/TAO/tao/OctetSeqC.h
index e617349f338..39f1601562b 100644
--- a/TAO/tao/OctetSeqC.h
+++ b/TAO/tao/OctetSeqC.h
@@ -164,14 +164,6 @@ TAO_Export CORBA::Boolean operator>> (
// TAO_IDL - Generated from
// be\be_codegen.cpp:1062
-// Added to handle the namespace resolution.
-#if (TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE)
-
-TAO_Export bool operator== (const CORBA::OctetSeq &, const CORBA::OctetSeq &);
-TAO_Export bool operator!= (const CORBA::OctetSeq &, const CORBA::OctetSeq &);
-
-#endif /* TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE */
-
TAO_END_VERSIONED_NAMESPACE_DECL
#if defined(_MSC_VER)
diff --git a/TAO/tao/Unbounded_Octet_Sequence_T.h b/TAO/tao/Unbounded_Octet_Sequence_T.h
index 01954a71198..2c9ae1a86c5 100644
--- a/TAO/tao/Unbounded_Octet_Sequence_T.h
+++ b/TAO/tao/Unbounded_Octet_Sequence_T.h
@@ -207,6 +207,35 @@ public:
return tmp.buffer_;
}
+
+ // moved inside the class to resolve namespace lookup issues.
+ // This is a replacement for the commented block below.
+
+ inline bool operator== (const unbounded_value_sequence<CORBA::Octet> & rhs) const
+{
+ ::CORBA::ULong const rlen = rhs.length ();
+
+ if (rlen != this->length ())
+ {
+ return false;
+ }
+
+ for (::CORBA::ULong i = 0; i < rlen; ++i)
+ {
+ if (rhs[i] != this->buffer_[i])
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+ inline bool operator!= (const unbounded_value_sequence<CORBA::Octet> & rhs) const
+{
+ return !this->operator==(rhs);
+}
+
inline void swap(unbounded_value_sequence & rhs) throw() {
std::swap (mb_, rhs.mb_);
std::swap (maximum_, rhs.maximum_);
@@ -296,6 +325,11 @@ TAO_END_VERSIONED_NAMESPACE_DECL
#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
+#if 0
+// This doesn't work for an unexplained reason. At least
+// PortableServer::Active_Object_Map.cpp fails to compile.
+// But I'm keeping this in for the moment so that it may be
+// resurrected if need be
inline
bool
operator== (const TAO_VERSIONED_NAMESPACE_NAME::TAO::unbounded_value_sequence<CORBA::Octet> & lhs,
@@ -326,49 +360,6 @@ operator!= (const TAO_VERSIONED_NAMESPACE_NAME::TAO::unbounded_value_sequence<CO
{
return !(lhs == rhs);
}
-
-#if defined (ACE_HAS_VERSIONED_NAMESPACE)
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
-inline
-bool
-operator== (const TAO_VERSIONED_NAMESPACE_NAME::TAO::unbounded_value_sequence<CORBA::Octet> & lhs,
- const TAO_VERSIONED_NAMESPACE_NAME::TAO::unbounded_value_sequence<CORBA::Octet> & rhs)
-{
- return ::operator==(lhs,rhs);
-}
-
-inline
-bool
-operator!= (const TAO_VERSIONED_NAMESPACE_NAME::TAO::unbounded_value_sequence<CORBA::Octet> & lhs,
- const TAO_VERSIONED_NAMESPACE_NAME::TAO::unbounded_value_sequence<CORBA::Octet> & rhs)
-{
- return ::operator!=(lhs,rhs);
-}
-
-ACE_END_VERSIONED_NAMESPACE_DECL
-#endif /* ACE_HAS_VERSIONED_NAMESPACE */
-
-#if defined (TAO_HAS_VERSIONED_NAMESPACE)
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-inline
-bool
-operator== (const TAO::unbounded_value_sequence<CORBA::Octet> & lhs,
- const TAO::unbounded_value_sequence<CORBA::Octet> & rhs)
-{
- return ::operator==(lhs,rhs);
-}
-
-inline
-bool
-operator!= (const TAO::unbounded_value_sequence<CORBA::Octet> & lhs,
- const TAO::unbounded_value_sequence<CORBA::Octet> & rhs)
-{
- return ::operator!=(lhs,rhs);
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-#endif /* TAO_HAS_VERSIONED_NAMESPACE */
+#endif /* 0 */
#endif // guard_unbounded_octet_sequence_hpp
diff --git a/TAO/tao/diffs/OctetSeq.diff b/TAO/tao/diffs/OctetSeq.diff
index 1bc77e5a3d4..fb15f742a61 100644
--- a/TAO/tao/diffs/OctetSeq.diff
+++ b/TAO/tao/diffs/OctetSeq.diff
@@ -1,35 +1,6 @@
---- orig/OctetSeqC.cpp 2006-05-16 17:15:30.000000000 -0500
-+++ OctetSeqC.cpp 2006-05-16 16:53:30.000000000 -0500
-@@ -119,6 +119,26 @@
- return TAO::demarshal_sequence(strm, _tao_sequence);
- }
-
-+#if (TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE)
-+
-+CORBA::Boolean
-+operator==(const CORBA::OctetSeq &lhs, const CORBA::OctetSeq &rhs)
-+{
-+ return ::operator==
-+ (static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(lhs),
-+ static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(rhs));
-+}
-+
-+CORBA::Boolean
-+operator!=(const CORBA::OctetSeq &lhs, const CORBA::OctetSeq &rhs)
-+{
-+ return !::operator==
-+ (static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(lhs),
-+ static_cast<const TAO::unbounded_value_sequence< CORBA::Octet > &>(rhs));
-+}
-+
-+#endif /* TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE */
-+
- #endif /* _TAO_CDR_OP_CORBA_OctetSeq_CPP_ */
-
- TAO_END_VERSIONED_NAMESPACE_DECL
---- orig/OctetSeqC.h 2006-05-16 17:19:31.000000000 -0500
-+++ OctetSeqC.h 2006-05-16 17:23:31.000000000 -0500
-@@ -131,6 +131,19 @@
+--- orig/OctetSeqC.h 2005-04-08 10:17:34.108726400 +0200
++++ OctetSeqC.h 2005-04-08 10:17:41.829828800 +0200
+@@ -141,6 +141,18 @@
{
}
@@ -45,22 +16,6 @@
+ template class TAO_Export TAO::unbounded_value_sequence<CORBA::OctetSeq>;
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */
+
-+
- // TAO_IDL - Generated from
- // be\be_visitor_sequence/cdr_op_ch.cpp:71
-
-@@ -151,6 +164,14 @@
// TAO_IDL - Generated from
- // be\be_codegen.cpp:1062
-
-+// Added to handle the namespace resolution.
-+#if (TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE)
-+
-+TAO_Export bool operator== (const CORBA::OctetSeq &, const CORBA::OctetSeq &);
-+TAO_Export bool operator!= (const CORBA::OctetSeq &, const CORBA::OctetSeq &);
-+
-+#endif /* TAO_HAS_VERSIONED_NAMESPACE || ACE_HAS_VERSIONED_NAMESPACE */
-+
- TAO_END_VERSIONED_NAMESPACE_DECL
+ // be\be_visitor_sequence/any_op_ch.cpp:52
- #if defined(_MSC_VER)