summaryrefslogtreecommitdiff
path: root/TAO/tao/Object_KeyC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Object_KeyC.cpp')
-rw-r--r--TAO/tao/Object_KeyC.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/TAO/tao/Object_KeyC.cpp b/TAO/tao/Object_KeyC.cpp
index 7c673f39ba0..1c6d6c3a8d1 100644
--- a/TAO/tao/Object_KeyC.cpp
+++ b/TAO/tao/Object_KeyC.cpp
@@ -26,7 +26,7 @@
// http://www.cs.wustl.edu/~schmidt/TAO.html
// TAO_IDL - Generated from
-// be\be_codegen.cpp:323
+// be\be_codegen.cpp:302
#include "Object_KeyC.h"
@@ -38,7 +38,7 @@
#endif /* __BORLANDC__ */
#if !defined (__ACE_INLINE__)
-#include "Object_KeyC.i"
+#include "Object_KeyC.inl"
#endif /* !defined INLINE */
#include "ace/ACE.h"
@@ -46,7 +46,7 @@
#include "ace/os_include/os_ctype.h"
// TAO_IDL - Generated from
-// be\be_visitor_arg_traits.cpp:64
+// be\be_visitor_arg_traits.cpp:65
// Arg traits specializations.
namespace TAO
@@ -54,7 +54,7 @@ namespace TAO
}
-// TAO_IDL - Generated from
+// TAO_IDL - Generated from
// be\be_visitor_sequence/sequence_cs.cpp:65
#if !defined (_TAO_OBJECTKEY_CS_)
@@ -175,7 +175,7 @@ TAO::ObjectKey::decode_string_to_sequence (TAO_Unbounded_Sequence<CORBA::Octet>
cp < eos && i < seq.length ();
++i)
{
- if (*cp == '%')
+ if (*cp == '%' || *cp == '\\')
{
// This is an escaped non-printable,
// so we decode the hex values into
@@ -224,7 +224,7 @@ TAO::ObjectKey::demarshal_key (TAO::ObjectKey &key,
ACE_Message_Block::DONT_DELETE))
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
- ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &key);
+ static_cast <TAO_Unbounded_Sequence<CORBA::Octet>*> (&key);
oseq->replace (_tao_seq_len, strm.start ());
oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len);
strm.skip_bytes (_tao_seq_len);
@@ -253,28 +253,28 @@ CORBA::Boolean operator<< (
const TAO::ObjectKey &_tao_sequence
)
{
- CORBA::ULong _tao_seq_len = _tao_sequence.length ();
-
+ const CORBA::ULong _tao_seq_len = _tao_sequence.length ();
+
if (strm << _tao_seq_len)
{
// Encode all elements.
-
+
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
{
- TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
- ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (TAO::ObjectKey *)&_tao_sequence);
- if (oseq->mb ())
- return strm.write_octet_array_mb (oseq->mb ());
+ TAO_Unbounded_Sequence<CORBA::Octet> *_tao_octet_seq =
+ static_cast<TAO_Unbounded_Sequence<CORBA::Octet> *> (const_cast<TAO::ObjectKey *> (&_tao_sequence));
+ if (_tao_octet_seq->mb ())
+ return strm.write_octet_array_mb (_tao_octet_seq->mb ());
else
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
}
-
+
#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-
+
#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
-
+
return 0;
}
@@ -284,7 +284,7 @@ CORBA::Boolean operator>> (
)
{
CORBA::ULong _tao_seq_len;
-
+
if (strm >> _tao_seq_len)
{
// Add a check to the length of the sequence
@@ -294,18 +294,18 @@ CORBA::Boolean operator>> (
{
return 0;
}
-
+
// Set the length of the sequence.
_tao_sequence.length (_tao_seq_len);
-
+
// If length is 0 we return true.
- if (0 >= _tao_seq_len)
+ if (0 >= _tao_seq_len)
{
return 1;
}
-
+
// Retrieve all the elements.
-
+
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (ACE_BIT_DISABLED (strm.start ()->flags (),
ACE_Message_Block::DONT_DELETE))
@@ -315,8 +315,8 @@ CORBA::Boolean operator>> (
strm.orb_core ()->resource_factory ()->
input_cdr_allocator_type_locked () == 1)
{
- TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
- ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &_tao_sequence);
+ TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
+ static_cast<TAO_Unbounded_Sequence<CORBA::Octet> *> (&_tao_sequence);
oseq->replace (_tao_seq_len, strm.start ());
oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len);
strm.skip_bytes (_tao_seq_len);
@@ -326,18 +326,18 @@ CORBA::Boolean operator>> (
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-
+
#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
-
+
}
-
+
return 0;
}
#endif /* _TAO_CDR_OP_TAO_ObjectKey_CPP_ */
// TAO_IDL - Generated from
-// be\be_visitor_root/root.cpp:1633
+// be\be_visitor_root/root.cpp:1629
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
@@ -381,4 +381,4 @@ CORBA::Boolean operator>> (
CORBA::Octet \
>
-#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */