diff options
Diffstat (limited to 'TAO/tao/Messaging_PolicyValueC.cpp')
-rw-r--r-- | TAO/tao/Messaging_PolicyValueC.cpp | 70 |
1 files changed, 13 insertions, 57 deletions
diff --git a/TAO/tao/Messaging_PolicyValueC.cpp b/TAO/tao/Messaging_PolicyValueC.cpp index 3bb08c79911..3fa19255de1 100644 --- a/TAO/tao/Messaging_PolicyValueC.cpp +++ b/TAO/tao/Messaging_PolicyValueC.cpp @@ -29,7 +29,7 @@ // be\be_codegen.cpp:291 -#include "Messaging_PolicyValueC.h" +#include "tao/Messaging_PolicyValueC.h" #include "tao/CDR.h" #include "tao/ORB_Core.h" @@ -40,16 +40,18 @@ // 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_structure/structure_cs.cpp:66 -void +void Messaging::PolicyValue::_tao_any_destructor ( void *_tao_void_pointer ) @@ -59,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_) @@ -71,7 +73,7 @@ Messaging::PolicyValueSeq::PolicyValueSeq (void) Messaging::PolicyValueSeq::PolicyValueSeq ( CORBA::ULong max ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< Messaging::PolicyValue > (max) @@ -83,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) @@ -92,7 +94,7 @@ Messaging::PolicyValueSeq::PolicyValueSeq ( Messaging::PolicyValueSeq::PolicyValueSeq ( const PolicyValueSeq &seq ) - : TAO_Unbounded_Sequence< + : TAO::unbounded_value_sequence< Messaging::PolicyValue > (seq) @@ -146,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>> ( @@ -169,40 +156,9 @@ 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_ */ + +TAO_END_VERSIONED_NAMESPACE_DECL |