diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-01-18 21:55:29 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-01-18 21:55:29 +0000 |
commit | 06ee23ce69b30f195ac6fa30908473a0b52b1043 (patch) | |
tree | 4f3e345abf0f094df4134dbff9bcd52a5ecb54f7 | |
parent | 163852e7ecbe20deed0c431a0e03be844afa06a8 (diff) | |
download | ATCD-06ee23ce69b30f195ac6fa30908473a0b52b1043.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface.cpp | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/upcall_command_ss.cpp | 155 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp | 82 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp | 162 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_codegen.h | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_interface.h | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_interface/upcall_command_ss.h | 51 | ||||
-rw-r--r-- | TAO/tao/Invocation_Adapter.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Invocation_Adapter.h | 29 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 5 |
14 files changed, 109 insertions, 421 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 353ef4c0549..40a9a7e98f6 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -41,9 +41,7 @@ Thu Nov 11 20:41:05 2004 Ossama Othman <ossama@dre.vanderbilt.edu> Enabled and fixed support for generation of "SArg_Traits" template specializations in generated skeleton sources - * TAO_IDL/be/be_visitor_interface/upcall_command_ss.cpp: * TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp: - * TAO_IDL/be_include/be_visitor_interface/upcall_command_ss.h: * TAO_IDL/be_include/be_visitor_operation/upcall_command_ss.h: New visitors that generate operation-specific concrete @@ -55,12 +53,8 @@ Thu Nov 11 20:41:05 2004 Ossama Othman <ossama@dre.vanderbilt.edu> Removed remaining vestiges of the now non-existent interceptor related visitors. - * TAO_IDL/be/be_visitor_interface.cpp: * TAO_IDL/be/be_visitor_operation.cpp: * TAO_IDL/be/be_visitor_attribute/attribute.cpp: - * TAO_IDL/be/be_visitor_interface/interface.cpp: - * TAO_IDL/be/be_visitor_interface/interface_ss.cpp: - * TAO_IDL/be_include/be_visitor_interface.h: * TAO_IDL/be_include/be_visitor_operation.h: Likewise. diff --git a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp index 49d11153d22..6538562c977 100644 --- a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp @@ -147,12 +147,6 @@ be_visitor_attribute::visit_attribute (be_attribute *node) status = get_op.accept (&visitor); break; } - case TAO_CodeGen::TAO_INTERFACE_UPCALL_COMMAND_SS: - { - be_visitor_operation_upcall_command_ss visitor (&ctx); - status = get_op.accept (&visitor); - break; - } case TAO_CodeGen::TAO_ROOT_TIE_SH: { be_visitor_operation_tie_sh visitor (&ctx); @@ -322,12 +316,6 @@ be_visitor_attribute::visit_attribute (be_attribute *node) status = set_op.accept (&visitor); break; } - case TAO_CodeGen::TAO_INTERFACE_UPCALL_COMMAND_SS: - { - be_visitor_operation_upcall_command_ss visitor (&ctx); - status = set_op.accept (&visitor); - break; - } case TAO_CodeGen::TAO_ROOT_TIE_SH: { be_visitor_operation_tie_sh visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp index b0eb030f19b..96343041ea4 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface.cpp @@ -68,7 +68,6 @@ #include "be_visitor_interface/smart_proxy_ch.cpp" #include "be_visitor_interface/smart_proxy_cs.cpp" #include "be_visitor_interface/ami_interface_ch.cpp" -#include "be_visitor_interface/upcall_command_ss.cpp" // Proxy Brokers #include "be_visitor_interface/strategized_proxy_broker_sh.cpp" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp index 0bb04fcd628..054f7b04885 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp @@ -95,10 +95,6 @@ be_visitor_interface::visit_scope (be_scope *node) helper = be_visitor_interface_ss::gen_abstract_ops_helper; break; - case TAO_CodeGen::TAO_INTERFACE_UPCALL_COMMAND_SS: - helper = - be_visitor_interface_upcall_command_ss::gen_abstract_ops_helper; - break; case TAO_CodeGen::TAO_INTERFACE_DIRECT_PROXY_IMPL_SS: helper = be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper; @@ -435,12 +431,6 @@ be_visitor_interface::visit_operation (be_operation *node) status = node->accept (&visitor); break; } - case TAO_CodeGen::TAO_INTERFACE_UPCALL_COMMAND_SS: - { - be_visitor_operation_upcall_command_ss visitor (&ctx); - status = node->accept (&visitor); - break; - } case TAO_CodeGen::TAO_INTERFACE_THRU_POA_PROXY_IMPL_SH: case TAO_CodeGen::TAO_INTERFACE_DIRECT_PROXY_IMPL_SH: { diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index dc3e32d4230..754c5424990 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -618,18 +618,6 @@ be_visitor_interface_ss::generate_proxy_classes (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); be_visitor_context ctx = *this->ctx_; - ctx.state (TAO_CodeGen::TAO_INTERFACE_UPCALL_COMMAND_SS); - be_visitor_interface_upcall_command_ss ii_visitor (&ctx); - - if (node->accept (&ii_visitor) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_interface_ss::" - "generate_proxy_classes - " - "codegen for upcall command classes failed\n"), - -1); - } - // Strategized Proxy Broker Implementation. if (be_global->gen_thru_poa_collocation () || be_global->gen_direct_collocation ()) diff --git a/TAO/TAO_IDL/be/be_visitor_interface/upcall_command_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/upcall_command_ss.cpp deleted file mode 100644 index ac8f05488ab..00000000000 --- a/TAO/TAO_IDL/be/be_visitor_interface/upcall_command_ss.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO IDL -// -// = FILENAME -// upcall_command_ss.cpp -// -// = DESCRIPTION -// Visitor that generates operation-specific TAO::Upcall_Command -// objects in skeletons. -// -// = AUTHOR -// Ossama Othman -// -// ============================================================================ - - -ACE_RCSID (be_visitor_interface, - upcall_command_ss, - "$Id$") - - -be_visitor_interface_upcall_command_ss -::be_visitor_interface_upcall_command_ss (be_visitor_context * ctx) - : be_visitor_interface (ctx) -{ -} - -be_visitor_interface_upcall_command_ss -::~be_visitor_interface_upcall_command_ss (void) -{ -} - -int -be_visitor_interface_upcall_command_ss::visit_interface (be_interface * node) -{ - if (node->is_local ()) - { - return 0; - } - - TAO_OutStream * const os = this->ctx_->stream (); - - *os << be_nl << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - - // Generate code for the interface definition by traversing thru the - // elements of its scope. We depend on the front-end to have made sure - // that only legal syntactic elements appear in our scope. - - os->reset (); - - // Generate code for the interface definition by traversing thru the - // elements of its scope. We depend on the front-end to have made sure - // that only legal syntactic elements appear in our scope. - if (this->visit_scope (node) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_upcall_command_ss::" - "visit_interface - " - "codegen for scope failed\n"), - -1); - } - - return 0; -} - -int -be_visitor_interface_upcall_command_ss::visit_component (be_component * node) -{ - return this->visit_interface (node); -} - -int -be_visitor_interface_upcall_command_ss::gen_abstract_ops_helper ( - be_interface * node, - be_interface * base, - TAO_OutStream * os) -{ - if (!base->is_abstract ()) - { - return 0; - } - - be_visitor_context ctx; - ctx.stream (os); - ctx.state (TAO_CodeGen::TAO_INTERFACE_UPCALL_COMMAND_SS); - - for (UTL_ScopeActiveIterator si (base, UTL_Scope::IK_decls); - !si.is_done (); - si.next ()) - { - AST_Decl * const d = si.item (); - - if (d == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_upcall_command_ss::" - "gen_abstract_ops_helper - " - "bad node in this scope\n"), - -1); - } - - UTL_ScopedName *item_new_name = 0; - ACE_NEW_RETURN (item_new_name, - UTL_ScopedName (d->local_name ()->copy (), - 0), - -1); - - UTL_ScopedName *base = (UTL_ScopedName *)node->name ()->copy (); - base->nconc (item_new_name); - - if (d->node_type () == AST_Decl::NT_op) - { - AST_Operation *op = AST_Operation::narrow_from_decl (d); - be_operation new_op (op->return_type (), - op->flags (), - 0, - op->is_local (), - op->is_abstract ()); - new_op.set_defined_in (node); - be_visitor_interface::add_abstract_op_args (op, - new_op); - new_op.set_name (base); - be_visitor_operation_upcall_command_ss op_visitor (&ctx); - op_visitor.visit_operation (&new_op); - } - else if (d->node_type () == AST_Decl::NT_attr) - { - AST_Attribute *attr = AST_Attribute::narrow_from_decl (d); - be_attribute new_attr (attr->readonly (), - attr->field_type (), - 0, - attr->is_local (), - attr->is_abstract ()); - new_attr.set_defined_in (node); - new_attr.set_name (base); - new_attr.be_add_get_exceptions (attr->get_get_exceptions ()); - new_attr.be_add_set_exceptions (attr->get_set_exceptions ()); - be_visitor_attribute attr_visitor (&ctx); - attr_visitor.visit_attribute (&new_attr); - ctx.attribute (0); - } - - base->destroy (); - delete base; - base = 0; - } - - return 0; -} diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index 762c5cae928..0f68a3e6e0d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -182,9 +182,9 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, *os << node->local_name () << "_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &_tao_server_request," << be_nl - << "void *_tao_servant," << be_nl - << "void * TAO_INTERCEPTOR (_tao_servant_upcall)" << be_nl + << "TAO_ServerRequest &server_request," << be_nl + << "void *servant," << be_nl + << "void * TAO_INTERCEPTOR (servant_upcall)" << be_nl << "ACE_ENV_ARG_DECL" << be_uidt_nl << ")" << be_uidt_nl; @@ -204,10 +204,10 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, } // Get the right object implementation. - *os << intf->full_skel_name () << " * const _tao_impl =" << be_idt_nl + *os << intf->full_skel_name () << " * const impl =" << be_idt_nl << "static_cast<" << be_idt << be_idt_nl << intf->full_skel_name () << " *> (" << be_nl - << "_tao_servant" << be_uidt_nl + << "servant" << be_uidt_nl << ");" << be_uidt << be_uidt_nl << be_nl; @@ -225,17 +225,16 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, this->gen_skel_body_arglist (node, os); *os << be_nl << be_nl - << "TAO::Argument * const _tao_args [] =" << be_idt_nl + << "TAO::Argument * const args[] =" << be_idt_nl << "{" << be_idt_nl - << "&_tao_retval"; - - AST_Argument *arg = 0; + << "&retval"; for (UTL_ScopeActiveIterator arg_list_iter (node, UTL_Scope::IK_decls); ! arg_list_iter.is_done (); arg_list_iter.next ()) { - arg = AST_Argument::narrow_from_decl (arg_list_iter.item ()); + AST_Argument * const arg = + AST_Argument::narrow_from_decl (arg_list_iter.item ()); *os << "," << be_nl << "&_tao_" << arg->local_name (); @@ -244,64 +243,39 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, *os << be_uidt_nl << "};" << be_uidt_nl << be_nl; - *os << "static size_t const _tao_nargs = " + *os << "static size_t const nargs = " << (node->argument_count () + 1) << ";" << be_nl << be_nl; - *os << "TAO_" << node->flat_name (); - - // We need the interface node in which this operation was defined. - // However, if this operation node was an attribute node in - // disguise, we get this information from the context and add a - // "_get"/"_set" to the flat name to get around the problem of - // overloaded methods which are generated for attributes. - if (this->ctx_->attribute ()) - { - be_type * const bt = be_type::narrow_from_decl (node->return_type ()); - - if (!bt) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_upcall_command_ss::" - "visit_operation - " - "Bad return type\n"), - -1); - } - // Grab the right visitor to generate the return type if its not - // void it means it is not the accessor. - if (!this->void_return_type (bt)) - { - *os << "_get"; - } - else - { - *os << "_set"; - } - } + // Generate the local class encapsulating the actual servant upcall + // command/invocation. + be_visitor_operation_upcall_command_ss upcall_command_visitor (this->ctx_); + upcall_command_visitor.visit_operation (node); - *os << "_Upcall_Command _tao_upcall_command (" << be_idt_nl - << " _tao_impl"; + *os << be_nl + << "Upcall_Command command (" << be_idt_nl + << " impl"; if (!node->void_return_type () || node->argument_count () > 0) { - *os << ", _tao_args"; + *os << ", args"; } *os << ");" << be_uidt_nl << be_nl; - *os << "TAO::Upcall_Wrapper _tao_upcall_wrapper;" << be_nl - << "_tao_upcall_wrapper.upcall (_tao_server_request" << be_nl - << " , _tao_args" << be_nl - << " , _tao_nargs" << be_nl - << " , _tao_upcall_command" << be_nl + *os << "TAO::Upcall_Wrapper upcall_wrapper;" << be_nl + << "upcall_wrapper.upcall (server_request" << be_nl + << " , args" << be_nl + << " , nargs" << be_nl + << " , command" << be_nl << "\n#if TAO_HAS_INTERCEPTORS == 1" << be_nl - << " , _tao_servant_upcall" << be_nl - << " , _tao_impl" << be_nl - << " , _tao_exceptions" << be_nl - << " , _tao_nexceptions" + << " , servant_upcall" << be_nl + << " , impl" << be_nl + << " , exceptions" << be_nl + << " , nexceptions" << "\n#endif /* TAO_HAS_INTERCEPTORS == 1 */" << be_nl << be_nl - << " ACE_ENV_ARG_PARAMETER);" << be_nl + << " ACE_ENV_ARG_PARAMETER);" << be_nl << "ACE_CHECK;" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp index b50f6e72e4b..9dd7502405a 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp @@ -17,8 +17,6 @@ // // ============================================================================ -#include <string> - ACE_RCSID (be_visitor_operation, upcall_command_ss, @@ -40,16 +38,15 @@ be_visitor_operation_upcall_command_ss int be_visitor_operation_upcall_command_ss::visit_operation (be_operation * node) { - TAO_OutStream * os = this->ctx_->stream (); + TAO_OutStream & os = *this->ctx_->stream (); - be_type * bt = 0; be_visitor_context ctx (*this->ctx_); // save the node. this->ctx_->node (node); - *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl + << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; // Generate the operation-specific TAO::Upcall_Command concrete class. @@ -66,95 +63,59 @@ be_visitor_operation_upcall_command_ss::visit_operation (be_operation * node) -1); } - std::string class_name; - class_name = "TAO_" + std::string (node->flat_name ()); - - // We need the interface node in which this operation was - // defined. However, if this operation node was an attribute node - // in disguise, we get this information from the context and add a - // "_get"/"_set" to the flat name to get around the problem of - // overloaded methods which are generated for attributes. - if (this->ctx_->attribute ()) - { - bt = be_type::narrow_from_decl (node->return_type ()); - - if (!bt) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_upcall_command_ss::" - "visit_operation - " - "Bad return type\n"), - -1); - } - - // Grab the right visitor to generate the return type if its not - // void it means it is not the accessor. - if (!this->void_return_type (bt)) - { - class_name += "_get"; - } - else - { - class_name += "_set"; - } - } - - class_name += "_Upcall_Command"; - // Generate an operation-specific concrete TAO::Upcall_Command // class, an instance of which will be invoked by the // TAO::Upcall_Wrapper object. - *os << "class " << class_name.c_str () << be_nl - <<" : public TAO::Upcall_Command" << be_nl - << "{" << be_nl - << "public:" << be_idt_nl << be_nl; + os << "class Upcall_Command" << be_nl + << " : public TAO::Upcall_Command" << be_nl + << "{" << be_nl + << "public:" << be_idt_nl << be_nl; // Generate constructor - *os << "inline " << class_name.c_str () - << " (" << be_idt_nl - << intf->full_skel_name () << " * servant"; + os << "inline Upcall_Command (" << be_idt_nl + << intf->full_skel_name () << " * servant"; // No need to accept an argument array parameter if the operation // has no arguments. if (!node->void_return_type () || node->argument_count () > 0) { - *os << "," << be_nl - << "TAO::Argument * const args[])" << be_nl; + os << "," << be_nl + << "TAO::Argument * const args[])" << be_nl; } else { - *os << ")" << be_nl; + os << ")" << be_nl; } - *os << ": servant_ (servant)"; + os << ": servant_ (servant)"; // If the operation has no arguments don't generate a member // initializer for the class argument array member/attribute. if (!node->void_return_type () || node->argument_count () > 0) { - *os << be_nl - << ", args_ (args)"; + os << be_nl + << ", args_ (args)"; } - *os << be_uidt_nl; + os << be_uidt_nl; - *os << "{" << be_nl - << "}" << be_nl << be_nl; + os << "{" << be_nl + << "}" << be_nl << be_nl; // Generate execute() method. - *os << "virtual void execute (ACE_ENV_SINGLE_ARG_DECL)" << be_nl - << "{" << be_idt_nl; + os << "virtual void execute (ACE_ENV_SINGLE_ARG_DECL)" << be_nl + << "{" << be_idt_nl; if (!node->void_return_type ()) { - *os << "static_cast<TAO::SArg_Traits< "; + os << "static_cast<TAO::SArg_Traits< "; this->gen_arg_template_param_name (node, node->return_type (), - os); + &os); - *os << ">::ret_val *> (this->args_[0])->arg () =" << be_idt_nl; + os << ">::ret_val *> (this->args_[0])->arg () =" << be_idt_nl; } if (this->gen_upcall (node) == -1) @@ -164,36 +125,35 @@ be_visitor_operation_upcall_command_ss::visit_operation (be_operation * node) if (!node->void_return_type ()) { - *os << be_uidt; + os << be_uidt; } - *os << be_nl - << "ACE_CHECK;" << be_uidt_nl - << "}" << be_uidt << be_uidt_nl << be_nl; + os << be_nl + << "ACE_CHECK;" << be_uidt_nl + << "}" << be_uidt_nl << be_nl; // Prevent copying/assignment and generation of default copy // constructor and assignment operator. - *os << "private:" << be_idt_nl << be_nl - << class_name.c_str () << " (" - << class_name.c_str () << " const &);" << be_nl - << "void operator= (" << class_name.c_str () << " const &);" - << be_uidt_nl << be_nl; + os << "private:" << be_idt_nl << be_nl + << "Upcall_Comand (" + << "Upcall_Command const &);" << be_nl + << "void operator= (Upcall_Command const &);" + << be_uidt_nl << be_nl; // Generate class attributes. - *os << "private:" << be_idt_nl << be_nl - << intf->full_skel_name () << " * const servant_;"; + os << "private:" << be_idt_nl << be_nl + << intf->full_skel_name () << " * const servant_;"; // Don't bother generating an argument array attribute if the // operation has no arguments. if (!node->void_return_type () || node->argument_count () > 0) { - *os << be_nl - << "TAO::Argument * const * const args_;"; + os << be_nl + << "TAO::Argument * const * const args_;"; } - *os << be_uidt_nl; - - *os << be_uidt_nl << "};" << be_nl; + os << be_uidt_nl + << "};" << be_nl; return 0; } @@ -204,9 +164,9 @@ be_visitor_operation_upcall_command_ss::gen_upcall (be_operation * node) // @@ Based on // be_visitor_operation_thru_poa_proxy_impl_ss::gen_invoke(). - TAO_OutStream * const os = this->ctx_->stream (); + TAO_OutStream & os = *this->ctx_->stream (); - *os << "this->servant_->" << node->local_name () << " (" + os << "this->servant_->" << node->local_name () << " (" << be_idt; UTL_ScopeActiveIterator si (node, @@ -214,9 +174,9 @@ be_visitor_operation_upcall_command_ss::gen_upcall (be_operation * node) if (si.is_done ()) { - *os << be_nl - << "ACE_ENV_SINGLE_ARG_PARAMETER" << be_uidt_nl - << ");"; + os << be_nl + << "ACE_ENV_SINGLE_ARG_PARAMETER" << be_uidt_nl + << ");"; return 0; } @@ -228,36 +188,36 @@ be_visitor_operation_upcall_command_ss::gen_upcall (be_operation * node) AST_Argument * const arg = AST_Argument::narrow_from_decl (si.item ()); - *os << (index == 1 ? "" : ",") << be_nl - << "static_cast<TAO::SArg_Traits< "; + os << (index == 1 ? "" : ",") << be_nl + << "static_cast<TAO::SArg_Traits< "; this->gen_arg_template_param_name (arg, arg->field_type (), - os); + &os); - *os << ">::"; + os << ">::"; switch (arg->direction ()) { - case AST_Argument::dir_IN: - *os << "in"; - break; - case AST_Argument::dir_INOUT: - *os << "inout"; - break; - case AST_Argument::dir_OUT: - *os << "out"; - default: - break; + case AST_Argument::dir_IN: + os << "in"; + break; + case AST_Argument::dir_INOUT: + os << "inout"; + break; + case AST_Argument::dir_OUT: + os << "out"; + default: + break; } - *os << "_arg_val *> (this->args_[" << index << "])->arg ()"; + os << "_arg_val *> (this->args_[" << index << "])->arg ()"; } // End the upcall - *os << be_nl - << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl - << ");"; + os << be_nl + << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl + << ");"; return 0; } diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h index 1c9d534fbe8..85e39756965 100644 --- a/TAO/TAO_IDL/be_include/be_codegen.h +++ b/TAO/TAO_IDL/be_include/be_codegen.h @@ -71,8 +71,6 @@ public: TAO_INTERFACE_SMART_PROXY_CH, TAO_INTERFACE_SMART_PROXY_CS, - TAO_INTERFACE_UPCALL_COMMAND_SS, - TAO_INTERFACE_THRU_POA_PROXY_IMPL_SH, TAO_INTERFACE_THRU_POA_PROXY_IMPL_SS, TAO_INTERFACE_DIRECT_PROXY_IMPL_SH, diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h index 57a1153881d..dc5d7af1daa 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h @@ -43,7 +43,6 @@ #include "be_visitor_interface/ami_interface_ch.h" #include "be_visitor_interface/smart_proxy_ch.h" #include "be_visitor_interface/smart_proxy_cs.h" -#include "be_visitor_interface/upcall_command_ss.h" // Proxy Brokers #include "be_visitor_interface/strategized_proxy_broker_sh.h" diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/upcall_command_ss.h b/TAO/TAO_IDL/be_include/be_visitor_interface/upcall_command_ss.h deleted file mode 100644 index bfc91eb6172..00000000000 --- a/TAO/TAO_IDL/be_include/be_visitor_interface/upcall_command_ss.h +++ /dev/null @@ -1,51 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO IDL -// -// = FILENAME -// upcall_command_ss.cpp -// -// = DESCRIPTION -// Visitor that generates operation-specific TAO::Upcall_Command -// objects in skeletons. -// -// = AUTHOR -// Ossama Othman -// -// ============================================================================ - - -#ifndef _BE_INTERFACE_UPCALL_COMMAND_SS_H_ -#define _BE_INTERFACE_UPCALL_COMMAND_SS_H_ - -class be_visitor_interface_upcall_command_ss - : public be_visitor_interface -{ -public: - - /// Constructor - be_visitor_interface_upcall_command_ss (be_visitor_context *ctx); - - /// destructor - virtual ~be_visitor_interface_upcall_command_ss (void); - - /// visit an interface - virtual int visit_interface (be_interface *node); - - /// visit a component - virtual int visit_component (be_component *node); - - /// Helper to generate the declarations for the operations - /// of any abstract parents we may have. - static int gen_abstract_ops_helper (be_interface * node, - be_interface * base, - TAO_OutStream * os); - -}; - -#endif /* _BE_INTERFACE_UPCALL_COMMAND_SS_H_ */ diff --git a/TAO/tao/Invocation_Adapter.cpp b/TAO/tao/Invocation_Adapter.cpp index 6331f852eca..10713f1e01b 100644 --- a/TAO/tao/Invocation_Adapter.cpp +++ b/TAO/tao/Invocation_Adapter.cpp @@ -129,7 +129,7 @@ namespace TAO TAO_Stub * Invocation_Adapter::get_stub (ACE_ENV_SINGLE_ARG_DECL) const { - TAO_Stub *stub = + TAO_Stub * const stub = this->target_->_stubobj (); if (stub == 0) diff --git a/TAO/tao/Invocation_Adapter.h b/TAO/tao/Invocation_Adapter.h index 23e75c89b8a..d9f3ad21c1e 100644 --- a/TAO/tao/Invocation_Adapter.h +++ b/TAO/tao/Invocation_Adapter.h @@ -240,40 +240,43 @@ namespace TAO void set_response_flags (TAO_Stub *stub, TAO_Operation_Details &details); + private: + /// Dont allow default initializations + Invocation_Adapter (void); + + // Prevent copying + Invocation_Adapter (Invocation_Adapter const &); + Invocation_Adapter & operator= (const Invocation_Adapter &); + protected: /// The target object on which this invocation is carried out. CORBA::Object_ptr target_; /// Array of arguments for this operation - Argument **args_; + Argument ** const args_; /// Number of arguments for this operation. /** * This includes the return values too */ - const int number_args_; + int const number_args_; /// Name of the operation. - const char *operation_; + char const * operation_; /// String length of the operation name. - const int op_len_; - + int const op_len_; + /// Collocation proxy broker for this operation. - Collocation_Proxy_Broker *cpb_; + Collocation_Proxy_Broker * const cpb_; /// The invocation type - Invocation_Type type_; + Invocation_Type const type_; /// The invocation mode - Invocation_Mode mode_; - - private: - /// Dont allow default initializations - ACE_UNIMPLEMENTED_FUNC (Invocation_Adapter (void)) + Invocation_Mode const mode_; - ACE_UNIMPLEMENTED_FUNC (Invocation_Adapter & operator= (const Invocation_Adapter &)) }; } // End namespace TAO diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index e7a7373a9b2..4ec49883a3c 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -280,8 +280,9 @@ void TAO_ServantBase::asynchronous_upcall_dispatch (TAO_ServerRequest &req, } // Fetch the skeleton for this operation - if (this->_find (opname, skel, - static_cast <unsigned int> (req.operation_length())) == -1) + if (this->_find (opname, + skel, + static_cast <unsigned int> (req.operation_length())) == -1) { ACE_THROW (CORBA::BAD_OPERATION ()); } |