summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-08-24 10:43:46 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-08-24 10:43:46 +0000
commitdff70d7aaeffb106b4a654e9cf84abe668f29f56 (patch)
tree25bf16deea36da5beaffedaa528c91e89740e77b /TAO/TAO_IDL
parent02ef8d639468fc6e03a57aaab83bb5263209dcc9 (diff)
downloadATCD-dff70d7aaeffb106b4a654e9cf84abe668f29f56.tar.gz
ChangeLogTag: Tue Aug 24 5:30:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de>
Diffstat (limited to 'TAO/TAO_IDL')
-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
24 files changed, 287 insertions, 904 deletions
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_ */