diff options
Diffstat (limited to 'TAO/tao/Messaging_PolicyValueC.cpp')
-rw-r--r-- | TAO/tao/Messaging_PolicyValueC.cpp | 64 |
1 files changed, 8 insertions, 56 deletions
diff --git a/TAO/tao/Messaging_PolicyValueC.cpp b/TAO/tao/Messaging_PolicyValueC.cpp index d9e437f2c76..3fa19255de1 100644 --- a/TAO/tao/Messaging_PolicyValueC.cpp +++ b/TAO/tao/Messaging_PolicyValueC.cpp @@ -48,10 +48,10 @@ namespace TAO } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_structure/structure_cs.cpp:66 -void +void Messaging::PolicyValue::_tao_any_destructor ( void *_tao_void_pointer ) @@ -61,7 +61,7 @@ Messaging::PolicyValue::_tao_any_destructor ( delete _tao_tmp_pointer; } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_sequence/sequence_cs.cpp:65 #if !defined (_MESSAGING_POLICYVALUESEQ_CS_) @@ -73,7 +73,7 @@ Messaging::PolicyValueSeq::PolicyValueSeq (void) Messaging::PolicyValueSeq::PolicyValueSeq ( CORBA::ULong max ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< Messaging::PolicyValue > (max) @@ -85,7 +85,7 @@ Messaging::PolicyValueSeq::PolicyValueSeq ( Messaging::PolicyValue * buffer, CORBA::Boolean release ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< Messaging::PolicyValue > (max, length, buffer, release) @@ -94,7 +94,7 @@ Messaging::PolicyValueSeq::PolicyValueSeq ( Messaging::PolicyValueSeq::PolicyValueSeq ( const PolicyValueSeq &seq ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< Messaging::PolicyValue > (seq) @@ -148,22 +148,7 @@ CORBA::Boolean operator<< ( const Messaging::PolicyValueSeq &_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>> ( @@ -171,40 +156,7 @@ CORBA::Boolean operator>> ( Messaging::PolicyValueSeq &_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_Messaging_PolicyValueSeq_CPP_ */ |