From 2ee7b7eed4c0cc10f4ec25b186b04202af01b565 Mon Sep 17 00:00:00 2001 From: elliott_c Date: Thu, 25 Jan 2007 18:17:52 +0000 Subject: ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott --- TAO/tests/Codec/client.cpp | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'TAO/tests/Codec') diff --git a/TAO/tests/Codec/client.cpp b/TAO/tests/Codec/client.cpp index bb4e1860336..3c2fff94d02 100644 --- a/TAO/tests/Codec/client.cpp +++ b/TAO/tests/Codec/client.cpp @@ -109,8 +109,7 @@ test_codec (IOP::Codec_ptr codec) // Start out with the encode() method, i.e. the one that // includes the TypeCode in the CDR encapsulation. - encoded_data = codec->encode (data - ACE_ENV_ARG_PARAMETER); + encoded_data = codec->encode (data); if ((reinterpret_cast (encoded_data->get_buffer ()) % ACE_CDR::MAX_ALIGNMENT) == 0) @@ -118,8 +117,7 @@ test_codec (IOP::Codec_ptr codec) "\nData for decoding are already aligned " "on MAX_ALIGNMENT.\n\n")); // Extract the data from the octet sequence. - decoded_data = codec->decode (encoded_data.in () - ACE_ENV_ARG_PARAMETER); + decoded_data = codec->decode (encoded_data.in ()); if (!(decoded_data.in() >>= extracted_value)) ACE_ERROR_RETURN ((LM_ERROR, @@ -144,8 +142,7 @@ test_codec (IOP::Codec_ptr codec) // Now use the encode_value() method, i.e. the one that does // *not* include the TypeCode in the CDR encapsulation. - encoded_data = codec->encode_value (data - ACE_ENV_ARG_PARAMETER); + encoded_data = codec->encode_value (data); if ((reinterpret_cast (encoded_data->get_buffer ()) % ACE_CDR::MAX_ALIGNMENT) == 0) @@ -156,8 +153,7 @@ test_codec (IOP::Codec_ptr codec) // Extract the data from the octet sequence. decoded_data = codec->decode_value (encoded_data.in (), - Foo::_tc_Bar - ACE_ENV_ARG_PARAMETER); + Foo::_tc_Bar); if (!(decoded_data.in() >>= extracted_value)) ACE_ERROR_RETURN ((LM_ERROR, @@ -181,23 +177,19 @@ int main (int argc, char *argv[]) { int retval = 0; - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "my_orb" - ACE_ENV_ARG_PARAMETER); + "my_orb"); // Obtain a reference to the CodecFactory. CORBA::Object_var obj = - orb->resolve_initial_references ("CodecFactory" - ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("CodecFactory"); IOP::CodecFactory_var codec_factory = - IOP::CodecFactory::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); + IOP::CodecFactory::_narrow (obj.in ()); // Set up a structure that contains information necessary to // create a GIOP 1.1 CDR encapsulation Codec. @@ -210,8 +202,7 @@ main (int argc, char *argv[]) // Obtain the CDR encapsulation Codec. IOP::Codec_var codec_1_2 = - codec_factory->create_codec_with_codesets (encoding_1_2 - ACE_ENV_ARG_PARAMETER); + codec_factory->create_codec_with_codesets (encoding_1_2); retval = test_codec (codec_1_2.in ()); @@ -226,18 +217,15 @@ main (int argc, char *argv[]) // Obtain the CDR encapsulation Codec. IOP::Codec_var codec = - codec_factory->create_codec (encoding - ACE_ENV_ARG_PARAMETER); + codec_factory->create_codec (encoding); retval = test_codec (codec.in ()); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Codec test:"); + ex._tao_print_exception ("Codec test:"); return -1; } - ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "Codec test passed.\n")); -- cgit v1.2.1