From 1ce4bfe566cacc77785f53a0133d4c40f1d4146b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 24 Jan 2007 13:42:44 +0000 Subject: Wed Jan 24 12:25:12 UTC 2007 Johnny Willemsen --- TAO/tao/DynamicInterface/Context.cpp | 42 ++++++++------------- TAO/tao/DynamicInterface/Context.h | 20 +++++----- TAO/tao/DynamicInterface/DII_Arguments.cpp | 42 ++++++++------------- .../DII_Arguments_Converter_Impl.cpp | 19 ++++------ .../DII_Arguments_Converter_Impl.h | 13 +++---- TAO/tao/DynamicInterface/DII_Invocation.cpp | 36 ++++++------------ TAO/tao/DynamicInterface/DII_Invocation.h | 25 +++---------- .../DynamicInterface/DII_Invocation_Adapter.cpp | 18 ++++----- TAO/tao/DynamicInterface/DII_Invocation_Adapter.h | 7 ++-- TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp | 21 ++++------- TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h | 4 +- TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp | 11 +++--- TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h | 6 +-- .../DynamicInterface/Dynamic_Implementation.cpp | 43 +++++++++------------- TAO/tao/DynamicInterface/Dynamic_Implementation.h | 16 ++++---- TAO/tao/DynamicInterface/ExceptionList.cpp | 10 ++--- TAO/tao/DynamicInterface/ExceptionList.h | 6 +-- TAO/tao/DynamicInterface/Request.cpp | 40 ++++++++------------ TAO/tao/DynamicInterface/Request.h | 16 ++++---- TAO/tao/DynamicInterface/Request.inl | 18 +++------ TAO/tao/DynamicInterface/Server_Request.cpp | 27 ++++++-------- TAO/tao/DynamicInterface/Server_Request.h | 8 ++-- .../DynamicInterface/Unknown_User_Exception.cpp | 8 ++-- TAO/tao/DynamicInterface/Unknown_User_Exception.h | 4 +- 24 files changed, 177 insertions(+), 283 deletions(-) (limited to 'TAO/tao/DynamicInterface') diff --git a/TAO/tao/DynamicInterface/Context.cpp b/TAO/tao/DynamicInterface/Context.cpp index f437ba7fb80..dde0661c6fe 100644 --- a/TAO/tao/DynamicInterface/Context.cpp +++ b/TAO/tao/DynamicInterface/Context.cpp @@ -44,7 +44,7 @@ CORBA::Context::_decr_refcnt (void) } const char * -CORBA::Context::context_name (ACE_ENV_SINGLE_ARG_DECL) const +CORBA::Context::context_name (void) const { ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO), @@ -52,7 +52,7 @@ CORBA::Context::context_name (ACE_ENV_SINGLE_ARG_DECL) const } CORBA::Context_ptr -CORBA::Context::parent (ACE_ENV_SINGLE_ARG_DECL) const +CORBA::Context::parent (void) const { ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO), @@ -61,47 +61,37 @@ CORBA::Context::parent (ACE_ENV_SINGLE_ARG_DECL) const void CORBA::Context::create_child (const char * /* child_ctx_name */, - CORBA::Context_out /* child_ctx */ - ACE_ENV_ARG_DECL) + CORBA::Context_out /* child_ctx */) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO::VMCID, - CORBA::COMPLETED_NO)); + throw ::CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO); } void CORBA::Context::set_one_value (const char * /* propname */, - const CORBA::Any & /* propvalue */ - ACE_ENV_ARG_DECL) + const CORBA::Any & /* propvalue */) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO::VMCID, - CORBA::COMPLETED_NO)); + throw ::CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO); } void -CORBA::Context::set_values (CORBA::NVList_ptr - ACE_ENV_ARG_DECL) +CORBA::Context::set_values (CORBA::NVList_ptr) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO::VMCID, - CORBA::COMPLETED_NO)); + throw ::CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO); } void -CORBA::Context::delete_values (const char * /* propname */ - ACE_ENV_ARG_DECL) +CORBA::Context::delete_values (const char * /* propname */) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO::VMCID, - CORBA::COMPLETED_NO)); + throw ::CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO); } void CORBA::Context::get_values (const char * /* start_scope */, CORBA::Flags /* op_flags */, const char * /* pattern */, - CORBA::NVList_ptr & /* values */ - ACE_ENV_ARG_DECL) + CORBA::NVList_ptr & /* values */) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO::VMCID, - CORBA::COMPLETED_NO)); + throw ::CORBA::NO_IMPLEMENT (TAO::VMCID, CORBA::COMPLETED_NO); } CORBA::ContextList::ContextList (CORBA::ULong len, @@ -142,8 +132,7 @@ CORBA::ContextList::add_consume (char *ctx) } char * -CORBA::ContextList::item (CORBA::ULong slot - ACE_ENV_ARG_DECL) +CORBA::ContextList::item (CORBA::ULong slot) { char **ctx = 0; @@ -159,10 +148,9 @@ CORBA::ContextList::item (CORBA::ULong slot } void -CORBA::ContextList::remove (CORBA::ULong - ACE_ENV_ARG_DECL) +CORBA::ContextList::remove (CORBA::ULong) { - ACE_THROW (CORBA::NO_IMPLEMENT ()); + throw ::CORBA::NO_IMPLEMENT (); } CORBA::ContextList_ptr diff --git a/TAO/tao/DynamicInterface/Context.h b/TAO/tao/DynamicInterface/Context.h index 7ad9c97795d..8be691e8c81 100644 --- a/TAO/tao/DynamicInterface/Context.h +++ b/TAO/tao/DynamicInterface/Context.h @@ -53,8 +53,6 @@ namespace CORBA class NVList; typedef NVList *NVList_ptr; - class Environment; - typedef TAO_Pseudo_Var_T Context_var; typedef TAO_Pseudo_Out_T Context_out; @@ -92,29 +90,29 @@ namespace CORBA // = All the spec-required functions below will just throw a // CORBA::NO_IMPLEMENT exception and do nothing else. - const char *context_name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) const; + const char *context_name (void) const; - CORBA::Context_ptr parent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) const; + CORBA::Context_ptr parent (void) const; void create_child (const char *child_ctx_name, CORBA::Context_out child_ctx - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); void set_one_value (const char *propname, const CORBA::Any &propvalue - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); void set_values (CORBA::NVList_ptr values - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); void delete_values (const char *propname - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); void get_values (const char *start_scope, CORBA::Flags op_flags, const char *pattern, CORBA::NVList_ptr &values - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); // Useful for template programming. typedef CORBA::Context_ptr _ptr_type; @@ -170,11 +168,11 @@ namespace CORBA /// Return the typecode at slot i. Raises the "Bounds" exception. char *item (CORBA::ULong slot - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); /// Remove the typecode at slot i. Raises the "Bounds" exception. void remove (CORBA::ULong slot - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); /// Increment and decrement ref counts. void _incr_refcnt (void); diff --git a/TAO/tao/DynamicInterface/DII_Arguments.cpp b/TAO/tao/DynamicInterface/DII_Arguments.cpp index 3118f59a81d..3ecfa63d85b 100644 --- a/TAO/tao/DynamicInterface/DII_Arguments.cpp +++ b/TAO/tao/DynamicInterface/DII_Arguments.cpp @@ -24,26 +24,22 @@ namespace TAO CORBA::Boolean NamedValue_Argument::demarshal (TAO_InputCDR &cdr) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { if (this->x_ !=0 && this->x_->value ()->impl ()) { this->x_->value ()->impl ()->_tao_decode (cdr - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } } - ACE_CATCHANY + catch ( ::CORBA::Exception&) { - return 0; + return false; } - ACE_ENDTRY; - ACE_CHECK_RETURN (false); this->byte_order_ = cdr.byte_order (); - return 1; + return true; } void @@ -57,30 +53,25 @@ namespace TAO CORBA::Boolean NVList_Argument::marshal (TAO_OutputCDR &cdr) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { this->x_->_tao_encode (cdr, CORBA::ARG_IN | CORBA::ARG_INOUT - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } - ACE_CATCHANY + catch ( ::CORBA::Exception&) { - return 0; + return false; } - ACE_ENDTRY; - ACE_CHECK_RETURN (false); - return 1; + return true; } CORBA::Boolean NVList_Argument::demarshal (TAO_InputCDR &cdr) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Now, get all the "return", "out", and "inout" parameters // from the response message body ... return parameter is @@ -92,17 +83,14 @@ namespace TAO cdr, CORBA::ARG_OUT | CORBA::ARG_INOUT, this->lazy_evaluation_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } - ACE_CATCHANY + catch ( ::CORBA::Exception&) { - return 0; + return false; } - ACE_ENDTRY; - ACE_CHECK_RETURN (false); - return 1; + return true; } void diff --git a/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp b/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp index ec8e6788bef..c0a8fca220d 100644 --- a/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp +++ b/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp @@ -16,9 +16,7 @@ void TAO_DII_Arguments_Converter_Impl::convert ( TAO_ServerRequest & server_request, TAO::Argument * const args[], - size_t nargs - ACE_ENV_ARG_DECL - ) + size_t nargs) { // The DII requests on client side always have two arguments // - one is the return argument and the other is NVList_Argument. @@ -34,14 +32,14 @@ TAO_DII_Arguments_Converter_Impl::convert ( // get_in_arg () from the oneway operation with multiple "IN" // parameters. CORBA::NVList_ptr lst - = static_cast (server_request.operation_details ()->args()[1])->arg (); + = static_cast ( + server_request.operation_details ()->args()[1])->arg (); - CORBA::ULong const sz = lst->count (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + CORBA::ULong const sz = lst->count (); if (sz != nargs - 1) { - ACE_THROW (CORBA::BAD_PARAM ()); + throw ( ::CORBA::BAD_PARAM ()); } // To avoid the use of extraction operators on CORBA::Any, we will @@ -50,12 +48,11 @@ TAO_DII_Arguments_Converter_Impl::convert ( TAO_OutputCDR output; for (CORBA::ULong i = 0; i < sz; ++i) { - CORBA::NamedValue_ptr theitem = lst->item (i ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + CORBA::NamedValue_ptr theitem = lst->item (i); if (!(theitem->value ()->impl ()->marshal_value (output))) { - ACE_THROW (CORBA::BAD_PARAM ()); + throw ::CORBA::BAD_PARAM (); } } @@ -64,7 +61,7 @@ TAO_DII_Arguments_Converter_Impl::convert ( { if (!(args[j + 1]->demarshal (input))) { - ACE_THROW (CORBA::BAD_PARAM ()); + throw ::CORBA::BAD_PARAM (); } } diff --git a/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.h b/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.h index 682c636b9dd..9d9f9e360e8 100644 --- a/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.h +++ b/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.h @@ -34,19 +34,18 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL * * @brief DII_Arguments_Converter_Impl. * - * This class provides the implementation to expand the DII arguments in NVList - * to the list of arguments. + * This class provides the implementation to expand the DII arguments in NVList + * to the list of arguments. */ class TAO_DynamicInterface_Export TAO_DII_Arguments_Converter_Impl : public TAO_DII_Arguments_Converter { public: - virtual void convert ( TAO_ServerRequest & server_request, - TAO::Argument * const args[], - size_t nargs - ACE_ENV_ARG_DECL ); - + virtual void convert (TAO_ServerRequest & server_request, + TAO::Argument * const args[], + size_t nargs); + // Used to force the initialization of the ORB code. static int Initializer (void); }; diff --git a/TAO/tao/DynamicInterface/DII_Invocation.cpp b/TAO/tao/DynamicInterface/DII_Invocation.cpp index 9e7d14808c8..0035b79a946 100644 --- a/TAO/tao/DynamicInterface/DII_Invocation.cpp +++ b/TAO/tao/DynamicInterface/DII_Invocation.cpp @@ -48,13 +48,12 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 Dynamic::ParameterList * - DII_Invocation::arguments (ACE_ENV_SINGLE_ARG_DECL) + DII_Invocation::arguments (void) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = - TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + TAO_RequestInfo_Util::make_parameter_list (); Dynamic::ParameterList_var safe_parameter_list = parameter_list; @@ -75,17 +74,14 @@ namespace TAO #endif /* TAO_HAS_INTERCEPTORS == 1 */ Invocation_Status - DII_Invocation::remote_invocation (ACE_Time_Value *max_wait_time - ACE_ENV_ARG_DECL) + DII_Invocation::remote_invocation (ACE_Time_Value *max_wait_time) ACE_THROW_SPEC ((CORBA::Exception)) { - return Synch_Twoway_Invocation::remote_twoway (max_wait_time - ACE_ENV_ARG_PARAMETER); + return Synch_Twoway_Invocation::remote_twoway (max_wait_time); } Invocation_Status - DII_Invocation::handle_user_exception (TAO_InputCDR &cdr - ACE_ENV_ARG_DECL) + DII_Invocation::handle_user_exception (TAO_InputCDR &cdr) ACE_THROW_SPEC ((CORBA::Exception)) { Reply_Guard mon (this, @@ -121,11 +117,9 @@ namespace TAO { CORBA::TypeCode_var tc = this->excp_list_->item (i - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + ); - const char *xid = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + const char *xid = tc->id (); if (ACE_OS::strcmp (buf.in (), xid) != 0) { @@ -156,7 +150,6 @@ namespace TAO // are being used in a TAO gateway. this->host_->raw_user_exception (cdr); - mon.set_status (TAO_INVOKE_USER_EXCEPTION); // @@ It would seem that if the remote exception is a @@ -184,19 +177,17 @@ namespace TAO response_expected) , host_ (req) { - } #if TAO_HAS_INTERCEPTORS == 1 //@NOTE: Need to figure a way to share this code Dynamic::ParameterList * - DII_Deferred_Invocation::arguments (ACE_ENV_SINGLE_ARG_DECL) + DII_Deferred_Invocation::arguments (void) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = - TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + TAO_RequestInfo_Util::make_parameter_list (); Dynamic::ParameterList_var safe_parameter_list = parameter_list; @@ -217,17 +208,12 @@ namespace TAO #endif /* TAO_HAS_INTERCEPTORS == 1*/ Invocation_Status - DII_Deferred_Invocation::remote_invocation ( - ACE_Time_Value *max_wait_time - ACE_ENV_ARG_DECL - ) + DII_Deferred_Invocation::remote_invocation (ACE_Time_Value *max_wait_time) ACE_THROW_SPEC ((CORBA::Exception)) { this->safe_rd_->transport (this->resolver_.transport ()); - return Asynch_Remote_Invocation::remote_invocation ( - max_wait_time - ACE_ENV_ARG_PARAMETER); + return Asynch_Remote_Invocation::remote_invocation (max_wait_time); } } diff --git a/TAO/tao/DynamicInterface/DII_Invocation.h b/TAO/tao/DynamicInterface/DII_Invocation.h index ba3a5a6be66..11bb74a18dc 100644 --- a/TAO/tao/DynamicInterface/DII_Invocation.h +++ b/TAO/tao/DynamicInterface/DII_Invocation.h @@ -39,8 +39,6 @@ namespace Dynamic namespace TAO { - /** - */ class TAO_DynamicInterface_Export DII_Invocation: public Synch_Twoway_Invocation { @@ -55,20 +53,14 @@ namespace TAO bool response_expected = true); #if TAO_HAS_INTERCEPTORS ==1 - virtual Dynamic::ParameterList *arguments (ACE_ENV_SINGLE_ARG_DECL) + virtual Dynamic::ParameterList *arguments (void) ACE_THROW_SPEC ((CORBA::SystemException)); #endif /*TAO_HAS_INTERCEPTORS == 1*/ - Invocation_Status remote_invocation ( - ACE_Time_Value *max_wait_time - ACE_ENV_ARG_DECL - ) + Invocation_Status remote_invocation (ACE_Time_Value *max_wait_time) ACE_THROW_SPEC ((CORBA::Exception)); - virtual Invocation_Status handle_user_exception ( - TAO_InputCDR &cdr - ACE_ENV_ARG_DECL - ) + virtual Invocation_Status handle_user_exception (TAO_InputCDR &cdr) ACE_THROW_SPEC ((CORBA::Exception)); private: @@ -79,10 +71,6 @@ namespace TAO }; - - /* - * - */ class TAO_DynamicInterface_Export DII_Deferred_Invocation : public Asynch_Remote_Invocation { @@ -97,14 +85,11 @@ namespace TAO bool response_expected = true); #if TAO_HAS_INTERCEPTORS ==1 - virtual Dynamic::ParameterList *arguments (ACE_ENV_SINGLE_ARG_DECL) + virtual Dynamic::ParameterList *arguments (void) ACE_THROW_SPEC ((CORBA::SystemException)); #endif /*TAO_HAS_INTERCEPTORS == 1*/ - Invocation_Status remote_invocation ( - ACE_Time_Value *max_wait_time - ACE_ENV_ARG_DECL - ) + Invocation_Status remote_invocation (ACE_Time_Value *max_wait_time) ACE_THROW_SPEC ((CORBA::Exception)); private: diff --git a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp index 441c1df2f92..81fcbd730fe 100644 --- a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp +++ b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp @@ -51,7 +51,7 @@ namespace TAO CORBA::Object_var &effective_target, Profile_Transport_Resolver &r, ACE_Time_Value *&max_wait_time - ACE_ENV_ARG_DECL) + ) { // Simple sanity check if (this->mode_ != TAO_DII_INVOCATION || @@ -76,8 +76,7 @@ namespace TAO Invocation_Status status = synch.remote_invocation (max_wait_time - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + ); if (status == TAO_INVOKE_RESTART && @@ -95,8 +94,7 @@ namespace TAO this->object_forwarded (effective_target, r.stub (), permanent_forward - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + ); } return status; } @@ -131,7 +129,7 @@ namespace TAO DII_Deferred_Invocation_Adapter::invoke ( TAO::Exception_Data *ex, unsigned long ex_count - ACE_ENV_ARG_DECL) + ) { // New reply dispatcher on the heap, because we will go out of // scope and hand over the reply dispatcher to the ORB. @@ -144,8 +142,7 @@ namespace TAO Invocation_Adapter::invoke (ex, ex_count - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } Invocation_Status @@ -154,7 +151,7 @@ namespace TAO CORBA::Object_var &effective_target, Profile_Transport_Resolver &r, ACE_Time_Value *&max_wait_time - ACE_ENV_ARG_DECL) + ) { // Simple sanity check if (this->mode_ != TAO_DII_DEFERRED_INVOCATION || @@ -180,8 +177,7 @@ namespace TAO Invocation_Status status = synch.remote_invocation (max_wait_time - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + ); if (status == TAO_INVOKE_RESTART) { diff --git a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h index ac5b8e9dfd7..88a1df41668 100644 --- a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h +++ b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.h @@ -35,7 +35,6 @@ class TAO_DII_Deferred_Reply_Dispatcher; namespace CORBA { class Object; - class Environment; class SystemException; class ExceptionList; class Request; @@ -98,7 +97,7 @@ namespace TAO CORBA::Object_var &effective_target, Profile_Transport_Resolver &r, ACE_Time_Value *&max_wait_time - ACE_ENV_ARG_DECL); + ); private: @@ -135,7 +134,7 @@ namespace TAO /// Invoke the target virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count - ACE_ENV_ARG_DECL); + ); protected: @@ -144,7 +143,7 @@ namespace TAO CORBA::Object_var &effective_target, Profile_Transport_Resolver &r, ACE_Time_Value *&max_wait_time - ACE_ENV_ARG_DECL); + ); private: CORBA::Request *request_; diff --git a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp index 877570d611a..c7697dc7c15 100644 --- a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp +++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp @@ -79,15 +79,14 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply ( ACE_TEXT ("(%P | %t):TAO_Asynch_Reply_Dispatcher::dispatch_reply:\n"))); } - ACE_TRY_NEW_ENV + try { // Call the Request back and send the reply data. this->req_->handle_response (this->reply_cdr_, this->reply_status_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } - ACE_CATCHANY + catch ( ::CORBA::Exception& ex) { if (TAO_debug_level >= 4) { @@ -95,7 +94,6 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply ( "Exception during reply handler"); } } - ACE_ENDTRY; // This was dynamically allocated. Now the job is done. (void) this->decr_refcount (); @@ -106,9 +104,8 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply ( void TAO_DII_Deferred_Reply_Dispatcher::connection_closed (void) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Generate a fake exception.... CORBA::COMM_FAILURE comm_failure (0, @@ -117,18 +114,16 @@ TAO_DII_Deferred_Reply_Dispatcher::connection_closed (void) TAO_OutputCDR out_cdr; comm_failure._tao_encode (out_cdr - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); // Turn into an output CDR TAO_InputCDR cdr (out_cdr); this->req_->handle_response (cdr, TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } - ACE_CATCHANY + catch ( ::CORBA::Exception& ex) { if (TAO_debug_level >= 4) { @@ -138,8 +133,6 @@ TAO_DII_Deferred_Reply_Dispatcher::connection_closed (void) ); } } - ACE_ENDTRY; - ACE_CHECK; (void) this->decr_refcount (); } diff --git a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h index cb450106c5d..920915558cb 100644 --- a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h +++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.h @@ -57,9 +57,7 @@ public: /// The following methods are not needed for this class.. virtual void reply_timed_out (void) {} - virtual long schedule_timer (CORBA::ULong , - const ACE_Time_Value & - ACE_ENV_ARG_DECL_NOT_USED) + virtual long schedule_timer (CORBA::ULong , const ACE_Time_Value &) { return 0; } diff --git a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp index a23c6c4e06e..fba11751451 100644 --- a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp +++ b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp @@ -29,7 +29,7 @@ TAO_Dynamic_Adapter_Impl::create_request ( CORBA::ExceptionList_ptr exceptions, CORBA::Request_ptr &request, CORBA::Flags req_flags - ACE_ENV_ARG_DECL + ) { ACE_NEW_THROW_EX (request, @@ -40,7 +40,7 @@ TAO_Dynamic_Adapter_Impl::create_request ( result, req_flags, exceptions - ACE_ENV_ARG_PARAMETER), + ), CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, @@ -54,14 +54,14 @@ CORBA::Request_ptr TAO_Dynamic_Adapter_Impl::request (CORBA::Object_ptr obj, CORBA::ORB_ptr orb, const char *operation - ACE_ENV_ARG_DECL) + ) { CORBA::Request_ptr req = CORBA::Request::_nil (); ACE_NEW_THROW_EX (req, CORBA::Request (obj, orb, operation - ACE_ENV_ARG_PARAMETER), + ), CORBA::NO_MEMORY ( CORBA::SystemException::_tao_minor_code ( TAO::VMCID, @@ -69,7 +69,6 @@ TAO_Dynamic_Adapter_Impl::request (CORBA::Object_ptr obj, ), CORBA::COMPLETED_MAYBE )); - ACE_CHECK_RETURN (CORBA::Request::_nil ()); return req; } @@ -122,7 +121,7 @@ TAO_Dynamic_Adapter_Impl::server_request_release (CORBA::ServerRequest_ptr req) void TAO_Dynamic_Adapter_Impl::create_exception_list ( CORBA::ExceptionList_ptr &list - ACE_ENV_ARG_DECL + ) { ACE_NEW_THROW_EX (list, diff --git a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h index 9537488f66c..96e66e9dafc 100644 --- a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h +++ b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.h @@ -58,12 +58,12 @@ public: CORBA::ExceptionList_ptr exceptions, CORBA::Request_ptr &request, CORBA::Flags req_flags - ACE_ENV_ARG_DECL); + ); virtual CORBA::Request_ptr request (CORBA::Object_ptr obj, CORBA::ORB_ptr orb, const char *op - ACE_ENV_ARG_DECL); + ); // CORBA::is_nil and CORBA::release for Context, Request, and ServerRequest. @@ -82,7 +82,7 @@ public: // CORBA::ORB::create_exception_list. virtual void create_exception_list (CORBA::ExceptionList_ptr &list - ACE_ENV_ARG_DECL); + ); // Used to force the initialization of the ORB code. static int Initializer (void); diff --git a/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp b/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp index 6e09d9ff5fa..be9247638db 100644 --- a/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp +++ b/TAO/tao/DynamicInterface/Dynamic_Implementation.cpp @@ -20,24 +20,22 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Boolean TAO_DynamicImplementation::_is_a (const char *logical_type_id - ACE_ENV_ARG_DECL) + ) { CORBA::RepositoryId_var id = - this->get_id_from_primary_interface (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->get_id_from_primary_interface (); return ACE_OS::strcmp (logical_type_id, id.in ()) == 0; } CORBA::Object_ptr -TAO_DynamicImplementation::_this (ACE_ENV_SINGLE_ARG_DECL) +TAO_DynamicImplementation::_this (void) { // The _this() function returns a CORBA::Object_ptr for the target // object. Unlike _this() for static skeletons, its return type is // not interface-specific because a DSI servant may very well // incarnate multiple CORBA objects of different types. - TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); + TAO_Stub *stub = this->_create_stub (); // Create a object. CORBA::Object_ptr retval = CORBA::Object::_nil (); @@ -51,7 +49,7 @@ TAO_DynamicImplementation::_this (ACE_ENV_SINGLE_ARG_DECL) } CORBA::InterfaceDef_ptr -TAO_DynamicImplementation::_get_interface (ACE_ENV_SINGLE_ARG_DECL) +TAO_DynamicImplementation::_get_interface (void) { TAO_IFR_Client_Adapter *adapter = ACE_Dynamic_Service::instance ( @@ -65,14 +63,13 @@ TAO_DynamicImplementation::_get_interface (ACE_ENV_SINGLE_ARG_DECL) } CORBA::RepositoryId_var id = - this->get_id_from_primary_interface (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->get_id_from_primary_interface (); // This doesn't take multiple ORBs into account, but it's being // used only to resolve the IFR, so we should be ok. return adapter->get_interface (TAO_ORB_Core_instance ()->orb (), id.in () - ACE_ENV_ARG_PARAMETER); + ); } const char * @@ -92,7 +89,7 @@ TAO_DynamicImplementation::_downcast (const char *repository_id) } TAO_Stub * -TAO_DynamicImplementation::_create_stub (ACE_ENV_SINGLE_ARG_DECL) +TAO_DynamicImplementation::_create_stub (void) { // If DynamicImplementation::_this() is invoked outside of the // context of a request invocation on a target object being served @@ -115,27 +112,24 @@ TAO_DynamicImplementation::_create_stub (ACE_ENV_SINGLE_ARG_DECL) CORBA::PolicyList_var client_exposed_policies = poa_current_impl->poa ()->client_exposed_policies ( poa_current_impl->priority () - ACE_ENV_ARG_PARAMETER ); - ACE_CHECK_RETURN (0); CORBA::RepositoryId_var pinterface = this->_primary_interface (poa_current_impl->object_id (), poa.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + ); return poa_current_impl->poa ()->key_to_stub (poa_current_impl->object_key (), pinterface.in (), poa_current_impl->priority () - ACE_ENV_ARG_PARAMETER); + ); } void TAO_DynamicImplementation::_dispatch (TAO_ServerRequest &request, void * /* context */ - ACE_ENV_ARG_DECL) + ) { // No need to do any of this if the client isn't waiting. if (request.response_expected ()) @@ -163,21 +157,19 @@ TAO_DynamicImplementation::_dispatch (TAO_ServerRequest &request, ACE_NEW (dsi_request, CORBA::ServerRequest (request)); - ACE_TRY + try { // Delegate to user. this->invoke (dsi_request - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); // Only if the client is waiting. if (request.response_expected () && !request.sync_with_server ()) { - dsi_request->dsi_marshal (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + dsi_request->dsi_marshal (); } } - ACE_CATCH (CORBA::Exception, ex) + catch ( ::CORBA::Exception& ex) { // Only if the client is waiting. if (request.response_expected () && !request.sync_with_server ()) @@ -185,14 +177,13 @@ TAO_DynamicImplementation::_dispatch (TAO_ServerRequest &request, request.tao_send_reply_exception (ex); } } - ACE_ENDTRY; ::CORBA::release (dsi_request); } CORBA::RepositoryId TAO_DynamicImplementation::get_id_from_primary_interface ( - ACE_ENV_SINGLE_ARG_DECL + ) { // If this method is called outside of the @@ -215,7 +206,7 @@ TAO_DynamicImplementation::get_id_from_primary_interface ( return this->_primary_interface (poa_current_impl->object_id (), poa.in () - ACE_ENV_ARG_PARAMETER); + ); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/DynamicInterface/Dynamic_Implementation.h b/TAO/tao/DynamicInterface/Dynamic_Implementation.h index b9c17c21ea2..53b700b7c6e 100644 --- a/TAO/tao/DynamicInterface/Dynamic_Implementation.h +++ b/TAO/tao/DynamicInterface/Dynamic_Implementation.h @@ -60,7 +60,7 @@ public: /// incarnated by the DSI servant and performs the processing /// necessary to execute the request. virtual void invoke (CORBA::ServerRequest_ptr request - ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 0; + ) = 0; /// The _primary_interface() method receives an ObjectId value and a /// POA_ptr as input parameters and returns a valid RepositoryId @@ -68,19 +68,19 @@ public: virtual CORBA::RepositoryId _primary_interface ( const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa - ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) = 0; /// Local implementation of the CORBA::Object::_is_a method. virtual CORBA::Boolean _is_a (const char *logical_type_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); /// Returns a CORBA::Object_ptr for the target object. - CORBA::Object_ptr _this (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + CORBA::Object_ptr _this (void); /// Query the Interface Repository for the interface definition. virtual CORBA::InterfaceDef_ptr _get_interface ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + void ); protected: @@ -92,17 +92,17 @@ protected: virtual void *_downcast (const char *repository_id); /// This is an auxiliary method for _this() and _narrow(). - virtual TAO_Stub *_create_stub (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + virtual TAO_Stub *_create_stub (void); /// Turns around and calls invoke. virtual void _dispatch (TAO_ServerRequest &request, void *context - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); private: /// Encapsulates code common to _is_a(), _get_interface() and _create_stub(). CORBA::RepositoryId get_id_from_primary_interface ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + void ); }; diff --git a/TAO/tao/DynamicInterface/ExceptionList.cpp b/TAO/tao/DynamicInterface/ExceptionList.cpp index 18de9aee9d0..ee0c7c39354 100644 --- a/TAO/tao/DynamicInterface/ExceptionList.cpp +++ b/TAO/tao/DynamicInterface/ExceptionList.cpp @@ -52,8 +52,7 @@ CORBA::ExceptionList::add_consume (CORBA::TypeCode_ptr tc) } CORBA::TypeCode_ptr -CORBA::ExceptionList::item (CORBA::ULong slot - ACE_ENV_ARG_DECL) +CORBA::ExceptionList::item (CORBA::ULong slot) { CORBA::TypeCode_ptr *tc = 0; @@ -69,10 +68,9 @@ CORBA::ExceptionList::item (CORBA::ULong slot } void -CORBA::ExceptionList::remove (CORBA::ULong - ACE_ENV_ARG_DECL) +CORBA::ExceptionList::remove (CORBA::ULong) { - ACE_THROW (CORBA::NO_IMPLEMENT ()); + throw ::CORBA::NO_IMPLEMENT (); } CORBA::ExceptionList_ptr @@ -97,7 +95,7 @@ CORBA::ExceptionList::_incr_refcnt (void) void CORBA::ExceptionList::_decr_refcnt (void) { - CORBA::ULong refcount = --this->ref_count_; + CORBA::ULong const refcount = --this->ref_count_; if (refcount == 0) { diff --git a/TAO/tao/DynamicInterface/ExceptionList.h b/TAO/tao/DynamicInterface/ExceptionList.h index f88c3eca2d8..1fd0259e5d0 100644 --- a/TAO/tao/DynamicInterface/ExceptionList.h +++ b/TAO/tao/DynamicInterface/ExceptionList.h @@ -97,12 +97,10 @@ namespace CORBA void add_consume (CORBA::TypeCode_ptr tc); /// Return the typecode at slot i. Raises the "Bounds" exception. - CORBA::TypeCode_ptr item (CORBA::ULong slot - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + CORBA::TypeCode_ptr item (CORBA::ULong slot); /// Remove the typecode at slot i. Raises the "Bounds" exception. - void remove (CORBA::ULong slot - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + void remove (CORBA::ULong slot); /// Increment and decrement ref counts. void _incr_refcnt (void); diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp index 34519883c93..0583a1769e7 100644 --- a/TAO/tao/DynamicInterface/Request.cpp +++ b/TAO/tao/DynamicInterface/Request.cpp @@ -68,7 +68,7 @@ CORBA::Request::Request (CORBA::Object_ptr obj, CORBA::NamedValue_ptr result, CORBA::Flags flags, CORBA::ExceptionList_ptr exceptions - ACE_ENV_ARG_DECL_NOT_USED) + ) : target_ (CORBA::Object::_duplicate (obj)), orb_ (CORBA::ORB::_duplicate (orb)), opname_ (CORBA::string_dup (op)), @@ -97,7 +97,7 @@ CORBA::Request::Request (CORBA::Object_ptr obj, CORBA::Request::Request (CORBA::Object_ptr obj, CORBA::ORB_ptr orb, const CORBA::Char *op - ACE_ENV_ARG_DECL_NOT_USED) + ) : target_ (CORBA::Object::_duplicate (obj)), orb_ (CORBA::ORB::_duplicate (orb)), opname_ (CORBA::string_dup (op)), @@ -142,7 +142,7 @@ CORBA::Request::~Request (void) // flow in some exotic situations. void -CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL) +CORBA::Request::invoke (void) { TAO::NamedValue_Argument _tao_retval (this->result_); @@ -165,8 +165,7 @@ CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL) _tao_call.invoke (0, 0 - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); // If this request was created by a gateway, then result_ // and/or args_ are shared by a CORBA::ServerRequest, whose @@ -176,7 +175,7 @@ CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL) } void -CORBA::Request::send_oneway (ACE_ENV_SINGLE_ARG_DECL) +CORBA::Request::send_oneway (void) { TAO::NamedValue_Argument _tao_retval (this->result_); @@ -201,12 +200,11 @@ CORBA::Request::send_oneway (ACE_ENV_SINGLE_ARG_DECL) _tao_call.invoke (0, 0 - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } void -CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL) +CORBA::Request::send_deferred (void) { { ACE_GUARD (TAO_SYNCH_MUTEX, @@ -246,28 +244,25 @@ CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL) _tao_call.invoke (0, 0 - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } void -CORBA::Request::get_response (ACE_ENV_SINGLE_ARG_DECL) +CORBA::Request::get_response (void) { while (!this->response_received_) { - (void) this->orb_->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + (void) this->orb_->perform_work (); } if (this->lazy_evaluation_) { - this->args_->evaluate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->args_->evaluate (); } } CORBA::Boolean -CORBA::Request::poll_response (ACE_ENV_SINGLE_ARG_DECL) +CORBA::Request::poll_response (void) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, @@ -280,8 +275,7 @@ CORBA::Request::poll_response (ACE_ENV_SINGLE_ARG_DECL) // and the response never gets received, so let the ORB do an // atom of work, if necessary, each time we poll. ACE_Time_Value tv (0, 0); - (void) this->orb_->perform_work (&tv ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + (void) this->orb_->perform_work (&tv); } return this->response_received_; @@ -290,7 +284,7 @@ CORBA::Request::poll_response (ACE_ENV_SINGLE_ARG_DECL) void CORBA::Request::handle_response (TAO_InputCDR &incoming, CORBA::ULong reply_status - ACE_ENV_ARG_DECL) + ) { // If this request was created by a gateway, then result_ // and/or args_ are shared by a CORBA::ServerRequest, whose @@ -305,15 +299,13 @@ CORBA::Request::handle_response (TAO_InputCDR &incoming, { // We can be sure that the impl is a TAO::Unknown_IDL_Type. this->result_->value ()->impl ()->_tao_decode (incoming - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } this->args_->_tao_incoming_cdr (incoming, CORBA::ARG_OUT | CORBA::ARG_INOUT, this->lazy_evaluation_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); { ACE_GUARD (TAO_SYNCH_MUTEX, diff --git a/TAO/tao/DynamicInterface/Request.h b/TAO/tao/DynamicInterface/Request.h index f7c13f398ab..e4e19e434e1 100644 --- a/TAO/tao/DynamicInterface/Request.h +++ b/TAO/tao/DynamicInterface/Request.h @@ -127,7 +127,7 @@ namespace CORBA * recommended as the user may not be able to propagate the * exceptions. */ - void invoke (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + void invoke (void); /// Send a oneway request. /** @@ -135,7 +135,7 @@ namespace CORBA * recommended as the user may not be able to propagate the * exceptions. */ - void send_oneway (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + void send_oneway (void); /** * @name The 'deferred synchronous' methods. @@ -143,15 +143,15 @@ namespace CORBA * The 'deferred synchronous' methods. */ //@{ - void send_deferred (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); - void get_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); - CORBA::Boolean poll_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + void send_deferred (void); + void get_response (void); + CORBA::Boolean poll_response (void); //@} /// Callback method for deferred synchronous requests. void handle_response (TAO_InputCDR &incoming, CORBA::ULong reply_status - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); /// Pseudo object methods. static CORBA::Request* _duplicate (CORBA::Request*); @@ -200,12 +200,12 @@ namespace CORBA CORBA::NamedValue_ptr result, CORBA::Flags flags, CORBA::ExceptionList_ptr exceptions - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); Request (CORBA::Object_ptr obj, CORBA::ORB_ptr orb, const CORBA::Char *op - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); ~Request (void); diff --git a/TAO/tao/DynamicInterface/Request.inl b/TAO/tao/DynamicInterface/Request.inl index f540c8652d6..ccd7468d82c 100644 --- a/TAO/tao/DynamicInterface/Request.inl +++ b/TAO/tao/DynamicInterface/Request.inl @@ -93,43 +93,37 @@ CORBA::Request::contexts (void) ACE_INLINE CORBA::Any & CORBA::Request::add_in_arg (void) { - ACE_DECLARE_NEW_CORBA_ENV; - return this->args_->add_element (CORBA::ARG_IN ACE_ENV_ARG_PARAMETER)->any_; + return this->args_->add_element (CORBA::ARG_IN)->any_; } ACE_INLINE CORBA::Any & CORBA::Request::add_in_arg (const CORBA::Char *name) { - ACE_DECLARE_NEW_CORBA_ENV; - return this->args_->add_item (name, CORBA::ARG_IN ACE_ENV_ARG_PARAMETER)->any_; + return this->args_->add_item (name, CORBA::ARG_IN)->any_; } ACE_INLINE CORBA::Any & CORBA::Request::add_inout_arg (void) { - ACE_DECLARE_NEW_CORBA_ENV; - return this->args_->add_element (CORBA::ARG_INOUT ACE_ENV_ARG_PARAMETER)->any_; + return this->args_->add_element (CORBA::ARG_INOUT)->any_; } ACE_INLINE CORBA::Any & CORBA::Request::add_inout_arg (const CORBA::Char *name) { - ACE_DECLARE_NEW_CORBA_ENV; - return this->args_->add_item (name, CORBA::ARG_INOUT ACE_ENV_ARG_PARAMETER)->any_; + return this->args_->add_item (name, CORBA::ARG_INOUT)->any_; } ACE_INLINE CORBA::Any & CORBA::Request::add_out_arg (void) { - ACE_DECLARE_NEW_CORBA_ENV; - return this->args_->add_element (CORBA::ARG_OUT ACE_ENV_ARG_PARAMETER)->any_; + return this->args_->add_element (CORBA::ARG_OUT)->any_; } ACE_INLINE CORBA::Any & CORBA::Request::add_out_arg (const CORBA::Char *name) { - ACE_DECLARE_NEW_CORBA_ENV; - return this->args_->add_item (name, CORBA::ARG_OUT ACE_ENV_ARG_PARAMETER)->any_; + return this->args_->add_item (name, CORBA::ARG_OUT)->any_; } ACE_INLINE void diff --git a/TAO/tao/DynamicInterface/Server_Request.cpp b/TAO/tao/DynamicInterface/Server_Request.cpp index 5582886beee..b12895cc4cb 100644 --- a/TAO/tao/DynamicInterface/Server_Request.cpp +++ b/TAO/tao/DynamicInterface/Server_Request.cpp @@ -83,12 +83,12 @@ CORBA::ServerRequest::~ServerRequest (void) // inout/out/return values later on. void CORBA::ServerRequest::arguments (CORBA::NVList_ptr &list - ACE_ENV_ARG_DECL) + ) { // arguments() must be called before either of these. if (this->params_ != 0 || this->exception_ != 0) { - ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 7, CORBA::COMPLETED_NO)); + throw ( ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 7, CORBA::COMPLETED_NO)); } // Save params for later use when marshaling the reply. @@ -97,8 +97,7 @@ CORBA::ServerRequest::arguments (CORBA::NVList_ptr &list this->params_->_tao_incoming_cdr (*this->orb_server_request_.incoming (), CORBA::ARG_IN | CORBA::ARG_INOUT, this->lazy_evaluation_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); // Pass this alignment back to the TAO_ServerRequest. this->orb_server_request_.dsi_nvlist_align ( @@ -111,22 +110,21 @@ CORBA::ServerRequest::arguments (CORBA::NVList_ptr &list // only after the parameter list has been provided (maybe empty). void CORBA::ServerRequest::set_result (const CORBA::Any &value - ACE_ENV_ARG_DECL) + ) { // Setting a result when another result already exists or if an exception // exists or before the args have been processeed is an error. if (this->retval_ != 0 || this->exception_ != 0 || this->params_ == 0) { - ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO)); + throw ( ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO)); } ACE_NEW_THROW_EX (this->retval_, CORBA::Any (value), CORBA::NO_MEMORY ()); - ACE_CHECK; } - // NOTE: if "ACE_ENV_SINGLE_ARG_PARAMETER" is set, there has been a system exception, + // NOTE: if "" is set, there has been a system exception, // and it will take precedence over exceptions reported using the // set_exception() mechanism of the ServerRequest, which we assume // the application writer will use to report only user exceptions. @@ -136,25 +134,23 @@ CORBA::ServerRequest::set_result (const CORBA::Any &value // Store the exception value. void CORBA::ServerRequest::set_exception (const CORBA::Any &value - ACE_ENV_ARG_DECL) + ) { CORBA::TypeCode_var tc = value.type (); - CORBA::TCKind const kind = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + CORBA::TCKind const kind = tc->kind (); // set_exception() can be called at any time, but the Any arg MUST // contain an exception. if (kind != CORBA::tk_except) { - ACE_THROW (CORBA::BAD_PARAM (CORBA::OMGVMCID | 21, + throw ( ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 21, CORBA::COMPLETED_MAYBE)); } ACE_NEW_THROW_EX (this->exception_, CORBA::Any (value), CORBA::NO_MEMORY ()); - ACE_CHECK; this->orb_server_request_.exception_type (TAO_GIOP_USER_EXCEPTION); } @@ -162,7 +158,7 @@ CORBA::ServerRequest::set_exception (const CORBA::Any &value // This method will be utilized by the DSI servant to marshal outgoing // parameters. void -CORBA::ServerRequest::dsi_marshal (ACE_ENV_SINGLE_ARG_DECL) +CORBA::ServerRequest::dsi_marshal (void) { // There was a user exception, no need to marshal any parameters. if (this->sent_gateway_exception_) @@ -194,9 +190,8 @@ CORBA::ServerRequest::dsi_marshal (ACE_ENV_SINGLE_ARG_DECL) this->params_->_tao_encode ( *this->orb_server_request_.outgoing (), CORBA::ARG_INOUT | CORBA::ARG_OUT - ACE_ENV_ARG_PARAMETER + ); - ACE_CHECK; } } else diff --git a/TAO/tao/DynamicInterface/Server_Request.h b/TAO/tao/DynamicInterface/Server_Request.h index 39cae0c7b82..b7d94dd59e1 100644 --- a/TAO/tao/DynamicInterface/Server_Request.h +++ b/TAO/tao/DynamicInterface/Server_Request.h @@ -78,7 +78,7 @@ namespace CORBA /// parameter list ... on return, their values are available; the /// list fed in has typecodes and (perhap) memory assigned. void arguments (CORBA::NVList_ptr &list - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); /// Implementation uses this to provide the operation result /// ... illegal if exception() was called or params() was not called. @@ -86,7 +86,7 @@ namespace CORBA /// XXX Implementation should be able to assume response has been /// sent when this returns, and reclaim memory it allocated. void set_result (const CORBA::Any &value - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); /// Implementation uses this to provide the exception value which is /// the only result of this particular invocation. @@ -94,7 +94,7 @@ namespace CORBA /// XXX Implementation should be able to assume response has been /// sent when this returns, and reclaim memory it allocated. void set_exception (const CORBA::Any &value - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + ); // = Get various universal call attributes. @@ -106,7 +106,7 @@ namespace CORBA // basic CORBA Object Model. /// Marshal outgoing parameters. - void dsi_marshal (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + void dsi_marshal (void); /// Accessor for the Context member. CORBA::Context_ptr ctx (void) const; diff --git a/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp b/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp index 81d9935832f..88e3d466953 100644 --- a/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp +++ b/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp @@ -89,17 +89,17 @@ CORBA::UnknownUserException::_tao_duplicate (void) const void CORBA::UnknownUserException::_tao_encode ( TAO_OutputCDR & - ACE_ENV_ARG_DECL + ) const { - ACE_THROW (CORBA::MARSHAL ()); + throw ::CORBA::MARSHAL (); } void CORBA::UnknownUserException::_tao_decode (TAO_InputCDR & - ACE_ENV_ARG_DECL) + ) { - ACE_THROW (CORBA::MARSHAL ()); + throw ::CORBA::MARSHAL (); } CORBA::TypeCode_ptr diff --git a/TAO/tao/DynamicInterface/Unknown_User_Exception.h b/TAO/tao/DynamicInterface/Unknown_User_Exception.h index ab618060852..c97f08f5dcf 100644 --- a/TAO/tao/DynamicInterface/Unknown_User_Exception.h +++ b/TAO/tao/DynamicInterface/Unknown_User_Exception.h @@ -80,9 +80,9 @@ namespace CORBA virtual CORBA::Exception *_tao_duplicate (void) const; virtual void _tao_encode (TAO_OutputCDR &cdr - ACE_ENV_ARG_DECL) const; + ) const; virtual void _tao_decode (TAO_InputCDR &cdr - ACE_ENV_ARG_DECL); + ); /// Narrow to an UnknowUserException. static UnknownUserException * _downcast (CORBA::Exception *ex); -- cgit v1.2.1