summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog-99c57
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp34
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp47
-rw-r--r--TAO/TAO_IDL/be/be_visitor_factory.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_ch.cpp270
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_cs.cpp370
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface.cpp16
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp44
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp54
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp (renamed from TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_cs.cpp)82
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp (renamed from TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ch.cpp)12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp (renamed from TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_cs.cpp)24
-rw-r--r--TAO/TAO_IDL/be_include/be_codegen.h24
-rw-r--r--TAO/TAO_IDL/be_include/be_interface.h27
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface.h5
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation.h6
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h (renamed from TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_cs.h)32
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_sh.h (renamed from TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ch.h)16
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ss.h (renamed from TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_cs.h)14
-rw-r--r--TAO/tao/Asynch_Invocation.cpp6
-rw-r--r--TAO/tao/Asynch_Invocation.h15
-rw-r--r--TAO/tao/MessagingC.cpp23
-rw-r--r--TAO/tao/MessagingC.h43
-rw-r--r--TAO/tao/MessagingS.cpp8
-rw-r--r--TAO/tao/MessagingS.h9
-rw-r--r--TAO/tao/MessagingS_T.cpp8
-rw-r--r--TAO/tao/POA_CORBA.h9
-rw-r--r--TAO/tao/PollableC.cpp4
-rw-r--r--TAO/tao/PollableC.h4
-rw-r--r--TAO/tao/PollableS.cpp4
-rw-r--r--TAO/tao/PollableS.h4
-rw-r--r--TAO/tao/Reply_Dispatcher.cpp9
-rw-r--r--TAO/tao/Reply_Dispatcher.h12
-rw-r--r--TAO/tao/Typecode_Constants.cpp12
-rw-r--r--TAO/tests/AMI/client.cpp17
-rw-r--r--TAO/tests/AMI/client.dsp37
-rwxr-xr-xTAO/tests/AMI/run_test.pl113
-rw-r--r--TAO/tests/AMI/server.cpp2
-rw-r--r--TAO/tests/AMI/server.dsp9
-rw-r--r--TAO/tests/AMI/test.idl4
-rw-r--r--TAO/tests/AMI/test_i.cpp5
-rw-r--r--TAO/tests/AMI/test_i.h2
48 files changed, 559 insertions, 1048 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 219506a0e13..d1c22214954 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,60 @@
+Tue Aug 24 5:30:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de>
+
+ * TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp,
+ TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_sh.h
+ TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp,
+ TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ss.h,
+ TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp,
+ TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h:
+ Introduced these files and removed the corresponding *_{cs,ch}.{h,cpp}
+ files because the code is generated in the server header and
+ server implementation files.
+
+ * TAO/TAO_IDL/be/be_codegen.cpp,
+ TAO/TAO_IDL/be/be_interface.cpp,
+ TAO/TAO_IDL/be/be_visitor_factory.cpp,
+ TAO/TAO_IDL/be/be_visitor_interface.cpp,
+ TAO/TAO_IDL/be/be_visitor_operation.cpp,
+ TAO/TAO_IDL/be/be_visitor_interface/interface.cpp,
+ TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp,
+ TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp,
+ TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp,
+ TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp,
+ TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
+ TAO/TAO_IDL/be_include/be_codegen.h,
+ TAO/TAO_IDL/be_include/be_interface.h,
+ TAO/TAO_IDL/be_include/be_visitor_interface.h,
+ TAO/TAO_IDL/be_include/be_visitor_operation.h:
+ Made minor adjustments to have AMI callbacks properly working.
+
+ * TAO/tao/Asynch_Invocation.cpp
+ TAO/tao/Asynch_Invocation.h
+ TAO/tao/Asynch_Invocation.i
+ TAO/tao/MessagingC.cpp
+ TAO/tao/MessagingC.h
+ TAO/tao/MessagingS.cpp
+ TAO/tao/MessagingS.h
+ TAO/tao/MessagingS_T.cpp
+ TAO/tao/POA_CORBA.h
+ TAO/tao/PollableC.cpp
+ TAO/tao/PollableC.h
+ TAO/tao/PollableS.cpp
+ TAO/tao/PollableS.h
+ TAO/tao/Reply_Dispatcher.cpp
+ TAO/tao/Reply_Dispatcher.h
+ TAO/tao/Typecode_Constants.cpp: Introduced the TAO_HAS_AMI_CALLBACK and
+ TAO_HAS_AMI_POLLER define. Removed the TAO_POLLER define.
+
+ * TAO/tests/AMI/client.cpp,
+ TAO/tests/AMI/client.dsp,
+ TAO/tests/AMI/run_test.pl,
+ TAO/tests/AMI/server.cpp,
+ TAO/tests/AMI/server.dsp,
+ TAO/tests/AMI/test.idl,
+ TAO/tests/AMI/test_i.cpp,
+ TAO/tests/AMI/test_i.h: Revived this test again.
+
+
Tue Aug 24 00:47:47 1999 Marina Spivak <marina@cs.wustl.edu>
* TAO/examples/Load_Balancing/Makefile:
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index c05e5d13e74..c7553969330 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -427,6 +427,40 @@ TAO_CodeGen::start_server_header (const char *fname)
this->server_header_->print ("#ifndef %s\n", macro_name);
this->server_header_->print ("#define %s\n\n", macro_name);
+ // Include the Messaging files if AMI is enabled.
+ if (idl_global->ami_call_back () == I_TRUE)
+ {
+ // Include Messaging skeleton file.
+ *this->server_header_ << "#include ";
+
+ if (idl_global->changing_standard_include_files () == 1)
+ *this->server_header_ << "\"";
+ else
+ *this->server_header_ << "<";
+
+ *this->server_header_ << "tao/MessagingS.h";
+
+ if (idl_global->changing_standard_include_files () == 1)
+ *this->server_header_ << "\"\n";
+ else
+ *this->server_header_ << ">\n";
+
+ // Including Asynch Invocation file.
+ *this->server_header_ << "#include ";
+
+ if (idl_global->changing_standard_include_files () == 1)
+ *this->server_header_ << "\"";
+ else
+ *this->server_header_ << "<";
+
+ *this->server_header_ << "tao/Asynch_Invocation.h";
+
+ if (idl_global->changing_standard_include_files () == 1)
+ *this->server_header_ << "\"\n";
+ else
+ *this->server_header_ << ">\n";
+ }
+
// We must include all the skeleton headers corresponding to
// IDL files included by the current IDL file.
// We will use the included IDL file names as they appeared
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index 62e3e62e28f..b3c1f939be4 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -2216,6 +2216,23 @@ be_interface_type_strategy::compute_names (const char *name,
ACE_OS::strlen(suffix)],suffix);
}
+
+TAO_OutStream *
+be_interface_type_strategy::get_out_stream ()
+{
+ // Codegen singleton.
+ TAO_CodeGen *cg = TAO_CODEGEN::instance ();
+
+ // Outstream.
+ return cg->server_skeletons ();
+}
+
+const char *
+be_interface_type_strategy::get_out_stream_fname ()
+{
+ return idl_global->be_get_server_skeleton_fname ();
+}
+
// ****************************************************************
// AMI Hander Strategy
@@ -2320,21 +2337,6 @@ be_interface_ami_handler_strategy::local_coll_name (int type)
return this->local_coll_name_;
}
-TAO_OutStream *
-be_interface_ami_handler_strategy::get_out_stream ()
-{
- // Codegen singleton.
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // Outstream.
- return cg->client_stubs ();
-}
-
-const char *
-be_interface_ami_handler_strategy::get_out_stream_fname ()
-{
- return idl_global->be_get_client_stub_fname ();
-}
// ****************************************************************
// Default Strategy
@@ -2455,21 +2457,6 @@ be_interface_default_strategy::local_coll_name (int type)
return this->local_coll_name_;
}
-TAO_OutStream *
-be_interface_default_strategy::get_out_stream ()
-{
- // Codegen singleton.
- TAO_CodeGen *cg = TAO_CODEGEN::instance ();
-
- // Outstream.
- return cg->server_skeletons ();
-}
-
-const char *
-be_interface_default_strategy::get_out_stream_fname ()
-{
- return idl_global->be_get_server_skeleton_fname ();
-}
// Narrowing
IMPL_NARROW_METHODS3 (be_interface, AST_Interface, be_scope, be_type)
diff --git a/TAO/TAO_IDL/be/be_visitor_factory.cpp b/TAO/TAO_IDL/be/be_visitor_factory.cpp
index acf59ff8878..291fda1be5c 100644
--- a/TAO/TAO_IDL/be/be_visitor_factory.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_factory.cpp
@@ -158,7 +158,7 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx)
return new be_visitor_interface_cs (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_SH:
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SH:
return new be_visitor_interface_sh (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_IH:
@@ -168,26 +168,26 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx)
return new be_visitor_interface_si (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS:
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SS:
return new be_visitor_interface_ss (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_IS:
return new be_visitor_interface_is (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SH:
return new be_visitor_interface_thru_poa_collocated_sh (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS:
+ case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SS:
return new be_visitor_interface_thru_poa_collocated_ss (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_SH:
return new be_visitor_interface_direct_collocated_sh (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
- case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CS:
+ case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_SS:
return new be_visitor_interface_direct_collocated_ss (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_ANY_OP_CH:
@@ -484,7 +484,7 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx)
// @@ Michael: We use 1:1 the server servant code, but
// use different operations.
#if 0
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SH:
return new be_visitor_interface_ami_handler_servant_ch (new_ctx);
case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS:
@@ -500,11 +500,11 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx)
case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_RESULT_ARG:
return new be_visitor_args_ami_handler_result_arg (new_ctx);
- case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CH:
- return new be_visitor_operation_ami_handler_thru_poa_collocated_ch(new_ctx);
+ case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SH:
+ return new be_visitor_operation_ami_handler_thru_poa_collocated_sh(new_ctx);
- case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CS:
- return new be_visitor_operation_ami_handler_thru_poa_collocated_cs(new_ctx);
+ case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SS:
+ return new be_visitor_operation_ami_handler_thru_poa_collocated_ss(new_ctx);
default:
// an error
@@ -672,7 +672,7 @@ TAO_Interpretive_Visitor_Factory::make_visitor (be_visitor_context *ctx)
case TAO_CodeGen::TAO_ARGUMENT_AMI_ARGLIST_CS:
return new be_visitor_args_ami_arglist (new_ctx);
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_SH:
case TAO_CodeGen::TAO_AMI_HANDLER_STUB_OPERATION_CH:
return new be_visitor_operation_ami_handler_operation_ch (new_ctx);
@@ -889,15 +889,15 @@ TAO_Compiled_Visitor_Factory::make_visitor (be_visitor_context *ctx)
case TAO_CodeGen::TAO_AMI_HANDLER_ARGUMENT_MARSHAL_CS:
return new be_visitor_args_ami_handler_compiled_marshal_cs (new_ctx);
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_SH:
case TAO_CodeGen::TAO_AMI_HANDLER_STUB_OPERATION_CH:
return new be_visitor_operation_ami_handler_operation_ch (new_ctx);
case TAO_CodeGen::TAO_AMI_HANDLER_STUB_OPERATION_CS:
return new be_compiled_visitor_operation_ami_handler_operation_cs (new_ctx);
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_CS:
- return new be_compiled_visitor_operation_ami_handler_servant_operation_cs (new_ctx);
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_SS:
+ return new be_compiled_visitor_operation_ami_handler_servant_operation_ss (new_ctx);
case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARGLIST_CH:
case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARGLIST_CS:
diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp
index 836a757e6e2..11a40d9e4f1 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface.cpp
@@ -48,10 +48,4 @@
#include "be_visitor_interface/ami_handler_stub_ch.cpp"
#include "be_visitor_interface/ami_handler_stub_cs.cpp"
-#if 0 /* We are using normal servant code */
-#include "be_visitor_interface/collocated_ami_handler_ch.cpp"
-#include "be_visitor_interface/ami_handler_servant_ch.cpp"
-#include "be_visitor_interface/ami_handler_servant_cs.cpp"
-#endif /* 0 */
-
ACE_RCSID(be, be_visitor_interface, "$Id$")
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_ch.cpp
deleted file mode 100644
index 7e49ffaaa6a..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_ch.cpp
+++ /dev/null
@@ -1,270 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// ami_handler_servant_ch.cpp
-//
-// = DESCRIPTION
-// Visitor generating AMI Reply Handler code for Interfaces in the
-// client header.
-//
-// = AUTHOR
-// Aniruddha Gokhale and Alexander Babu Arulanthu
-// <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-ACE_RCSID(be_visitor_interface, ami_handler_servant_ch, "$Id$")
-
-
-// ************************************************************
-// Interface visitor for server header
-// ************************************************************
-
-be_visitor_interface_ami_handler_servant_ch::be_visitor_interface_ami_handler_servant_ch (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_ami_handler_servant_ch::~be_visitor_interface_ami_handler_servant_ch (void)
-{
-}
-
-int
-be_visitor_interface_ami_handler_servant_ch::visit_interface (be_interface *node)
-{
- be_interface_type_strategy *old_strategy =
- node->set_strategy (new be_interface_ami_handler_strategy (node));
-
- // Output stream.
- TAO_OutStream *os;
-
- // Holds the class name.
- static char namebuf [NAMEBUFSIZE];
-
- // AMI_<Interface_Name>_Handler string.
- static char ami_handler [NAMEBUFSIZE];
-
- if (node->srv_hdr_gen () || node->imported ())
- return 0;
-
- ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE);
- ACE_OS::memset (ami_handler, '\0', NAMEBUFSIZE);
-
- os = this->ctx_->stream ();
-
- // Generate the skeleton class name.
-
- // Start with whatever indentation level we are at.
- os->indent ();
-
- // We shall have a POA_ prefix only if we are at the topmost level.
- if (!node->is_nested ())
- {
- // we are outermost
- ACE_OS::sprintf (namebuf,
- "POA_%s",
- node->local_name ());
- }
- else
- {
- ACE_OS::sprintf (namebuf,
- "%s",
- node->local_name ());
- }
-
- // AMI Handler object's name.
- ACE_OS::sprintf (ami_handler,
- "%s",
- node->local_name ());
-
- *os << "class " << namebuf << ";" << be_nl;
-
- // generate the _ptr declaration
- *os << "typedef " << namebuf << " *" << namebuf
- << "_ptr;" << be_nl;
-
- // Now generate the class definition.
- // This class will inherit from the Messaging::ReplyHandler class.
- *os << "class " << idl_global->stub_export_macro ()
- << " " << namebuf
- << " : public virtual POA_Messaging::ReplyHandler"
- << be_nl;
-
- // Body of the class definition.
- *os << be_nl
- << "{" << be_nl;
-
- // Default constructor.
- *os << "protected:" << be_idt_nl
- << namebuf << " (void);\n" << be_uidt_nl;
-
- // Public portion starts.
- *os << "public:" << be_idt_nl
-
- // Copy constructor.
- << namebuf << " (const " << namebuf << "& rhs);" << be_nl
-
- // Destructor.
- << "virtual ~" << namebuf << " (void);\n\n"
-
- << be_nl;
-
- // Methods.
-
- // _is_a.
- *os << "virtual CORBA::Boolean _is_a (" << be_idt << be_idt_nl
- << "const char* logical_type_id," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV = " << be_idt_nl
- << "TAO_default_environment ()"
- << be_uidt << be_uidt_nl
- << ");\n" << be_uidt_nl;
-
- // _down_cast.
- *os << "virtual void* _downcast (" << be_idt << be_idt_nl
- << "const char* logical_type_id" << be_uidt_nl
- << ");\n" << be_uidt_nl;
-
- // add a skeleton for our _is_a method
- *os << "static void _is_a_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &req," << be_nl
- << "void *obj," << be_nl
- << "void *context," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV = " << be_idt_nl
- << "TAO_default_environment ()"
- << be_uidt << be_uidt_nl
- << ");\n" << be_uidt_nl;
-
- // add a skeleton for our _non_existent method
- *os << "static void _non_existent_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &req," << be_nl
- << "void *obj," << be_nl
- << "void *context," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV = " << be_idt_nl
- << "TAO_default_environment ()"
- << be_uidt << be_uidt_nl
- << ");\n" << be_uidt_nl;
-
- // add the dispatch method
- *os << "virtual void _dispatch (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &_tao_req," << be_nl
- << "void *_tao_context," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV = " << be_idt_nl
- << "TAO_default_environment ()"
- << be_uidt << be_uidt_nl
- << ");\n" << be_uidt_nl;
-
- // Print out the _this() method.
- *os << node->local_name () << " *_this (" << be_idt << be_idt_nl
- << "CORBA::Environment &ACE_TRY_ENV = " << be_idt_nl
- << "TAO_default_environment ()"
- << be_uidt << be_uidt_nl
- << ");\n" << be_uidt_nl;
-
- // The _interface_repository_id method.
- *os << "virtual const char* _interface_repository_id "
- << "(void) const;\n\n";
-
- // The _create_collocated_objref method.
- *os << "virtual void* _create_collocated_objref"
- << "(const char*, CORBA::ULong type, TAO_Stub *sobj);"
- << be_nl << be_nl;
-
- // Generate code for elements in the scope (e.g., operations).
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_ch::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
-
- // Generate skeletons for operations of our base classes. These skeletons
- // just cast the pointer to the appropriate type before invoking the call.
- if (node->traverse_inheritance_graph (be_interface::gen_skel_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_ch::"
- "visit_interface - "
- "inheritance graph traversal failed\n"),
- -1);
- }
-
- *os << be_uidt_nl << "};\n\n";
-
- be_visitor_context ctx (*this->ctx_);
- be_visitor *visitor = 0;
-
- // generate the collocated class
- if (idl_global->gen_thru_poa_collocation ())
- {
- ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_ch::"
- "visit_interface - "
- "codegen for thru_poa_collocated class failed\n"),
- -1);
- }
- }
-
- if (idl_global->gen_direct_collocation ())
- {
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_ch::"
- "visit_interface - "
- "codegen for direct_collocated class failed\n"),
- -1);
- }
- }
-
-
-#if 0
- // @@ Do this (Alex).
- // generate the TIE class.
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_INTERFACE_TIE_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_ch::"
- "visit_interface - "
- "codegen for TIE class failed\n"),
- -1);
- }
-#endif /* 0 */
-
- *os << "\n";
-
-#if 0
- ctx.stream (tao_cg->server_template_header ());
-#endif /* 0 */
-
- delete node->set_strategy (old_strategy);
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_cs.cpp
deleted file mode 100644
index e0e82be331a..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface/ami_handler_servant_cs.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// ami_handler_servant_cs.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for Interfaces in the server skeletons file.
-// !!!!!!!!!!!!!!! NOT USED ANY MORE !!!!!!!!!!!!!!!!!!!!
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-ACE_RCSID(be_visitor_interface, ami_handler_servant_cs, "$Id$")
-
-
-// ************************************************************
-// Interface visitor for server skeletons
-// ************************************************************
-
-be_visitor_interface_ami_handler_servant_cs::be_visitor_interface_ami_handler_servant_cs (be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_ami_handler_servant_cs::~be_visitor_interface_ami_handler_servant_cs (void)
-{
-}
-
-int
-be_visitor_interface_ami_handler_servant_cs::visit_interface (be_interface *node)
-{
- be_interface_type_strategy *old_strategy =
- node->set_strategy (new be_interface_ami_handler_strategy (node));
-
- TAO_OutStream *os = this->ctx_->stream (); // output stream
-
- if (node->srv_skel_gen () || node->imported ())
- return 0;
-
- // generate the skeleton class name
-
- os->indent (); // start with whatever indentation level we are at
-
- if (node->gen_operation_table () == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_cs::"
- "visit_interface - "
- "codegen for operation table failed\n"),
- -1);
- }
-
- // constructor
- *os << "// skeleton constructor" << be_nl;
- // find if we are at the top scope or inside some module
- if (!node->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *os << node->full_skel_name () << "::POA_" << node->local_name () <<
- " (void)" << be_nl;
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *os << node->full_skel_name () << "::" << node->local_name () <<
- " (void)" << be_nl;
- }
- *os << "{" << be_idt_nl
- << "this->optable_ = &tao_" << node->flat_name ()
- << "_optable;" << be_uidt_nl
- << "}\n\n";
-
- *os << "// copy ctor" << be_nl;
- // find if we are at the top scope or inside some module
- if (!node->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *os << node->full_skel_name () << "::POA_"
- << node->local_name () << " ("
- << "const POA_" << node->local_name () << "& rhs)";
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *os << node->full_skel_name () << "::"
- << node->local_name () << " (const "
- << node->local_name () << "& rhs)";
- }
- *os << be_idt_nl << ": ";
- if (node->traverse_inheritance_graph
- (be_interface::copy_ctor_helper, os) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_cs::visit_interface - "
- " copy ctor generation failed\n"), -1);
- *os << " TAO_ServantBase (rhs)" << be_uidt_nl
- << "{}\n" << be_nl;
- *os << "// skeleton destructor" << be_nl;
- if (!node->is_nested ())
- {
- // we are outermost. So the POA_ prefix is prepended to our name
- *os << node->full_skel_name () << "::~POA_" << node->local_name ()
- << " (void)" << be_nl;
- }
- else
- {
- // the POA_ prefix is prepended to our outermost module name
- *os << node->full_skel_name () << "::~" << node->local_name ()
- << " (void)" << be_nl;
- }
- *os << "{\n";
- *os << "}\n\n";
-
-
- // @@ Michael
- /*
- // generate code for elements in the scope (e.g., operations)
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_cs::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
- */
-
- // generate code for the _is_a skeleton
- os->indent ();
- *os << "void " << node->full_skel_name ()
- << "::_is_a_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &_tao_server_request, " << be_nl
- << "void * _tao_object_reference," << be_nl
- << "void * /* context */," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV" << be_uidt_nl
- << ")" << be_uidt_nl;
- *os << "{" << be_idt_nl;
- *os << "TAO_InputCDR &_tao_in = _tao_server_request.incoming ();" << be_nl;
- *os << node->full_skel_name () << " *_tao_impl = ("
- << node->full_skel_name () << " *) _tao_object_reference;" << be_nl;
- *os << "CORBA::Boolean _tao_retval = 0;" << be_nl;
- *os << "CORBA::String_var value;" << be_nl;
- *os << "if (!((_tao_in >> value.out ())))" << be_idt_nl;
- *os << "ACE_THROW (CORBA::MARSHAL ());" << be_uidt_nl << be_nl;
- *os << "_tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV);" << be_nl;
- *os << "ACE_CHECK;" << be_nl << be_nl;
- *os << "_tao_server_request.init_reply (ACE_TRY_ENV);" << be_nl;
- *os << "ACE_CHECK;" << be_nl;
- *os << "TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();" << be_nl;
- *os << "if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval))))" << be_idt_nl;
- *os << "ACE_THROW (CORBA::MARSHAL ());" << be_uidt << be_uidt_nl;
- *os << "}\n\n";
-
-
- // generate code for the _non_existent skeleton
- os->indent ();
- *os << "void " << node->full_skel_name ()
- << "::_non_existent_skel (" << be_idt << be_idt_nl
- << "CORBA::ServerRequest &_tao_server_request, " << be_nl
- << "void * _tao_object_reference," << be_nl
- << "void * /* context */," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV" << be_uidt_nl
- << ")" << be_uidt_nl;
- *os << "{" << be_idt_nl;
- *os << node->full_skel_name () << " *_tao_impl = ("
- << node->full_skel_name () << " *) _tao_object_reference;" << be_nl;
- *os << "CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV);" << be_nl;
- *os << "ACE_CHECK;" << be_nl << be_nl;
- *os << "_tao_server_request.init_reply (ACE_TRY_ENV);" << be_nl;
- *os << "ACE_CHECK;" << be_nl;
- *os << "TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();" << be_nl;
- *os << "if (!((_tao_out << CORBA::Any::from_boolean (_tao_retval))))" << be_idt_nl;
- *os << "ACE_THROW (CORBA::MARSHAL ());" << be_uidt << be_uidt_nl;
- *os << "}\n\n";
-
-
- os->indent ();
- *os << "CORBA::Boolean " << node->full_skel_name ()
- << "::_is_a (" << be_idt << be_idt_nl
- << "const char* value," << be_nl
- << "CORBA::Environment &ACE_TRY_ENV" << be_uidt_nl
- << ")" << be_uidt_nl
- << "{" << be_idt_nl
- << "if (\n" << be_idt;
- if (node->traverse_inheritance_graph (be_interface::is_a_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_cs::"
- "visit_interface - "
- "traversal of inhertance graph failed\n"),
- -1);
- }
- os->indent ();
- *os << "(!ACE_OS::strcmp ((char *)value, "
- << "CORBA::_tc_Object->id (ACE_TRY_ENV))))"
- << be_idt_nl << "return 1;" << be_uidt_nl
- << "else" << be_idt_nl
- << "return 0;" << be_uidt << be_uidt << be_uidt_nl
- << "}\n\n";
-
-
- // the downcast method.
- os->indent ();
- *os << "void* " << node->full_skel_name ()
- << "::_downcast (" << be_idt << be_idt_nl
- << "const char* logical_type_id" << be_uidt_nl
- << ")" << be_uidt_nl
- << "{" << be_idt_nl;
- if (node->traverse_inheritance_graph (be_interface::downcast_helper, os) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ami_handler_servant_cs::"
- "visit_interface - "
- "traversal of inhertance graph failed\n"),
- -1);
- }
- *os << "if (ACE_OS::strcmp (logical_type_id, "
- << "\"IDL:omg.org/CORBA/Object:1.0\") == 0)" << be_idt_nl
- << "return ACE_static_cast(PortableServer::Servant, this);"
- << be_uidt_nl;
- *os << "return 0;" << be_uidt_nl
- << "}\n\n";
-
-
- // now the dispatch method
- os->indent ();
- *os << "void " << node->full_skel_name () <<
- "::_dispatch (CORBA::ServerRequest &req, " <<
- "void *context, CORBA::Environment &ACE_TRY_ENV)" << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "TAO_Skeleton skel; // pointer to skeleton for operation" << be_nl;
- *os << "const char *opname = req.operation (); // retrieve operation name"
- << be_nl;
- *os << "// find the skeleton corresponding to this opname" << be_nl;
- *os << "if (this->_find (opname, skel, req.operation_length ()) == -1)" << be_nl;
- *os << "{" << be_idt_nl;
- *os << "ACE_ERROR ((LM_ERROR, \"Bad operation <%s>\\n\", opname));" << be_nl;
- *os << "ACE_THROW (CORBA_BAD_OPERATION ());"
- //<< "ACE_TRY_ENV);" << be_uidt_nl;
- << be_uidt_nl;
- // *os << "env.exception (new CORBA_BAD_OPERATION ());" << be_nl;
- *os << "}" << be_nl;
- *os << "else" << be_idt_nl;
- *os << "skel (req, this, context, ACE_TRY_ENV);" << be_uidt << be_uidt_nl;
- *os << "}\n\n";
- os->indent ();
- *os << "const char* " << node->full_skel_name ()
- << "::_interface_repository_id (void) const"
- << be_nl;
- *os << "{\n";
- os->incr_indent ();
- *os << "return \"" << node->repoID () << "\";\n";
- os->decr_indent ();
- *os << "}\n\n\n";
-
- // the _this () operation
-
- *os << node->full_name () << "*" << be_nl
- << node->full_skel_name ()
- << "::_this (CORBA_Environment &ACE_TRY_ENV)" << be_nl
- << "{" << be_idt_nl
- << "TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV);" << be_nl
- << "ACE_CHECK_RETURN (0);" << be_nl
- << "return new " ;
- if (idl_global->gen_direct_collocation ())
- *os << node->full_coll_name (be_interface::DIRECT);
- else if (idl_global->gen_thru_poa_collocation ())
- *os << node->full_coll_name (be_interface::THRU_POA);
- *os << " (this, stub);" << be_uidt_nl
- << "}\n\n";
-
- // the _create_collocated_objref method
- *os << "void*" << be_nl
- << node->full_skel_name ()
- << "::_create_collocated_objref (const char* repository_id, "
- << "CORBA::ULong type, TAO_Stub *stub)" << be_nl
- << "{" << be_idt_nl
- << "if (!ACE_OS::strcmp (\"" << node->repoID ()
- << "\", repository_id))" << be_idt_nl
- << "return ACE_static_cast (" << be_idt << be_idt_nl
- // @@ Michael: I changed the following line from node->name
- // to "node->local_name". This might be wrong, but right
- // now I think it is right ..
- << node->local_name () << "_ptr," << be_nl
- << "new ";
-
- if (idl_global->gen_direct_collocation ())
- *os << node->full_coll_name (be_interface::DIRECT);
- else if (idl_global->gen_thru_poa_collocation ())
- *os << node->full_coll_name (be_interface::THRU_POA);
-
- *os << " (this, stub)" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl
- << "return 0;" << be_uidt_nl
- << "}" << be_nl << be_nl;
-
-
-
- // generate the collocated class impl
- if (idl_global->gen_thru_poa_collocation ())
- {
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface::"
- "ami_handler_servant_cs- "
- "Bad visitor for thru_poa collocated class\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface::"
- "ami_handler_servant_cs - "
- "codegen for thru_poa collocated class failed\n"),
- -1);
- }
- delete visitor;
- }
-
- if (idl_global->gen_direct_collocation ())
- {
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface::"
- "ami_handler_servant_cs - "
- "Bad visitor for direct collocated class\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface::"
- "ami_handler_servant_cs - "
- "codegen for direct collocated class failed\n"),
- -1);
- }
- delete visitor;
- }
-
- *os << "\n\n";
-
- delete node->set_strategy (old_strategy);
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
index f73d03f9417..d7533f1e1a3 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
@@ -430,11 +430,11 @@ be_visitor_interface::visit_operation (be_operation *node)
case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SS);
break;
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH:
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_CH);
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SH:
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_SH);
break;
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS:
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_CS);
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SS:
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_SS);
break;
case TAO_CodeGen::TAO_AMI_HANDLER_STUB_CH:
ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_STUB_OPERATION_CH);
@@ -442,11 +442,11 @@ be_visitor_interface::visit_operation (be_operation *node)
case TAO_CodeGen::TAO_AMI_HANDLER_STUB_CS:
ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_STUB_OPERATION_CS);
break;
- case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS:
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CS);
+ case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SS:
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SS);
break;
- case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CH:
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CH);
+ case TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SH:
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SH);
break;
case TAO_CodeGen::TAO_INTERFACE_ANY_OP_CH:
case TAO_CodeGen::TAO_INTERFACE_ANY_OP_CS:
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp
index 89dca721f38..2e8f3a3779d 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp
@@ -320,37 +320,9 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
-1);
}
delete visitor;
+ visitor = 0;
- // = Generate the Servant Skeleton code.
- // Set the context.
- ctx = *this->ctx_;
-
- // Set the state.
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH);
-
- // Create the visitor.
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "Bad visitor\n"),
- -1);
- }
-
- // call the visitor on this interface.
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "code gen for ami handler failed\n"),
- -1);
- }
- delete visitor;
delete node->set_strategy (old_strategy);
}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
index e412fe881f4..a72a3e0df90 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
@@ -233,36 +233,6 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
}
delete visitor;
- // = Generate the Servant Skeleton code.
- // Set the context.
- ctx = *this->ctx_;
-
- // Set the state.
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS);
-
- // Create the visitor.
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "Bad visitor\n"),
- -1);
- }
-
- // Call the visitor on this interface.
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "code gen for ami handler failed\n"),
- -1);
- }
- delete visitor;
-
delete node->set_strategy (old_strategy);
}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
index 810b199eaec..67f87e2ae36 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
@@ -208,8 +208,8 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
// generate the collocated class
if (idl_global->gen_thru_poa_collocation ())
{
- if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH)
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CH);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SH)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SH);
else
ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH);
visitor = tao_cg->make_visitor (&ctx);
@@ -229,8 +229,8 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
if (idl_global->gen_direct_collocation ())
{
ctx = *this->ctx_;
- if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CH)
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CH);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SH)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_SH);
else
ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH);
visitor = tao_cg->make_visitor (&ctx);
@@ -266,6 +266,42 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
delete visitor;
}
+ // Only if AMI code generation is activated and we
+ // are not calling ourselves already
+ if (idl_global->ami_call_back () == I_TRUE
+ && this->ctx_->state () == TAO_CodeGen::TAO_INTERFACE_SH)
+ {
+ // Set the AMI Strategy for code generation
+ be_interface_type_strategy *old_strategy =
+ node->set_strategy (new be_interface_ami_handler_strategy (node));
+
+ // = Generate the Servant Skeleton code.
+ ctx = *this->ctx_;
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SH);
+ visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interface_sh::"
+ "visit_interface - "
+ "Bad visitor\n"),
+ -1);
+ }
+
+ // call the visitor on this interface.
+ if (node->accept (visitor) == -1)
+ {
+ delete visitor;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interface_sh::"
+ "visit_interface - "
+ "code gen for ami handler failed\n"),
+ -1);
+ }
+ delete visitor;
+
+ delete node->set_strategy (old_strategy);
+ }
*os << "\n";
ctx.stream (tao_cg->server_template_header ());
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 c3ed8a50a79..b99f5b2ccf1 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
@@ -385,7 +385,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< "else" << be_idt_nl
<< "{" << be_idt_nl
<< "// stub->_incr_refcnt ();" << be_nl
- << "CORBA::Object_var obj = new CORBA::Object (stub);" << be_nl
+ << "CORBA::Object_var obj = new CORBA::Object (stub);" << be_nl;
<< "return " << node->full_name ()
<< "::_unchecked_narrow (obj.in ());" << be_uidt_nl
<< "}" << be_uidt << be_uidt_nl
@@ -399,8 +399,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
if (idl_global->gen_thru_poa_collocation ())
{
be_visitor_context ctx (*this->ctx_);
- if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS)
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SS)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SS);
else
ctx.state (TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS);
be_visitor *visitor = tao_cg->make_visitor (&ctx);
@@ -427,8 +427,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
if (idl_global->gen_direct_collocation ())
{
be_visitor_context ctx (*this->ctx_);
- if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_CS)
- ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS);
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SS)
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SS);
else
ctx.state (TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS);
be_visitor *visitor = tao_cg->make_visitor (&ctx);
@@ -452,6 +452,50 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
delete visitor;
}
+
+ // AMI
+
+ // Generate code for the AMI Reply Handler.
+ if (idl_global->ami_call_back () == I_TRUE
+ && this->ctx_->state () != TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SS)
+ {
+ be_interface_type_strategy *old_strategy =
+ node->set_strategy (new be_interface_ami_handler_strategy (node));
+
+ // = Generate the Servant Skeleton code.
+
+ // Set the context.
+ be_visitor_context ctx (*this->ctx_);
+
+ // Set the state.
+ ctx.state (TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_SS);
+
+ // Create the visitor.
+ be_visitor *visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interface_ss::"
+ "visit_interface - "
+ "Bad visitor\n"),
+ -1);
+ }
+
+ // Call the visitor on this interface.
+ if (node->accept (visitor) == -1)
+ {
+ delete visitor;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interface_ss::"
+ "visit_interface - "
+ "code gen for ami handler failed\n"),
+ -1);
+ }
+ delete visitor;
+
+ delete node->set_strategy (old_strategy);
+ }
+
*os << "\n\n";
return 0;
diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp
index 04441aa4819..3517105eb11 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation.cpp
@@ -62,10 +62,10 @@
#include "be_visitor_operation/ami_handler_operation_ch.cpp"
#include "be_visitor_operation/ami_handler_arglist.cpp"
#include "be_visitor_operation/ami_handler_operation_cs.cpp"
-#include "be_visitor_operation/ami_handler_servant_operation_cs.cpp"
#include "be_visitor_operation/ami_handler_skeleton_cs.cpp"
+#include "be_visitor_operation/ami_handler_servant_operation_ss.cpp"
#include "be_visitor_operation/ami_handler_argument_marshal.cpp"
-#include "be_visitor_operation/ami_handler_thru_poa_collocated_ch.cpp"
-#include "be_visitor_operation/ami_handler_thru_poa_collocated_cs.cpp"
+#include "be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp"
+#include "be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp"
ACE_RCSID(be, be_visitor_operation, "$Id$")
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp
index 450e5bd6cb1..ea3ecea5600 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ch.cpp
@@ -90,8 +90,8 @@ be_visitor_operation_ami_handler_operation_ch::visit_operation (be_operation *no
// Generating the skeleton method.
// Skeleton not necessary for collocated class.
- if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CH
- || this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_CH)
+ if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SH
+ || this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_SH)
{
return 0;
/* NOT REACHED */
@@ -124,7 +124,7 @@ be_visitor_operation_ami_handler_operation_ch::visit_operation (be_operation *no
// class.
switch (this->ctx_->state ())
{
- case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_CH:
+ case TAO_CodeGen::TAO_AMI_HANDLER_SERVANT_OPERATION_SH:
*os << "CORBA::ServerRequest &_tao_req, " << be_nl
<< "void *_tao_obj, " << be_nl
<< "void *_tao_context, " << be_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp
index d0aa2edfba5..c966237390a 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp
@@ -8,7 +8,7 @@
// TAO IDL
//
// = FILENAME
-// ami_handler_servant_operation_cs.cpp
+// ami_handler_servant_operation_ss.cpp
//
// = DESCRIPTION
// Visitor generating code for Operation in the server skeleton
@@ -25,25 +25,25 @@
#include "be_visitor_operation.h"
#include "be_visitor_argument.h"
-ACE_RCSID(be_visitor_operation, ami_handler_servant_operation_cs, "$Id$")
+ACE_RCSID(be_visitor_operation, ami_handler_servant_operation_ss, "$Id$")
// ************************************************************
// Operation visitor for server skeletons
// ************************************************************
-be_visitor_operation_ami_handler_servant_operation_cs::be_visitor_operation_ami_handler_servant_operation_cs (be_visitor_context *ctx)
+be_visitor_operation_ami_handler_servant_operation_ss::be_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx)
: be_visitor_operation (ctx)
{
}
-be_visitor_operation_ami_handler_servant_operation_cs::~be_visitor_operation_ami_handler_servant_operation_cs (void)
+be_visitor_operation_ami_handler_servant_operation_ss::~be_visitor_operation_ami_handler_servant_operation_ss (void)
{
}
// processing to be done after every element in the scope is processed
int
-be_visitor_operation_ami_handler_servant_operation_cs::post_process (be_decl *bd)
+be_visitor_operation_ami_handler_servant_operation_ss::post_process (be_decl *bd)
{
// all we do here is to insert a comma and a newline
TAO_OutStream *os = this->ctx_->stream ();
@@ -53,7 +53,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::post_process (be_decl *bd
}
int
-be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_operation *node)
+be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_operation *node)
{
TAO_OutStream *os; // output stream
be_type *bt; // type node for return type
@@ -72,7 +72,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"Bad return type\n"),
-1);
@@ -89,7 +89,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
if (!intf)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"bad interface scope\n"),
-1);
@@ -164,7 +164,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
if (this->gen_pre_skel_info (node, bt) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"gen_pre_skel_info failed\n"),
-1);
@@ -183,7 +183,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for return var decl failed\n"),
-1);
@@ -199,7 +199,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for return var decl failed\n"),
-1);
@@ -211,7 +211,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
if (this->gen_demarshal_params (node, bt) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"gen_demarshal_params failed\n"),
-1);
@@ -234,7 +234,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for making upcall failed\n"),
-1);
@@ -256,7 +256,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_operation (be_opera
}
int
-be_visitor_operation_ami_handler_servant_operation_cs::visit_argument (be_argument *node)
+be_visitor_operation_ami_handler_servant_operation_ss::visit_argument (be_argument *node)
{
// this method is used to generate the ParamData table entry
@@ -268,7 +268,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_argument (be_argume
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_argument - "
"Bad argument type\n"),
-1);
@@ -294,7 +294,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::visit_argument (be_argume
}
int
-be_visitor_operation_ami_handler_servant_operation_cs::gen_raise_exception (be_type *,
+be_visitor_operation_ami_handler_servant_operation_ss::gen_raise_exception (be_type *,
const char *excep,
const char *completion_status,
const char * /* env */)
@@ -309,7 +309,7 @@ be_visitor_operation_ami_handler_servant_operation_cs::gen_raise_exception (be_t
}
int
-be_visitor_operation_ami_handler_servant_operation_cs::gen_check_exception (be_type *, const char * /* env */)
+be_visitor_operation_ami_handler_servant_operation_ss::gen_check_exception (be_type *, const char * /* env */)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -326,19 +326,19 @@ be_visitor_operation_ami_handler_servant_operation_cs::gen_check_exception (be_t
// Operation visitor for server skeletons using interpretive marshaling
// *********************************************************************
-be_interpretive_visitor_operation_ami_handler_servant_operation_cs::
-be_interpretive_visitor_operation_ami_handler_servant_operation_cs (be_visitor_context *ctx)
- : be_visitor_operation_ami_handler_servant_operation_cs (ctx)
+be_interpretive_visitor_operation_ami_handler_servant_operation_ss::
+be_interpretive_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx)
+ : be_visitor_operation_ami_handler_servant_operation_ss (ctx)
{
}
-be_interpretive_visitor_operation_ami_handler_servant_operation_cs::
-~be_interpretive_visitor_operation_ami_handler_servant_operation_cs (void)
+be_interpretive_visitor_operation_ami_handler_servant_operation_ss::
+~be_interpretive_visitor_operation_ami_handler_servant_operation_ss (void)
{
}
int
-be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_pre_skel_info (be_operation *node,
+be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel_info (be_operation *node,
be_type *bt)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -375,7 +375,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_pre_skel
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"visit scope failed\n"),
-1);
@@ -440,7 +440,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_pre_skel
}
int
-be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_demarshal_params (be_operation *node,
+be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_params (be_operation *node,
be_type *bt)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -471,7 +471,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_demarsha
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for return var in demarshal failed\n"),
-1);
@@ -488,7 +488,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_demarsha
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for argument in demarshal failed\n"),
-1);
@@ -504,7 +504,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_demarsha
}
int
-be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_marshal_params (be_operation *node,
+be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_params (be_operation *node,
be_type *bt)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -537,7 +537,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_marshal_
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for return var in marshal failed\n"),
-1);
@@ -556,7 +556,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_marshal_
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::"
"visit_operation - "
"codegen for argument in marshal failed\n"),
-1);
@@ -572,19 +572,19 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_cs::gen_marshal_
// Operation visitor for server skeletons using compiled marshaling
// *********************************************************************
-be_compiled_visitor_operation_ami_handler_servant_operation_cs::
-be_compiled_visitor_operation_ami_handler_servant_operation_cs (be_visitor_context *ctx)
- : be_visitor_operation_ami_handler_servant_operation_cs (ctx)
+be_compiled_visitor_operation_ami_handler_servant_operation_ss::
+be_compiled_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx)
+ : be_visitor_operation_ami_handler_servant_operation_ss (ctx)
{
}
-be_compiled_visitor_operation_ami_handler_servant_operation_cs::
-~be_compiled_visitor_operation_ami_handler_servant_operation_cs (void)
+be_compiled_visitor_operation_ami_handler_servant_operation_ss::
+~be_compiled_visitor_operation_ami_handler_servant_operation_ss (void)
{
}
int
-be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_pre_skel_info (be_operation *node,
+be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel_info (be_operation *node,
be_type *bt)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -604,7 +604,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_pre_skel_inf
}
int
-be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_demarshal_params (be_operation *node,
+be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_params (be_operation *node,
be_type *bt)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -631,7 +631,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_demarshal_pa
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_ss::"
"gen_demarshal_params - "
"codegen for demarshal failed\n"),
-1);
@@ -652,7 +652,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_demarshal_pa
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_ss::"
"gen_demarshal_params - "
"codegen for demarshal failed\n"),
-1);
@@ -665,7 +665,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_demarshal_pa
"ACE_TRY_ENV") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_cs::"
+ "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_ss::"
"gen_marshal_and invoke - "
"codegen for return var failed\n"),
-1);
@@ -678,7 +678,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_demarshal_pa
}
int
-be_compiled_visitor_operation_ami_handler_servant_operation_cs::gen_marshal_params (be_operation *,
+be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_params (be_operation *,
be_type *)
{
// because we do not want to return something.
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
index 7828662ff7f..d88846b4e0b 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
@@ -143,7 +143,7 @@ be_visitor_operation_ami_handler_skeleton_cs::visit_operation (be_operation *nod
*os << "::_narrow(_tao_reply_handler, ACE_TRY_ENV);" << be_uidt_nl;
*os << "ACE_CHECK;" << be_nl << be_nl
- << "// @@ Error handling " << be_nl << be_nl;
+ << "// @@ Error handling \n\n";
// declare a return type variable
ctx = *this->ctx_;
@@ -400,7 +400,7 @@ gen_marshal_and_invoke (be_operation *node,
os->indent ();
- *os << "// Demarshall all the arguments.\n";
+ *os << "// Demarshall all the arguments." << be_nl;
if (!this->void_return_type (bt)
|| this->has_param_type (node, AST_Argument::dir_INOUT)
|| this->has_param_type (node, AST_Argument::dir_OUT))
@@ -477,6 +477,8 @@ gen_marshal_and_invoke (be_operation *node,
delete visitor;
visitor = 0;
+ os->indent ();
+
*os << be_nl << ");" << be_uidt_nl;
*os << "ACE_CHECK;" << be_nl;
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp
index dae79c4beba..a589a309535 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp
@@ -8,7 +8,7 @@
// TAO IDL
//
// = FILENAME
-// ami_handler_thru_poa_collocated_ch.cpp
+// ami_handler_thru_poa_collocated_sh.cpp
//
// = DESCRIPTION
// Visitor generating code for thru_poa_collocated operation in the client stub
@@ -26,26 +26,26 @@
#include "be_visitor_operation.h"
-ACE_RCSID(be_visitor_operation, ami_handler_thru_poa_collocated_ch, "$Id$")
+ACE_RCSID(be_visitor_operation, ami_handler_thru_poa_collocated_sh, "$Id$")
// *************************************************************************
-// be_visitor_operation_ami_handler_thru_poa_collocated_ch --
+// be_visitor_operation_ami_handler_thru_poa_collocated_sh --
// This visitor generates code for the thru_poa_collocated operation signature in a
// server header file
// *************************************************************************
-be_visitor_operation_ami_handler_thru_poa_collocated_ch::be_visitor_operation_ami_handler_thru_poa_collocated_ch
+be_visitor_operation_ami_handler_thru_poa_collocated_sh::be_visitor_operation_ami_handler_thru_poa_collocated_sh
(be_visitor_context *ctx)
: be_visitor_scope (ctx)
{
}
-be_visitor_operation_ami_handler_thru_poa_collocated_ch::~be_visitor_operation_ami_handler_thru_poa_collocated_ch (void)
+be_visitor_operation_ami_handler_thru_poa_collocated_sh::~be_visitor_operation_ami_handler_thru_poa_collocated_sh (void)
{
}
-int be_visitor_operation_ami_handler_thru_poa_collocated_ch::visit_operation (be_operation *node)
+int be_visitor_operation_ami_handler_thru_poa_collocated_sh::visit_operation (be_operation *node)
{
TAO_OutStream *os; // output stream
be_type *bt; // type node representing the return type
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp
index d9d86773fff..a867498e201 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp
@@ -8,7 +8,7 @@
// TAO IDL
//
// = FILENAME
-// ami_handler_thru_poa_collocated_cs.cpp
+// ami_handler_thru_poa_collocated_ss.cpp
//
// = DESCRIPTION
// Visitor generating code for thru_poa_collocated Operation in the skeleton.
@@ -25,26 +25,26 @@
#include "be_visitor_operation.h"
-ACE_RCSID(be_visitor_operation, ami_handler_thru_poa_collocated_cs, "$Id$")
+ACE_RCSID(be_visitor_operation, ami_handler_thru_poa_collocated_ss, "$Id$")
// *************************************************************************
-// be_visitor_operation_ami_handler_thru_poa_collocated_cs --
+// be_visitor_operation_ami_handler_thru_poa_collocated_ss --
// This visitor generates code for the thru_poa_collocated operation signature in a
// server skeletons file
// *************************************************************************
-be_visitor_operation_ami_handler_thru_poa_collocated_cs::be_visitor_operation_ami_handler_thru_poa_collocated_cs
+be_visitor_operation_ami_handler_thru_poa_collocated_ss::be_visitor_operation_ami_handler_thru_poa_collocated_ss
(be_visitor_context *ctx)
: be_visitor_scope (ctx)
{
}
-be_visitor_operation_ami_handler_thru_poa_collocated_cs::~be_visitor_operation_ami_handler_thru_poa_collocated_cs (void)
+be_visitor_operation_ami_handler_thru_poa_collocated_ss::~be_visitor_operation_ami_handler_thru_poa_collocated_ss (void)
{
}
-int be_visitor_operation_ami_handler_thru_poa_collocated_cs::visit_operation (be_operation *node)
+int be_visitor_operation_ami_handler_thru_poa_collocated_ss::visit_operation (be_operation *node)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -59,7 +59,7 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_cs::visit_operation (be
if (!intf)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_ss::"
"visit_operation - "
"bad interface scope\n"),
-1);
@@ -70,7 +70,7 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_cs::visit_operation (be
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_ss::"
"visit_operation - "
"Bad return type\n"),
-1);
@@ -92,7 +92,7 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_cs::visit_operation (be
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_ss::"
"visit_operation - "
"codegen for argument list failed\n"),
-1);
@@ -150,7 +150,7 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_cs::visit_operation (be
return 0;
}
-int be_visitor_operation_ami_handler_thru_poa_collocated_cs::gen_invoke (be_visitor_context &ctx,
+int be_visitor_operation_ami_handler_thru_poa_collocated_ss::gen_invoke (be_visitor_context &ctx,
be_operation *node)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -173,7 +173,7 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_cs::gen_invoke (be_visi
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_cs::"
+ "(%N:%l) be_visitor_operation_ami_handler_thru_poa_collocated_ss::"
"gen_invoke - "
"codegen for making upcall failed\n"),
-1);
@@ -187,7 +187,7 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_cs::gen_invoke (be_visi
int
-be_visitor_operation_ami_handler_thru_poa_collocated_cs::void_return_type (be_type *bt)
+be_visitor_operation_ami_handler_thru_poa_collocated_ss::void_return_type (be_type *bt)
{
// is the operation return type void?
diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h
index 4daebfe465b..35dba1ce0b4 100644
--- a/TAO/TAO_IDL/be_include/be_codegen.h
+++ b/TAO/TAO_IDL/be_include/be_codegen.h
@@ -297,15 +297,15 @@ public:
TAO_AMI_HANDLER_FWD_CH, // FWD decl for AMI handler.
TAO_AMI_HANDLER_FWD_CI, // FWD decl for AMI handler.
- TAO_AMI_HANDLER_SERVANT_CH, // POA_AMI_*_Handler.
- TAO_AMI_HANDLER_SERVANT_CS, // POA_AMI_*_Handler.
+ TAO_AMI_HANDLER_SERVANT_SH, // POA_AMI_*_Handler.
+ TAO_AMI_HANDLER_SERVANT_SS, // POA_AMI_*_Handler.
TAO_AMI_HANDLER_STUB_CH, // AMI_*_Handler class visitor.
TAO_AMI_HANDLER_STUB_CS, // AMI_*_Handler class visitor.
- TAO_AMI_HANDLER_SERVANT_OPERATION_CS,
- TAO_AMI_HANDLER_SERVANT_OPERATION_CH, // Operation in POA_AMI_*_Handler.
+ TAO_AMI_HANDLER_SERVANT_OPERATION_SS,
+ TAO_AMI_HANDLER_SERVANT_OPERATION_SH, // Operation in POA_AMI_*_Handler.
TAO_AMI_HANDLER_STUB_OPERATION_CH, // Operation in AMI_*_Handler.
TAO_AMI_HANDLER_OPERATION_ARGLIST_CH,
TAO_AMI_HANDLER_OPERATION_ARGLIST_CS,
@@ -330,21 +330,21 @@ public:
TAO_AMI_HANDLER_OPERATION_ARG_DECL_CS, // Argument declartion.
- TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CH,
+ TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SH,
- TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_CS,
+ TAO_AMI_HANDLER_INTERFACE_THRU_POA_COLLOCATED_SS,
- TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CH,
+ TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_SH,
- TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_CS,
+ TAO_AMI_HANDLER_INTERFACE_DIRECT_COLLOCATED_SS,
- TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CH,
+ TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SH,
- TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_CS,
+ TAO_AMI_HANDLER_OPERATION_THRU_POA_COLLOCATED_SS,
- TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_CH,
+ TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_SH,
- TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_CS,
+ TAO_AMI_HANDLER_OPERATION_DIRECT_COLLOCATED_SS,
TAO_AMI_HANDLER_ARGUMENT_VARDECL_CS, // State derived out of the above
diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h
index d401ed51e68..3059f16db0f 100644
--- a/TAO/TAO_IDL/be_include/be_interface.h
+++ b/TAO/TAO_IDL/be_include/be_interface.h
@@ -79,14 +79,17 @@ public:
const char *suffix);
// compute the collocation names
- virtual TAO_OutStream *get_out_stream () = 0;
+ virtual TAO_OutStream *get_out_stream ();
// return the out stream depending on the strategy
- // -> the client stub (e.g. AMI) or server skeleton
- // outstream is returned.
+ // @@ Michael: Right now every strategy behaves
+ // the same way, but it might be in the future that we
+ // have to differentiate.
- virtual const char *get_out_stream_fname () = 0;
+ virtual const char *get_out_stream_fname ();
// return the file name of the output stream.
-
+ // @@ Michael: Right now every strategy behaves the
+ // same way.
+
protected:
char *local_name_;
@@ -144,13 +147,6 @@ public:
virtual const char *local_coll_name (int);
// retrieve the fully qualified collocated class name.
- virtual TAO_OutStream *get_out_stream ();
- // return the out stream depending on the strategy
- // return the client stub
-
- virtual const char *get_out_stream_fname ();
- // return the file name of the output stream.
-
// end of overridden methods
private:
@@ -192,13 +188,6 @@ public:
virtual const char *local_coll_name (int);
// retrieve the fully qualified collocated class name.
- virtual TAO_OutStream *get_out_stream ();
- // return the out stream depending on the strategy
- // return the server skeleton
-
- virtual const char *get_out_stream_fname ();
- // return the file name of the output stream.
-
// end of overridden methods
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h
index 8f2e85f15fb..6fb1ed0bda3 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h
@@ -48,10 +48,5 @@
#include "be_visitor_interface/ami_handler_stub_ch.h"
#include "be_visitor_interface/ami_handler_stub_cs.h"
-#if 0 /* We are using normal servant code */
-#include "be_visitor_interface/collocated_ami_handler_ch.h"
-#include "be_visitor_interface/ami_handler_servant_ch.h"
-#include "be_visitor_interface/ami_handler_servant_cs.h"
-#endif /* 0 */
#endif /* _BE_VISITOR_INTERFACE_H */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation.h
index dd637624a35..71288cf61da 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation.h
@@ -61,10 +61,10 @@
#include "be_visitor_operation/ami_handler_operation_ch.h"
#include "be_visitor_operation/ami_handler_arglist.h"
#include "be_visitor_operation/ami_handler_operation_cs.h"
-#include "be_visitor_operation/ami_handler_servant_operation_cs.h"
+#include "be_visitor_operation/ami_handler_servant_operation_ss.h"
#include "be_visitor_operation/ami_handler_skeleton_cs.h"
#include "be_visitor_operation/ami_handler_argument_marshal.h"
-#include "be_visitor_operation/ami_handler_thru_poa_collocated_ch.h"
-#include "be_visitor_operation/ami_handler_thru_poa_collocated_cs.h"
+#include "be_visitor_operation/ami_handler_thru_poa_collocated_sh.h"
+#include "be_visitor_operation/ami_handler_thru_poa_collocated_ss.h"
#endif // TAO_BE_VISITOR_OPERATION_H
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h
index 66a2ef89ed8..a628678959f 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h
@@ -8,7 +8,7 @@
// TAO IDL
//
// = FILENAME
-// ami_handler_servant_operation_cs.h
+// ami_handler_servant_operation_ss.h
//
// = DESCRIPTION
// Visitor for generating code for IDL operations in server skeletons
@@ -18,18 +18,18 @@
//
// ============================================================================
-#ifndef _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_CS_H_
-#define _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_CS_H_
+#ifndef _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_SS_H_
+#define _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_SS_H_
// ************************************************************
// Operation visitor for server skeletons
// ************************************************************
-class be_visitor_operation_ami_handler_servant_operation_cs : public be_visitor_operation
+class be_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_operation
{
//
// = TITLE
- // be_visitor_operation_ami_handler_servant_operation_cs
+ // be_visitor_operation_ami_handler_servant_operation_ss
//
// = DESCRIPTION
// This is a concrete visitor to generate the server skeletons for operation
@@ -37,10 +37,10 @@ class be_visitor_operation_ami_handler_servant_operation_cs : public be_visitor_
//
public:
- be_visitor_operation_ami_handler_servant_operation_cs (be_visitor_context *ctx);
+ be_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx);
// constructor
- ~be_visitor_operation_ami_handler_servant_operation_cs (void);
+ ~be_visitor_operation_ami_handler_servant_operation_ss (void);
// destructor
virtual int visit_operation (be_operation *node);
@@ -77,11 +77,11 @@ public:
// concrete visitors
-class be_interpretive_visitor_operation_ami_handler_servant_operation_cs : public be_visitor_operation_ami_handler_servant_operation_cs
+class be_interpretive_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_operation_ami_handler_servant_operation_ss
{
//
// = TITLE
- // be_interpretive_visitor_operation_ami_handler_servant_operation_cs
+ // be_interpretive_visitor_operation_ami_handler_servant_operation_ss
//
// = DESCRIPTION
// This is a concrete visitor to generate the server skeletons for
@@ -89,10 +89,10 @@ class be_interpretive_visitor_operation_ami_handler_servant_operation_cs : publi
//
//
public:
- be_interpretive_visitor_operation_ami_handler_servant_operation_cs (be_visitor_context *ctx);
+ be_interpretive_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx);
// constructor
- ~be_interpretive_visitor_operation_ami_handler_servant_operation_cs (void);
+ ~be_interpretive_visitor_operation_ami_handler_servant_operation_ss (void);
// destructor
// template methods
@@ -108,11 +108,11 @@ public:
};
-class be_compiled_visitor_operation_ami_handler_servant_operation_cs : public be_visitor_operation_ami_handler_servant_operation_cs
+class be_compiled_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_operation_ami_handler_servant_operation_ss
{
//
// = TITLE
- // be_compiled_visitor_operation_ami_handler_servant_operation_cs
+ // be_compiled_visitor_operation_ami_handler_servant_operation_ss
//
// = DESCRIPTION
// This is a concrete visitor to generate the server skeletons for
@@ -120,10 +120,10 @@ class be_compiled_visitor_operation_ami_handler_servant_operation_cs : public be
//
//
public:
- be_compiled_visitor_operation_ami_handler_servant_operation_cs (be_visitor_context *ctx);
+ be_compiled_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx);
// constructor
- ~be_compiled_visitor_operation_ami_handler_servant_operation_cs (void);
+ ~be_compiled_visitor_operation_ami_handler_servant_operation_ss (void);
// destructor
// template methods
@@ -139,4 +139,4 @@ public:
};
-#endif /* _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_CS_H_ */
+#endif /* _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_SS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ch.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_sh.h
index a7b09defbe9..1c9382db67f 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ch.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_sh.h
@@ -8,7 +8,7 @@
// TAO IDL
//
// = FILENAME
-// thru_poa_collocated_ch.h
+// thru_poa_collocated_sh.h
//
// = DESCRIPTION
// Visitor for generating code for IDL operations for the thru_poa collocated case
@@ -20,18 +20,18 @@
//
// ============================================================================
-#ifndef _BE_VISITOR_OPERATION_ami_handler_thru_poa_collocated_ch_H_
-#define _BE_VISITOR_OPERATION_ami_handler_thru_poa_collocated_ch_H_
+#ifndef _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_SH_H_
+#define _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_SH_H_
// ************************************************************
// Operation visitor for server header in the thru_poa collocated class
// ************************************************************
-class be_visitor_operation_ami_handler_thru_poa_collocated_ch : public be_visitor_scope
+class be_visitor_operation_ami_handler_thru_poa_collocated_sh : public be_visitor_scope
{
//
// = TITLE
- // be_visitor_operation_ami_handler_thru_poa_collocated_ch
+ // be_visitor_operation_ami_handler_thru_poa_collocated_sh
//
// = DESCRIPTION
// This is a concrete visitor to generate the server header for operation
@@ -39,10 +39,10 @@ class be_visitor_operation_ami_handler_thru_poa_collocated_ch : public be_visito
//
//
public:
- be_visitor_operation_ami_handler_thru_poa_collocated_ch (be_visitor_context *ctx);
+ be_visitor_operation_ami_handler_thru_poa_collocated_sh (be_visitor_context *ctx);
// constructor
- ~be_visitor_operation_ami_handler_thru_poa_collocated_ch (void);
+ ~be_visitor_operation_ami_handler_thru_poa_collocated_sh (void);
// destructor
virtual int visit_operation (be_operation *node);
@@ -50,4 +50,4 @@ public:
};
-#endif /* _BE_VISITOR_OPERATION_ami_handler_thru_poa_collocated_ch_H_ */
+#endif /* _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_SH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ss.h
index b5eff14e374..1ab2a005968 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_thru_poa_collocated_ss.h
@@ -8,7 +8,7 @@
// TAO IDL
//
// = FILENAME
-// ami_handler_thru_poa_collocated_cs.h
+// ami_handler_thru_poa_collocated_ss.h
//
// = DESCRIPTION
// Visitor for generating code for IDL operations for the thru_poa collocated case
@@ -20,14 +20,14 @@
//
// ============================================================================
-#ifndef _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_CS_H_
-#define _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_CS_H_
+#ifndef _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_SS_H_
+#define _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_SS_H_
// *****************************************************************
// Operation visitor for server skeletons for the thru_poa collocated class
// *****************************************************************
-class be_visitor_operation_ami_handler_thru_poa_collocated_cs : public be_visitor_scope
+class be_visitor_operation_ami_handler_thru_poa_collocated_ss : public be_visitor_scope
{
//
// = TITLE
@@ -39,10 +39,10 @@ class be_visitor_operation_ami_handler_thru_poa_collocated_cs : public be_visito
//
//
public:
- be_visitor_operation_ami_handler_thru_poa_collocated_cs (be_visitor_context *ctx);
+ be_visitor_operation_ami_handler_thru_poa_collocated_ss (be_visitor_context *ctx);
// constructor
- ~be_visitor_operation_ami_handler_thru_poa_collocated_cs (void);
+ ~be_visitor_operation_ami_handler_thru_poa_collocated_ss (void);
// destructor
virtual int visit_operation (be_operation *node);
@@ -55,4 +55,4 @@ public:
// is my return type void?
};
-#endif /* _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_CS_H_ */
+#endif /* _BE_VISITOR_OPERATION_AMI_HANDLER_THRU_POA_COLLOCATED_SS_H_ */
diff --git a/TAO/tao/Asynch_Invocation.cpp b/TAO/tao/Asynch_Invocation.cpp
index 13808315557..730e7556cdf 100644
--- a/TAO/tao/Asynch_Invocation.cpp
+++ b/TAO/tao/Asynch_Invocation.cpp
@@ -2,7 +2,8 @@
#include "tao/Asynch_Invocation.h"
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING)
+#if defined (TAO_HAS_AMI_CALLBACK) || defined (TAO_HAS_AMI_POLLER)
#include "tao/Timeprobe.h"
#include "tao/Stub.h"
@@ -123,4 +124,5 @@ TAO_GIOP_Twoway_Asynch_Invocation::invoke_i (CORBA::Environment &ACE_TRY_ENV)
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+#endif /* TAO_HAS_AMI_CALLBACK || TAO_HAS_AMI_POLLER */
+#endif /* TAO_HAS_CORBA_MESSAGING */
diff --git a/TAO/tao/Asynch_Invocation.h b/TAO/tao/Asynch_Invocation.h
index e4f960ac644..ceabbcbe09e 100644
--- a/TAO/tao/Asynch_Invocation.h
+++ b/TAO/tao/Asynch_Invocation.h
@@ -24,10 +24,13 @@
#include "tao/Invocation.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
+# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING)
+
+# if defined (TAO_HAS_AMI_CALLBACK) || (TAO_HAS_AMI_POLLER)
+
#include "tao/MessagingC.h"
class TAO_Export TAO_GIOP_Twoway_Asynch_Invocation : public TAO_GIOP_Invocation
@@ -94,7 +97,11 @@ private:
};
#if defined (__ACE_INLINE__)
-# include "tao/Asynch_Invocation.i"
+# include "tao/Asynch_Invocation.i"
#endif /* __ACE_INLINE__ */
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+
+# endif /* TAO_HAS_AMI_CALLBACK || TAO_HAS_AMI_POLLER */
+
+#endif /* TAO_HAS_CORBA_MESSAGING */
+
#endif /* TAO_ASYNCH_INVOCATION_H */
diff --git a/TAO/tao/MessagingC.cpp b/TAO/tao/MessagingC.cpp
index c079033d2b4..a00e88979c8 100644
--- a/TAO/tao/MessagingC.cpp
+++ b/TAO/tao/MessagingC.cpp
@@ -1217,7 +1217,8 @@ TAO_NAMESPACE_END
// ****************************************************************
-#if defined(TAO_POLLER)
+#if defined (TAO_HAS_AMI_POLLER)
+
static const CORBA::Long _oc_Messaging_ExceptionHolder[] =
{
TAO_ENCAP_BYTE_ORDER, // byte order
@@ -1270,10 +1271,15 @@ static const CORBA::Long _oc_Messaging_ExceptionHolder__tao_seq_Octet[] =
0,
};
static CORBA::TypeCode _tc_TAO_tc_Messaging_ExceptionHolder__tao_seq_Octet (CORBA::tk_sequence, sizeof (_oc_Messaging_ExceptionHolder__tao_seq_Octet), (char *) &_oc_Messaging_ExceptionHolder__tao_seq_Octet, 0, sizeof (Messaging::ExceptionHolder::_tao_seq_Octet));
+
CORBA::TypeCode_ptr Messaging::ExceptionHolder::_tc__tao_seq_Octet = &_tc_TAO_tc_Messaging_ExceptionHolder__tao_seq_Octet;
+#endif /* TAO_HAS_AMI_POLLER */
+
// ****************************************************************
+#if defined(TAO_HAS_AMI_CALLBACK)
+
Messaging::ReplyHandler_ptr Messaging::ReplyHandler::_narrow (
CORBA::Object_ptr obj,
CORBA::Environment &ACE_TRY_ENV
@@ -1336,6 +1342,9 @@ TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ReplyHandler, &_tc_TAO_tc_Messaging_ReplyHandler)
TAO_NAMESPACE_END
+#endif /* TAO_HAS_AMI_CALLBACK */
+
+#if defined(TAO_HAS_AMI_POLLER)
Messaging::Poller_ptr Messaging::Poller::_narrow (
CORBA::Object_ptr obj,
@@ -2015,7 +2024,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValueSe
// ****************************************************************
-#if defined(TAO_POLLER)
+#if defined(TAO_HAS_AMI_POLLER)
void operator<<= (CORBA::Any &_tao_any, const Messaging::ExceptionHolder &_tao_elem) // copying
{
Messaging::ExceptionHolder *_any_val;
@@ -2185,29 +2194,29 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::Poller_ptr &_
ACE_ENDTRY;
return 0;
}
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class TAO_Unbounded_Sequence<Messaging::PolicyValue>;
-#if defined(TAO_POLLER)
+#if defined(TAO_HAS_AMI_POLLER)
template class TAO_Object_Field_T<Messaging::ReplyHandler,Messaging::ReplyHandler_var>;
template class TAO_Object_Field_T<Messaging::Poller,Messaging::Poller_var>;
template class TAO_Object_Manager<Messaging::ReplyHandler,Messaging::ReplyHandler_var>;
template class TAO_Object_Manager<Messaging::Poller,Messaging::Poller_var>;
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate TAO_Unbounded_Sequence<Messaging::PolicyValue>
-#if defined(TAO_POLLER)
+#if defined(TAO_HAS_AMI_POLLER)
# pragma instantiate TAO_Object_Field_T<Messaging::ReplyHandler,Messaging::ReplyHandler_var>
# pragma instantiate TAO_Object_Field_T<Messaging::Poller,Messaging::Poller_var>
# pragma instantiate TAO_Object_Manager<Messaging::ReplyHandler,Messaging::ReplyHandler_var>
# pragma instantiate TAO_Object_Manager<Messaging::Poller,Messaging::Poller_var>
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/MessagingC.h b/TAO/tao/MessagingC.h
index e97761b33f1..18f1d1fa7cd 100644
--- a/TAO/tao/MessagingC.h
+++ b/TAO/tao/MessagingC.h
@@ -1551,7 +1551,8 @@ TAO_NAMESPACE Messaging
TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong INVOCATION_POLICIES;
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_POLLER)
+
struct TAO_Export ExceptionHolder
{
CORBA::Boolean is_system_exception;
@@ -1637,6 +1638,10 @@ TAO_NAMESPACE Messaging
TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ExceptionHolder;
+#endif /* TAO_HAS_AMI_POLLER */
+
+#if defined (TAO_HAS_AMI_CALLBACK)
+
class ReplyHandler;
typedef ReplyHandler *ReplyHandler_ptr;
@@ -1724,6 +1729,10 @@ TAO_NAMESPACE Messaging
TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ReplyHandler;
+#endif /* TAO_HAS_AMI_CALLBACK */
+
+#if defined (TAO_HAS_AMI_POLLER)
+
class Poller;
typedef Poller *Poller_ptr;
@@ -1839,7 +1848,7 @@ TAO_NAMESPACE Messaging
};
TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_Poller;
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
}
TAO_NAMESPACE_CLOSE // module Messaging
@@ -1849,13 +1858,13 @@ TAO_NAMESPACE_CLOSE // module Messaging
class TAO_InputCDR;
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_CALLBACK)
typedef void (*TAO_Reply_Handler_Skeleton)(
TAO_InputCDR &,
Messaging::ReplyHandler *,
CORBA::Environment &
);
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_CALLBACK */
void TAO_Export operator<<= (CORBA::Any &, Messaging::PriorityRange*); // noncopying version
CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::PriorityRange *&);
@@ -1871,17 +1880,20 @@ void TAO_Export operator<<= (CORBA::Any &, const Messaging::PolicyValueSeq &); /
void TAO_Export operator<<= (CORBA::Any &, Messaging::PolicyValueSeq*); // noncopying version
CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::PolicyValueSeq *&);
-#if defined (TAO_POLLER)
-void TAO_Export operator<<= (CORBA::Any &, const Messaging::ExceptionHolder &); // copying version
-void TAO_Export operator<<= (CORBA::Any &, Messaging::ExceptionHolder*); // noncopying version
-CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::ExceptionHolder *&);
+#if defined (TAO_HAS_AMI_CALLBACK)
// Any operators for interface Messaging::ReplyHandler
void TAO_Export operator<<= (CORBA::Any &, Messaging::ReplyHandler_ptr);
CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::ReplyHandler *&);
+#endif /* TAO_HAS_AMI_CALLBACK */
+
+#if defined (TAO_HAS_AMI_POLLER)
+void TAO_Export operator<<= (CORBA::Any &, const Messaging::ExceptionHolder &); // copying version
+void TAO_Export operator<<= (CORBA::Any &, Messaging::ExceptionHolder*); // noncopying version
+CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::ExceptionHolder *&);
// Any operators for interface Messaging::Poller
void TAO_Export operator<<= (CORBA::Any &, Messaging::Poller_ptr);
CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::Poller *&);
-#endif
+#endif /* TAO_HAS_AMI_POLLER */
#ifndef __ACE_INLINE__
@@ -1896,15 +1908,18 @@ CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, Messaging::PolicyValue::_t
CORBA::Boolean TAO_Export operator<< (TAO_OutputCDR &, const Messaging::PolicyValueSeq &); //
CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, Messaging::PolicyValueSeq &);
-#if defined (TAO_POLLER)
-CORBA::Boolean TAO_Export operator<< (TAO_OutputCDR &, const Messaging::ExceptionHolder &); //
-CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, Messaging::ExceptionHolder &);
-CORBA::Boolean TAO_Export operator<< (TAO_OutputCDR &, const Messaging::ExceptionHolder::_tao_seq_Octet &); //
-CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, Messaging::ExceptionHolder::_tao_seq_Octet &);
+#if defined (TAO_HAS_AMI_CALLBACK)
CORBA::Boolean TAO_Export
operator<< (TAO_OutputCDR &, const Messaging::ReplyHandler_ptr );
CORBA::Boolean TAO_Export
operator>> (TAO_InputCDR &, Messaging::ReplyHandler_ptr &);
+#endif /* TAO_HAS_AMI_CALLBACK */
+
+#if defined (TAO_HAS_AMI_POLLER)
+CORBA::Boolean TAO_Export operator<< (TAO_OutputCDR &, const Messaging::ExceptionHolder &); //
+CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, Messaging::ExceptionHolder &);
+CORBA::Boolean TAO_Export operator<< (TAO_OutputCDR &, const Messaging::ExceptionHolder::_tao_seq_Octet &); //
+CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, Messaging::ExceptionHolder::_tao_seq_Octet &);
CORBA::Boolean TAO_Export
operator<< (TAO_OutputCDR &, const Messaging::Poller_ptr );
CORBA::Boolean TAO_Export
diff --git a/TAO/tao/MessagingS.cpp b/TAO/tao/MessagingS.cpp
index 920a0795a66..23248cb434a 100644
--- a/TAO/tao/MessagingS.cpp
+++ b/TAO/tao/MessagingS.cpp
@@ -1284,7 +1284,7 @@ POA_Messaging::QueueOrderPolicy::_this (CORBA_Environment &ACE_TRY_ENV)
// ****************************************************************
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_CALLBACK)
POA_Messaging::ReplyHandler::ReplyHandler (void)
{
}
@@ -1366,8 +1366,12 @@ POA_Messaging::ReplyHandler::_this (CORBA_Environment &ACE_TRY_ENV)
return new POA_Messaging::_tao_collocated_ReplyHandler (this, stub);
}
+#endif /* TAO_HAS_AMI_CALLBACK */
+
// ****************************************************************
+#if defined (TAO_HAS_AMI_POLLER)
+
class TAO_Messaging_Poller_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable
{
private:
@@ -1847,6 +1851,6 @@ POA_Messaging::Poller::_this (CORBA_Environment &ACE_TRY_ENV)
ACE_CHECK_RETURN (0);
return new POA_Messaging::_tao_collocated_Poller (this, stub);
}
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
#endif /* TAO_HAS_CORBA_MESSAGING */
diff --git a/TAO/tao/MessagingS.h b/TAO/tao/MessagingS.h
index fcc21b667a2..b321a983cdd 100644
--- a/TAO/tao/MessagingS.h
+++ b/TAO/tao/MessagingS.h
@@ -1602,7 +1602,8 @@ private:
#endif /* ACE_HAS_USING_KEYWORD */
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_CALLBACK)
+
class ReplyHandler;
typedef ReplyHandler *ReplyHandler_ptr;
class TAO_Export ReplyHandler : public virtual PortableServer::ServantBase
@@ -1716,6 +1717,10 @@ private:
#endif /* ACE_HAS_USING_KEYWORD */
+#endif /* TAO_HAS_AMI_CALLBACK */
+
+#if defined (TAO_HAS_AMI_POLLER)
+
class Poller;
typedef Poller *Poller_ptr;
class TAO_Export Poller : public virtual POA_CORBA::Pollable
@@ -1997,7 +2002,7 @@ private:
};
#endif /* ACE_HAS_USING_KEYWORD */
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
}
TAO_NAMESPACE_CLOSE
diff --git a/TAO/tao/MessagingS_T.cpp b/TAO/tao/MessagingS_T.cpp
index 0ae3a1f8db0..f1a0e7ac7fb 100644
--- a/TAO/tao/MessagingS_T.cpp
+++ b/TAO/tao/MessagingS_T.cpp
@@ -140,7 +140,7 @@ POA_Messaging::QueueOrderPolicy_tie<T>::_default_POA (CORBA::Environment &ACE_TR
return this->QueueOrderPolicy::_default_POA (ACE_TRY_ENV);
}
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_CALLBACK)
template <class T> PortableServer::POA_ptr
POA_Messaging::ReplyHandler_tie<T>::_default_POA (CORBA::Environment &ACE_TRY_ENV)
@@ -151,6 +151,10 @@ POA_Messaging::ReplyHandler_tie<T>::_default_POA (CORBA::Environment &ACE_TRY_EN
return this->ReplyHandler::_default_POA (ACE_TRY_ENV);
}
+#endif /* TAO_HAS_AMI_CALLBACK */
+
+#if defined (TAO_HAS_AMI_POLLER)
+
template <class T> PortableServer::POA_ptr
POA_Messaging::Poller_tie<T>::_default_POA (CORBA::Environment &ACE_TRY_ENV)
{
@@ -159,6 +163,6 @@ POA_Messaging::Poller_tie<T>::_default_POA (CORBA::Environment &ACE_TRY_ENV)
return this->Poller::_default_POA (ACE_TRY_ENV);
}
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
#endif /* ifndef */
diff --git a/TAO/tao/POA_CORBA.h b/TAO/tao/POA_CORBA.h
index 6cac720d608..0fd6e34868c 100644
--- a/TAO/tao/POA_CORBA.h
+++ b/TAO/tao/POA_CORBA.h
@@ -39,9 +39,9 @@
#include "tao/DynAnyC.h"
#include "tao/DomainC.h"
#include "tao/Servant_Base.h"
-#if defined(TAO_POLLER)
+#if defined(TAO_HAS_AMI_POLLER)
#include "tao/PollableC.h"
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
#if defined(_MSC_VER)
#pragma warning(disable:4250)
@@ -421,7 +421,8 @@ public:
// ****************************************************************
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_POLLER)
+
class Pollable;
typedef Pollable *Pollable_ptr;
class TAO_Export Pollable : public virtual PortableServer::ServantBase
@@ -759,7 +760,7 @@ public:
private:
PollableSet_ptr servant_;
};
-#endif /* 0 */
+#endif /* TAO_HAS_AMI_POLLER */
// ****************************************************************
diff --git a/TAO/tao/PollableC.cpp b/TAO/tao/PollableC.cpp
index 3dc24e91601..612e8799ccb 100644
--- a/TAO/tao/PollableC.cpp
+++ b/TAO/tao/PollableC.cpp
@@ -19,7 +19,7 @@
#include "tao/PollableC.h"
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_HAS_AMI_POLLER)
#include "tao/POA_CORBA.h"
#include "tao/Stub.h"
@@ -1108,4 +1108,4 @@ operator>> (
return 0;
}
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_AMI_POLLER */
diff --git a/TAO/tao/PollableC.h b/TAO/tao/PollableC.h
index 28562d59e52..fe7559c8b2a 100644
--- a/TAO/tao/PollableC.h
+++ b/TAO/tao/PollableC.h
@@ -22,7 +22,7 @@
#include "tao/corbafwd.h"
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_HAS_AMI_POLLER)
#include "tao/Object.h"
#include "tao/Exception.h"
@@ -437,6 +437,6 @@ CORBA::Boolean TAO_Export operator>> (TAO_InputCDR &, CORBA_PollableSet::Unknown
#pragma warning(default:4250)
#endif /* _MSC_VER */
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_AMI_POLLER */
#endif /* TAO_IDL_POLLABLEC_H */
diff --git a/TAO/tao/PollableS.cpp b/TAO/tao/PollableS.cpp
index 7471731932d..6d936516930 100644
--- a/TAO/tao/PollableS.cpp
+++ b/TAO/tao/PollableS.cpp
@@ -19,7 +19,7 @@
#include "tao/PollableS.h"
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_HAS_AMI_POLLER)
#include "tao/Operation_Table.h"
#include "tao/Server_Request.h"
@@ -947,4 +947,4 @@ POA_CORBA::PollableSet::_this (CORBA_Environment &ACE_TRY_ENV)
ACE_CHECK_RETURN (0);
return new POA_CORBA::_tao_collocated_PollableSet (this, stub);
}
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_AMI_POLLER */
diff --git a/TAO/tao/PollableS.h b/TAO/tao/PollableS.h
index 28e974ac352..10c519c1a69 100644
--- a/TAO/tao/PollableS.h
+++ b/TAO/tao/PollableS.h
@@ -22,7 +22,7 @@
#include "tao/PollableC.h"
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_HAS_AMI_POLLER)
#include "tao/POA_CORBA.h"
@@ -233,6 +233,6 @@ TAO_NAMESPACE_CLOSE
#pragma warning(default:4250)
#endif /* _MSC_VER */
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_AMI_POLLER */
#endif /* ifndef */
diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp
index b4d2e233370..eb60f7c469e 100644
--- a/TAO/tao/Reply_Dispatcher.cpp
+++ b/TAO/tao/Reply_Dispatcher.cpp
@@ -133,7 +133,10 @@ TAO_Synch_Reply_Dispatcher::leader_follower_condition_variable (TAO_Transport *t
}
// *********************************************************************
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+#if defined (TAO_HAS_CORBA_MESSAGING)
+
+#if defined (TAO_HAS_AMI_CALLBACK) || defined (TAO_HAS_AMI_POLLER)
+
// Constructor.
TAO_Asynch_Reply_Dispatcher::TAO_Asynch_Reply_Dispatcher (const TAO_Reply_Handler_Skeleton &reply_handler_skel,
Messaging::ReplyHandler_ptr reply_handler_ptr)
@@ -202,4 +205,6 @@ TAO_Asynch_Reply_Dispatcher::message_state (void)
return this->message_state_;
}
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+#endif /* TAO_HAS_AMI_CALLBACK || TAO_HAS_AMI_POLLER */
+
+#endif /* TAO_HAS_CORBA_MESSAGING */
diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h
index 41682c3609f..8b3dae7fbc9 100644
--- a/TAO/tao/Reply_Dispatcher.h
+++ b/TAO/tao/Reply_Dispatcher.h
@@ -140,7 +140,11 @@ private:
};
// *********************************************************************
-#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+
+#if defined (TAO_HAS_CORBA_MESSAGING)
+
+# if defined (TAO_HAS_AMI_CALLBACK) || defined (TAO_HAS_AMI_POLLER)
+
class TAO_Export TAO_Asynch_Reply_Dispatcher : public TAO_Reply_Dispatcher
{
// = TITLE
@@ -194,7 +198,11 @@ private:
Messaging::ReplyHandler_ptr reply_handler_;
// Reply Handler passed in the Asynchronous Invocation.
};
-#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+
+# endif /* TAO_HAS_AMI_CALLBACK || TAO_HAS_AMI_POLLER */
+
+#endif /* TAO_HAS_CORBA_MESSAGING */
+
// *********************************************************************
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/Typecode_Constants.cpp b/TAO/tao/Typecode_Constants.cpp
index dc4a96c0949..83350f7d670 100644
--- a/TAO/tao/Typecode_Constants.cpp
+++ b/TAO/tao/Typecode_Constants.cpp
@@ -41,9 +41,9 @@
#include "tao/NVList.h"
#include "tao/BoundsC.h"
-#if defined(TAO_POLLER)
+#if defined(TAO_HAS_AMI_POLLER)
#include "tao/PollableC.h"
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
ACE_RCSID(tao, Typecode_Constants, "$Id$")
@@ -1615,7 +1615,7 @@ TAO_TypeCodes::init (void)
// ****************************************************************
-#if defined(TAO_POLLER)
+#if defined(TAO_HAS_AMI_POLLER)
static const CORBA::Long _oc_CORBA_Pollable[] =
{
TAO_ENCAP_BYTE_ORDER, // byte order
@@ -1693,7 +1693,7 @@ TAO_TypeCodes::init (void)
0,
sizeof (CORBA_PollableSet));
-#endif /* TAO_POLLER */
+#endif /* TAO_HAS_AMI_POLLER */
// ****************************************************************
@@ -1977,13 +1977,13 @@ TAO_TypeCodes::fini (void)
CORBA::release (CORBA::_tc_DomainManagerList);
-#if defined (TAO_POLLER)
+#if defined (TAO_HAS_AMI_POLLER)
CORBA::release (CORBA::_tc_Pollable);
CORBA::release (CORBA::_tc_DIIPollable);
CORBA::release (CORBA::_tc_PollableSet);
-#endif /* defined (TAO_POLLER) */
+#endif /* defined (TAO_HAS_AMI_POLLER) */
// Service types
//= Service type
diff --git a/TAO/tests/AMI/client.cpp b/TAO/tests/AMI/client.cpp
index 75f324dcf67..6aa96e798cc 100644
--- a/TAO/tests/AMI/client.cpp
+++ b/TAO/tests/AMI/client.cpp
@@ -3,6 +3,7 @@
#include "ace/Get_Opt.h"
#include "ace/Task.h"
#include "testC.h"
+#include "testS.h"
ACE_RCSID(MT_Client, client, "$Id$")
@@ -58,24 +59,24 @@ class Client : public ACE_Task_Base
// Use the ACE_Task_Base class to run the client threads.
//
public:
- Client (Simple_Server_ptr server, int niterations);
+ Client (A::Simple_Server_ptr server, int niterations);
// ctor
virtual int svc (void);
// The thread entry point.
// private:
- Simple_Server_var server_;
+ A::Simple_Server_var server_;
// The server.
int niterations_;
// The number of iterations on each client thread.
- AMI_Simple_Server_Handler_var the_handler_;
+ A::AMI_Simple_Server_Handler_var the_handler_;
// Var for ReplyHandler object.
};
-class Handler : public POA_AMI_Simple_Server_Handler
+class Handler : public POA_A::AMI_Simple_Server_Handler
{
public:
Handler (void) {};
@@ -117,8 +118,8 @@ main (int argc, char *argv[])
orb->string_to_object (ior, ACE_TRY_ENV);
ACE_TRY_CHECK;
- Simple_Server_var server =
- Simple_Server::_narrow (object.in (), ACE_TRY_ENV);
+ A::Simple_Server_var server =
+ A::Simple_Server::_narrow (object.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
if (CORBA::is_nil (server.in ()))
@@ -200,9 +201,9 @@ main (int argc, char *argv[])
// ****************************************************************
-Client::Client (Simple_Server_ptr server,
+Client::Client (A::Simple_Server_ptr server,
int niterations)
- : server_ (Simple_Server::_duplicate (server)),
+ : server_ (A::Simple_Server::_duplicate (server)),
niterations_ (niterations)
{
the_handler_ = handler._this (/* ACE_TRY_ENV */);
diff --git a/TAO/tests/AMI/client.dsp b/TAO/tests/AMI/client.dsp
index cce3974642f..d570b0ab1d1 100644
--- a/TAO/tests/AMI/client.dsp
+++ b/TAO/tests/AMI/client.dsp
@@ -7,23 +7,22 @@
CFG=MT_Client Client - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "client.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "client.mak" CFG="MT_Client Client - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "MT_Client Client - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "MT_Client Client - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
+!MESSAGE
+!MESSAGE "MT_Client Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Client Client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
# Begin Project
+# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
@@ -75,7 +74,7 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 taod.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-!ENDIF
+!ENDIF
# Begin Target
@@ -100,6 +99,14 @@ SOURCE=.\testS.cpp
# Begin Group "Header Files"
# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\testC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testS.h
+# End Source File
# End Group
# Begin Group "IDL Files"
@@ -111,7 +118,7 @@ SOURCE=.\test.idl
!IF "$(CFG)" == "MT_Client Client - Win32 Release"
# PROP Ignore_Default_Tool 1
-USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
+USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\test.idl
InputName=test
@@ -149,13 +156,13 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "MT_Client Client - Win32 Debug"
-USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
+USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\test.idl
InputName=test
BuildCmds= \
- ..\..\..\bin\tao_idl -Ge 1 $(InputName).idl
+ ..\..\..\bin\tao_idl -Ge 1 -GC $(InputName).idl
"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -185,7 +192,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ENDIF
+!ENDIF
# End Source File
# End Group
diff --git a/TAO/tests/AMI/run_test.pl b/TAO/tests/AMI/run_test.pl
index 06363f75467..6566b815bf1 100755
--- a/TAO/tests/AMI/run_test.pl
+++ b/TAO/tests/AMI/run_test.pl
@@ -5,61 +5,60 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
- # unshift @INC, '../../../bin';
- # require ACEutils;
- #
- # $client_conf="client.global.conf";
- # $client_process="client";
- # $debug_level='5';
- # $threads='2';
- # $iterations='1';
- #
- # foreach $i (@ARGV) {
- # if ($i eq '-tss') {
- # $client_conf = "client.tss.conf";
- # } elsif ($i eq '-debug') {
- # $debug_level = '1';
- # } elsif ($i eq '-creation') {
- # $client_process = 'orb_creation';
- # $threads='2';
- # }
- # }
- #
- # $iorfile = "server.ior";
- # $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- # " -ORBsvcconf server.conf -ORBdebuglevel $debug_level"
- # . " -o $iorfile");
- #
- # if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- # print STDERR "ERROR: cannot find file <$iorfile>\n";
- # $SV->Kill (); $SV->TimedWait (1);
- # exit 1;
- # }
- #
- # $CL = Process::Create ($EXEPREFIX."$client_process$EXE_EXT ",
- # " -ORBsvcconf $client_conf "
- # . "-ORBdebuglevel $debug_level"
- # . " -k file://$iorfile "
- # . " -n $threads -i $iterations");
- #
- # $client = $CL->TimedWait (60);
- # if ($client == -1) {
- # print STDERR "ERROR: client timedout\n";
- # $CL->Kill (); $CL->TimedWait (1);
- # }
- #
- # $server = $SV->TimedWait (5);
- # if ($server == -1) {
- # print STDERR "ERROR: server timedout\n";
- # $SV->Kill (); $SV->TimedWait (1);
- # }
- #
- # unlink $iorfile;
- #
- # if ($server != 0 || $client != 0) {
- # exit 1;
- # }
- #
- # exit 0;
- #
+unshift @INC, '../../../bin';
+require ACEutils;
+$client_conf="client.global.conf";
+$client_process="client";
+$debug_level='5';
+$threads='2';
+$iterations='1';
+
+foreach $i (@ARGV) {
+ if ($i eq '-tss') {
+ $client_conf = "client.tss.conf";
+ } elsif ($i eq '-debug') {
+ $debug_level = '1';
+ } elsif ($i eq '-creation') {
+ $client_process = 'orb_creation';
+ $threads='2';
+ }
+}
+
+$iorfile = "server.ior";
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ " -ORBsvcconf server.conf -ORBdebuglevel $debug_level"
+ . " -o $iorfile");
+
+if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$CL = Process::Create ($EXEPREFIX."$client_process$EXE_EXT ",
+ " -ORBsvcconf $client_conf "
+ . "-ORBdebuglevel $debug_level"
+ . " -k file://$iorfile "
+ . " -n $threads -i $iterations");
+
+$client = $CL->TimedWait (60);
+if ($client == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $CL->Kill (); $CL->TimedWait (1);
+}
+
+$server = $SV->TimedWait (5);
+if ($server == -1) {
+ print STDERR "ERROR: server timedout\n";
+ $SV->Kill (); $SV->TimedWait (1);
+}
+
+unlink $iorfile;
+
+if ($server != 0 || $client != 0) {
+ exit 1;
+}
+
+exit 0;
+
diff --git a/TAO/tests/AMI/server.cpp b/TAO/tests/AMI/server.cpp
index 37f3ccf7595..cb7ee7c7860 100644
--- a/TAO/tests/AMI/server.cpp
+++ b/TAO/tests/AMI/server.cpp
@@ -61,7 +61,7 @@ main (int argc, char *argv[])
Simple_Server_i server_impl (orb.in ());
- Simple_Server_var server =
+ A::Simple_Server_var server =
server_impl._this (ACE_TRY_ENV);
ACE_TRY_CHECK;
diff --git a/TAO/tests/AMI/server.dsp b/TAO/tests/AMI/server.dsp
index b7c07f7179b..c0d30c0293e 100644
--- a/TAO/tests/AMI/server.dsp
+++ b/TAO/tests/AMI/server.dsp
@@ -17,13 +17,12 @@ CFG=MT_Client Server - Win32 Debug
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "MT_Client Server - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "MT_Client Server - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
+!MESSAGE "MT_Client Server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Client Server - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
+# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
@@ -165,7 +164,7 @@ InputPath=.\test.idl
InputName=test
BuildCmds= \
- ..\..\..\bin\tao_idl -Ge 1 $(InputName).idl
+ ..\..\..\bin\tao_idl -Ge 1 -GC $(InputName).idl
"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/TAO/tests/AMI/test.idl b/TAO/tests/AMI/test.idl
index 8fa715984b1..3d7a3e42317 100644
--- a/TAO/tests/AMI/test.idl
+++ b/TAO/tests/AMI/test.idl
@@ -2,6 +2,8 @@
* $Id$
*/
+module A {
+
interface Simple_Server
{
long get_put_number (out long out_l, in long in_l);
@@ -10,3 +12,5 @@ interface Simple_Server
oneway void shutdown ();
};
+
+};
diff --git a/TAO/tests/AMI/test_i.cpp b/TAO/tests/AMI/test_i.cpp
index 1b199315a26..31857fb3186 100644
--- a/TAO/tests/AMI/test_i.cpp
+++ b/TAO/tests/AMI/test_i.cpp
@@ -8,7 +8,7 @@
#endif /* __ACE_INLINE__ */
ACE_RCSID(MT_Client, test_i, "$Id$")
-
+#if 0
void
Simple_Server_i::test_method (CORBA::Environment&)
ACE_THROW_SPEC ((CORBA::SystemException))
@@ -18,6 +18,7 @@ Simple_Server_i::test_method (CORBA::Environment&)
"%N:%l:(%P:%t):Simple_Server_i::test_method called\n"));
}
+
CORBA::Long
Simple_Server_i::get_number (CORBA::Environment&)
ACE_THROW_SPEC ((CORBA::SystemException))
@@ -38,7 +39,7 @@ Simple_Server_i::put_number (CORBA::Long l,
"%N:%l:(%P:%t):Simple_Server_i::put_number: %d\n",
l));
}
-
+#endif // 0
CORBA::Long
Simple_Server_i::get_put_number (CORBA::Long_out out_l,
CORBA::Long in_l,
diff --git a/TAO/tests/AMI/test_i.h b/TAO/tests/AMI/test_i.h
index b6567cec81e..a6e80b4f30e 100644
--- a/TAO/tests/AMI/test_i.h
+++ b/TAO/tests/AMI/test_i.h
@@ -18,7 +18,7 @@
#include "testS.h"
-class Simple_Server_i : public POA_Simple_Server
+class Simple_Server_i : public POA_A::Simple_Server
{
// = TITLE
// Simpler Server implementation