diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-04-19 09:10:19 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-04-19 09:10:19 +0000 |
commit | 97a7e757bb6e4415487770614266e114b2f3c3b7 (patch) | |
tree | a681f895cf5a9b8a4f7ab6603ee4fd3a55ca0305 /TAO/tao/UShortSeqC.cpp | |
parent | e1e3a5aa98d33f78395624a2e57d173a8e738de6 (diff) | |
download | ATCD-97a7e757bb6e4415487770614266e114b2f3c3b7.tar.gz |
ChangeLogTag: Wed Apr 19 07:44:49 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/UShortSeqC.cpp')
-rw-r--r-- | TAO/tao/UShortSeqC.cpp | 46 |
1 files changed, 6 insertions, 40 deletions
diff --git a/TAO/tao/UShortSeqC.cpp b/TAO/tao/UShortSeqC.cpp index aecdf19d4a5..53db618d251 100644 --- a/TAO/tao/UShortSeqC.cpp +++ b/TAO/tao/UShortSeqC.cpp @@ -47,7 +47,7 @@ namespace TAO } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_sequence/sequence_cs.cpp:65 #if !defined (_CORBA_USHORTSEQ_CS_) @@ -59,7 +59,7 @@ CORBA::UShortSeq::UShortSeq (void) CORBA::UShortSeq::UShortSeq ( CORBA::ULong max ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::UShort > (max) @@ -71,7 +71,7 @@ CORBA::UShortSeq::UShortSeq ( CORBA::UShort * buffer, CORBA::Boolean release ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::UShort > (max, length, buffer, release) @@ -80,7 +80,7 @@ CORBA::UShortSeq::UShortSeq ( CORBA::UShortSeq::UShortSeq ( const UShortSeq &seq ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< CORBA::UShort > (seq) @@ -111,15 +111,7 @@ CORBA::Boolean operator<< ( const CORBA::UShortSeq &_tao_sequence ) { - const CORBA::ULong _tao_seq_len = _tao_sequence.length (); - - if (strm << _tao_seq_len) - { - // Encode all elements. - return strm.write_ushort_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - } - - return false; + return TAO::marshal_sequence(strm, _tao_sequence); } CORBA::Boolean operator>> ( @@ -127,33 +119,7 @@ CORBA::Boolean operator>> ( CORBA::UShortSeq &_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_ushort_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - - } - - return false; + return TAO::demarshal_sequence(strm, _tao_sequence); } #endif /* _TAO_CDR_OP_CORBA_UShortSeq_CPP_ */ |