diff options
Diffstat (limited to 'TAO/tests/Param_Test/fixed_struct.cpp')
-rw-r--r-- | TAO/tests/Param_Test/fixed_struct.cpp | 85 |
1 files changed, 22 insertions, 63 deletions
diff --git a/TAO/tests/Param_Test/fixed_struct.cpp b/TAO/tests/Param_Test/fixed_struct.cpp index 3e234de1955..d185f868fe0 100644 --- a/TAO/tests/Param_Test/fixed_struct.cpp +++ b/TAO/tests/Param_Test/fixed_struct.cpp @@ -46,7 +46,29 @@ void Test_Fixed_Struct::dii_req_invoke (CORBA::Request *req, CORBA::Environment &ACE_TRY_ENV) { + req->add_in_arg ("s1") <<= this->in_; + req->add_inout_arg ("s2") <<= this->inout_; + req->add_out_arg ("s3") <<= this->out_; + req->set_return_type (Param_Test::_tc_Fixed_Struct); + req->invoke (ACE_TRY_ENV); + ACE_CHECK; + + Param_Test::Fixed_Struct *tmp; + req->return_value () >>= tmp; + this->ret_ = *tmp; + + CORBA::NamedValue_ptr arg2 = + req->arguments ()->item (1, ACE_TRY_ENV); + ACE_CHECK; + *arg2->value () >>= tmp; + this->inout_ = *tmp; + + CORBA::NamedValue_ptr arg3 = + req->arguments ()->item (2, ACE_TRY_ENV); + ACE_CHECK; + *arg3->value () >>= tmp; + this->out_ = *tmp; } int @@ -107,69 +129,6 @@ Test_Fixed_Struct::run_sii_test (Param_Test_ptr objref, return -1; } -int -Test_Fixed_Struct::add_args (CORBA::NVList_ptr param_list, - CORBA::NVList_ptr retval, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_TRY - { - // We provide the top level memory - // the Any does not own any of these - CORBA::Any in_arg (Param_Test::_tc_Fixed_Struct, - &this->in_, - 0); - - CORBA::Any inout_arg (Param_Test::_tc_Fixed_Struct, - &this->inout_, - 0); - - CORBA::Any out_arg (Param_Test::_tc_Fixed_Struct, - &this->out_, - 0); - - // add parameters - param_list->add_value ("s1", - in_arg, - CORBA::ARG_IN, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - param_list->add_value ("s2", - inout_arg, - CORBA::ARG_INOUT, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - param_list->add_value ("s3", - out_arg, - CORBA::ARG_OUT, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - // add return value type - CORBA::NamedValue *item = retval->item (0, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - item->value ()->replace (Param_Test::_tc_Fixed_Struct, - &this->ret_, - 0, // does not own - ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Test_Fixed_Struct::add_args\n"); - - } - ACE_ENDTRY; - return -1; -} - CORBA::Boolean Test_Fixed_Struct::check_validity (void) { |