diff options
Diffstat (limited to 'TAO/tao/LongSeqC.cpp')
-rw-r--r-- | TAO/tao/LongSeqC.cpp | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/TAO/tao/LongSeqC.cpp b/TAO/tao/LongSeqC.cpp index fcb07e3e606..3427b670d5a 100644 --- a/TAO/tao/LongSeqC.cpp +++ b/TAO/tao/LongSeqC.cpp @@ -29,7 +29,7 @@ // be\be_codegen.cpp:291 -#include "LongSeqC.h" +#include "tao/LongSeqC.h" #include "tao/CDR.h" #if defined (__BORLANDC__) @@ -39,13 +39,15 @@ // TAO_IDL - Generated from // be\be_visitor_arg_traits.cpp:70 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + // Arg traits specializations. namespace TAO { } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_sequence/sequence_cs.cpp:65 #if !defined (_CORBA_LONGSEQ_CS_) @@ -57,7 +59,7 @@ CORBA::LongSeq::LongSeq (void) CORBA::LongSeq::LongSeq ( CORBA::ULong max ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::Long > (max) @@ -69,7 +71,7 @@ CORBA::LongSeq::LongSeq ( CORBA::Long * buffer, CORBA::Boolean release ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::Long > (max, length, buffer, release) @@ -78,7 +80,7 @@ CORBA::LongSeq::LongSeq ( CORBA::LongSeq::LongSeq ( const LongSeq &seq ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::Long > (seq) @@ -109,15 +111,7 @@ CORBA::Boolean operator<< ( const CORBA::LongSeq &_tao_sequence ) { - const CORBA::ULong _tao_seq_len = _tao_sequence.length (); - - if (strm << _tao_seq_len) - { - // Encode all elements. - return strm.write_long_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - } - - return false; + return TAO::marshal_sequence(strm, _tao_sequence); } CORBA::Boolean operator>> ( @@ -125,33 +119,9 @@ CORBA::Boolean operator>> ( CORBA::LongSeq &_tao_sequence ) { - CORBA::ULong _tao_seq_len; - - if (strm >> _tao_seq_len) - { - // Add a check to the length of the sequence - // to make sure it does not exceed the length - // of the stream. (See bug 58.) - if (_tao_seq_len > strm.length ()) - { - return false; - } - - // Set the length of the sequence. - _tao_sequence.length (_tao_seq_len); - - // If length is 0 we return true. - if (0 >= _tao_seq_len) - { - return true; - } - - // Retrieve all the elements. - return strm.read_long_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - - } - - return false; + return TAO::demarshal_sequence(strm, _tao_sequence); } #endif /* _TAO_CDR_OP_CORBA_LongSeq_CPP_ */ + +TAO_END_VERSIONED_NAMESPACE_DECL |