diff options
Diffstat (limited to 'TAO/tao/LongDoubleSeqC.cpp')
-rw-r--r-- | TAO/tao/LongDoubleSeqC.cpp | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/TAO/tao/LongDoubleSeqC.cpp b/TAO/tao/LongDoubleSeqC.cpp index 0e1dd30f277..44d7546418e 100644 --- a/TAO/tao/LongDoubleSeqC.cpp +++ b/TAO/tao/LongDoubleSeqC.cpp @@ -29,7 +29,7 @@ // be\be_codegen.cpp:291 -#include "LongDoubleSeqC.h" +#include "tao/LongDoubleSeqC.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_LONGDOUBLESEQ_CS_) @@ -57,7 +59,7 @@ CORBA::LongDoubleSeq::LongDoubleSeq (void) CORBA::LongDoubleSeq::LongDoubleSeq ( CORBA::ULong max ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::LongDouble > (max) @@ -69,7 +71,7 @@ CORBA::LongDoubleSeq::LongDoubleSeq ( CORBA::LongDouble * buffer, CORBA::Boolean release ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::LongDouble > (max, length, buffer, release) @@ -78,7 +80,7 @@ CORBA::LongDoubleSeq::LongDoubleSeq ( CORBA::LongDoubleSeq::LongDoubleSeq ( const LongDoubleSeq &seq ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::LongDouble > (seq) @@ -109,15 +111,7 @@ CORBA::Boolean operator<< ( const CORBA::LongDoubleSeq &_tao_sequence ) { - const CORBA::ULong _tao_seq_len = _tao_sequence.length (); - - if (strm << _tao_seq_len) - { - // Encode all elements. - return strm.write_longdouble_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::LongDoubleSeq &_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_longdouble_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - - } - - return false; + return TAO::demarshal_sequence(strm, _tao_sequence); } #endif /* _TAO_CDR_OP_CORBA_LongDoubleSeq_CPP_ */ + +TAO_END_VERSIONED_NAMESPACE_DECL |