diff options
Diffstat (limited to 'TAO/tao/AnyTypeCode/AnySeqC.cpp')
-rw-r--r-- | TAO/tao/AnyTypeCode/AnySeqC.cpp | 66 |
1 files changed, 11 insertions, 55 deletions
diff --git a/TAO/tao/AnyTypeCode/AnySeqC.cpp b/TAO/tao/AnyTypeCode/AnySeqC.cpp index f04c69e6e47..8100e8ddadf 100644 --- a/TAO/tao/AnyTypeCode/AnySeqC.cpp +++ b/TAO/tao/AnyTypeCode/AnySeqC.cpp @@ -29,7 +29,7 @@ // be\be_codegen.cpp:291 -#include "AnySeqC.h" +#include "tao/AnyTypeCode/AnySeqC.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_ANYSEQ_CS_) @@ -57,7 +59,7 @@ CORBA::AnySeq::AnySeq (void) CORBA::AnySeq::AnySeq ( CORBA::ULong max ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::Any > (max) @@ -69,7 +71,7 @@ CORBA::AnySeq::AnySeq ( CORBA::Any * buffer, CORBA::Boolean release ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::Any > (max, length, buffer, release) @@ -78,7 +80,7 @@ CORBA::AnySeq::AnySeq ( CORBA::AnySeq::AnySeq ( const AnySeq &seq ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::Any > (seq) @@ -109,22 +111,7 @@ CORBA::Boolean operator<< ( const CORBA::AnySeq &_tao_sequence ) { - const CORBA::ULong _tao_seq_len = _tao_sequence.length (); - - if (strm << _tao_seq_len) - { - // Encode all elements. - CORBA::Boolean _tao_marshal_flag = true; - - for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i) - { - _tao_marshal_flag = (strm << _tao_sequence[i]); - } - - return _tao_marshal_flag; - } - - return false; + return TAO::marshal_sequence(strm, _tao_sequence); } CORBA::Boolean operator>> ( @@ -132,40 +119,9 @@ CORBA::Boolean operator>> ( CORBA::AnySeq &_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. - CORBA::Boolean _tao_marshal_flag = true; - - for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i) - { - _tao_marshal_flag = (strm >> _tao_sequence[i]); - } - - return _tao_marshal_flag; - - } - - return false; + return TAO::demarshal_sequence(strm, _tao_sequence); } #endif /* _TAO_CDR_OP_CORBA_AnySeq_CPP_ */ + +TAO_END_VERSIONED_NAMESPACE_DECL |