diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-21 20:04:48 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-21 20:04:48 +0000 |
commit | af88d3ad4cdb32902bf482860d043f784060e1d7 (patch) | |
tree | 6a09865d0c260552f76f345fecc5caf29afb8162 /TAO/tests/Param_Test/bd_string.cpp | |
parent | fd1e8fb0535dc47409be3dbe2ab00e3e0d307f8c (diff) | |
download | ATCD-af88d3ad4cdb32902bf482860d043f784060e1d7.tar.gz |
ChangeLogTag:Tue Mar 21 13:51:23 2000 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tests/Param_Test/bd_string.cpp')
-rw-r--r-- | TAO/tests/Param_Test/bd_string.cpp | 89 |
1 files changed, 25 insertions, 64 deletions
diff --git a/TAO/tests/Param_Test/bd_string.cpp b/TAO/tests/Param_Test/bd_string.cpp index c0a650a427d..b4028178f57 100644 --- a/TAO/tests/Param_Test/bd_string.cpp +++ b/TAO/tests/Param_Test/bd_string.cpp @@ -58,12 +58,35 @@ void Test_Bounded_String::dii_req_invoke (CORBA::Request *req, CORBA::Environment &ACE_TRY_ENV) { + req->add_in_arg ("s1") <<= CORBA::Any::from_string (this->in_, 128); + req->add_inout_arg ("s2") <<= CORBA::Any::from_string (this->inout_, 128); + req->add_out_arg ("s3") <<= CORBA::Any::from_string (this->out_, 128); + + req->set_return_type (Param_Test::_tc_short_string); + req->invoke (ACE_TRY_ENV); + ACE_CHECK; + + char *tmp; + req->return_value () >>= CORBA::Any::to_string (tmp, 128); + this->ret_ = CORBA::string_dup (tmp); + + CORBA::NamedValue_ptr arg2 = + req->arguments ()->item (1, ACE_TRY_ENV); + ACE_CHECK; + *arg2->value () >>= CORBA::Any::to_string (tmp, 128); + this->inout_ = CORBA::string_dup (tmp); + + CORBA::NamedValue_ptr arg3 = + req->arguments ()->item (2, ACE_TRY_ENV); + ACE_CHECK; + *arg3->value () >>= CORBA::Any::to_string (tmp, 128); + this->out_ = CORBA::string_dup (tmp); } int Test_Bounded_String::init_parameters (Param_Test_ptr, - CORBA::Environment &) + CORBA::Environment &) { Generator *gen = GENERATOR::instance (); // value generator @@ -99,7 +122,7 @@ Test_Bounded_String::reset_parameters (void) int Test_Bounded_String::run_sii_test (Param_Test_ptr objref, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Environment &ACE_TRY_ENV) { ACE_TRY { @@ -123,68 +146,6 @@ Test_Bounded_String::run_sii_test (Param_Test_ptr objref, return -1; } -int -Test_Bounded_String::add_args (CORBA::NVList_ptr param_list, - CORBA::NVList_ptr retval, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_TRY - { - // create the parameters - CORBA::Any in_arg (CORBA::_tc_string, - &this->in_, - 0); - - CORBA::Any inout_arg (CORBA::_tc_string, - &this->inout_, - 0); - - CORBA::Any out_arg (CORBA::_tc_string, - &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 - CORBA::NamedValue *item = retval->item (0, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - item->value ()->replace (CORBA::_tc_string, - &this->ret_, - 0, // does not own - ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Test_Bounded_String::add_args\n"); - - } - ACE_ENDTRY; - return -1; -} - CORBA::Boolean Test_Bounded_String::check_validity (void) { |