summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a74
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp24
-rw-r--r--TAO/TAO_IDL/be/be_visitor_factory.cpp26
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp150
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_ss.cpp205
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface.cpp83
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp27
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp116
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp171
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_sh.cpp124
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp188
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_sh.cpp124
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp227
-rw-r--r--TAO/TAO_IDL/be_include/be_codegen.h14
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface.h8
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_sh.h42
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_ss.h47
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_sh.h42
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_ss.h47
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_sh.h51
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h57
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_sh.h52
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h57
-rw-r--r--TAO/tao/Abstract_Servant_Base.h3
-rw-r--r--TAO/tao/Object.cpp13
-rw-r--r--TAO/tao/Object.h6
-rw-r--r--TAO/tao/Object_Proxy_Impl.h3
-rw-r--r--TAO/tao/PortableServer/Collocated_Object.cpp46
-rw-r--r--TAO/tao/PortableServer/Collocated_Object.h2
-rw-r--r--TAO/tao/PortableServer/Direct_Object_Proxy_Impl.cpp23
-rw-r--r--TAO/tao/PortableServer/Direct_Object_Proxy_Impl.h3
-rw-r--r--TAO/tao/PortableServer/Servant_Base.cpp24
-rw-r--r--TAO/tao/PortableServer/Servant_Base.h6
-rw-r--r--TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.cpp35
-rw-r--r--TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h3
-rw-r--r--TAO/tao/Remote_Object_Proxy_Impl.cpp67
-rw-r--r--TAO/tao/Remote_Object_Proxy_Impl.h3
-rw-r--r--TAO/tao/ccm_core/Component_Base.idl808
-rw-r--r--TAO/tao/ccm_core/CosPersistentState.idl16
45 files changed, 1190 insertions, 1869 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index af46f6b530b..9ec98893a08 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,73 @@
+Sun May 26 01:18:05 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * tao/Object_Proxy_Impl.h:
+ * tao/Object.cpp:
+ * tao/Object.h: Added a new interface default operation
+ <_get_component>.
+
+ * tao/Abstract_Servant_Base.h:
+ * tao/Remote_Object_Proxy_Impl.cpp:
+ * tao/Remote_Object_Proxy_Impl.h: Provided a canned stub
+ implementation for the generic <_get_component> operation.
+
+ * tao/PortableServer/Servant_Base.cpp:
+ * tao/PortableServer/Servant_Base.h: Provided default
+ implementation for the <_get_component> implementation for
+ non-components. Currently, this operation always return a nil
+ object reference.
+
+ * tao/PortableServer/Direct_Object_Proxy_Impl.cpp:
+ * tao/PortableServer/Direct_Object_Proxy_Impl.h:
+ * tao/PortableServer/ThruPOA_Object_Proxy_Impl.cpp:
+ * tao/PortableServer/ThruPOA_Object_Proxy_Impl.h: Provided canned
+ collocated stub implementations for the <_get_component>
+ operation.
+
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be/be_visitor_interface/amh_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_ss.cpp: Added code to
+ generate skeleton implementation for oepration <_get_component>
+ , whose name, according to the spec., should be sent as
+ "_component".
+
+ * TAO_IDL/be_include/be_codegen.h:
+ * TAO_IDL/be_include/be_visitor_interface.h:
+ * TAO_IDL/be_include/be_visitor_operation.h:
+ * TAO_IDL/be/be_visitor_attribute/attribute.cpp:
+ * TAO_IDL/be/be_visitor_factory.cpp:
+ * TAO_IDL/be/be_visitor_interface.cpp:
+ * TAO_IDL/be/be_visitor_operation.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface.cpp: Removed obsolete
+ code generation states and their transitions.
+
+ * TAO_IDL/be_include/be_visitor_operation/direct_collocated_sh.h:
+ * TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h:
+ * TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_sh.h:
+ * TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h:
+ * TAO_IDL/be_include/be_visitor_interface/direct_collocated_sh.h:
+ * TAO_IDL/be_include/be_visitor_interface/direct_collocated_ss.h:
+ * TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_sh.h:
+ * TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_ss.h:
+ * TAO_IDL/be/be_visitor_operation/direct_collocated_sh.cpp:
+ * TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/thru_poa_collocated_sh.cpp:
+ * TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp:
+ * TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/direct_collocated_ss.cpp:
+ * TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp:
+ * TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp:
+ Removed old collocated code generators. They were superceded
+ long ago.
+
+ * tao/PortableServer/Collocated_Object.cpp:
+ * tao/PortableServer/Collocated_Object.h: Added the implementation
+ for <_get_component>. This class should be removed but they are
+ still being used in
+ TAO/tao/DynamicInterface/Dynamic_Implementation.cpp. We need to
+ remove these file once we remove the only usage in
+ aforementioned file.
+
Fri May 24 11:46:40 2002 Jeff Parsons <parsons@cs.wustl.edu>
* TAO_IDL/be/be_visitor_field/field_ch.cpp:
@@ -13,9 +83,9 @@ Fri May 24 11:46:40 2002 Jeff Parsons <parsons@cs.wustl.edu>
but it may cause problems of its own for deeply nested
modules. So a check for the type of foo's container was added
to code generation in field_ch.cpp. Also, a context sub-state
- called TAO_USE_FULL_NAME had been added as a helper for
+ called TAO_USE_FULL_NAME had been added as a helper for
valuetype field code generation, and this has been removed
- since it is no longer needed. Thanks to Keith Thornton
+ since it is no longer needed. Thanks to Keith Thornton
<keith.thornton.kt@germany.agfa.com> for sending in the use
case that uncovered the bug.
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index b82f7886afd..8828a82244b 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -1216,6 +1216,12 @@ be_interface::gen_operation_table (const char *flat_name,
this->skel_count_++;
os->indent ();
+ *os << "_component, &"
+ << skeleton_class_name
+ << "::_component_skel\n";
+ this->skel_count_++;
+
+ os->indent ();
*os << "_interface, &"
<< skeleton_class_name
<< "::_interface_skel\n";
diff --git a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp
index c95b0d52563..d888053524e 100644
--- a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp
@@ -106,18 +106,6 @@ be_visitor_attribute::visit_attribute (be_attribute *node)
case TAO_CodeGen::TAO_ATTRIBUTE_IS:
ctx.state (TAO_CodeGen::TAO_OPERATION_IS);
break;
- case TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SS);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SS);
- break;
case TAO_CodeGen::TAO_ATTRIBUTE_BASE_PROXY_IMPL_CH:
ctx.state (TAO_CodeGen::TAO_OPERATION_BASE_PROXY_IMPL_CH);
@@ -263,18 +251,6 @@ be_visitor_attribute::visit_attribute (be_attribute *node)
case TAO_CodeGen::TAO_ATTRIBUTE_IS:
ctx.state (TAO_CodeGen::TAO_OPERATION_IS);
break;
- case TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SS);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SS);
- break;
case TAO_CodeGen::TAO_ATTRIBUTE_BASE_PROXY_IMPL_CH:
ctx.state (TAO_CodeGen::TAO_OPERATION_BASE_PROXY_IMPL_CH);
diff --git a/TAO/TAO_IDL/be/be_visitor_factory.cpp b/TAO/TAO_IDL/be/be_visitor_factory.cpp
index 20b88782b2a..52b6c1fa471 100644
--- a/TAO/TAO_IDL/be/be_visitor_factory.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_factory.cpp
@@ -208,20 +208,6 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx)
case TAO_CodeGen::TAO_INTERFACE_DIRECT_PROXY_IMPL_SS:
return new be_visitor_interface_direct_proxy_impl_ss (new_ctx);
- // Old Collocation Stuff.
-
- case TAO_CodeGen::TAO_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:
- return new be_visitor_interface_thru_poa_collocated_ss (new_ctx);
-
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- return new be_visitor_interface_direct_collocated_sh (new_ctx);
-
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
- return new be_visitor_interface_direct_collocated_ss (new_ctx);
-
case TAO_CodeGen::TAO_INTERFACE_ANY_OP_CH:
return new be_visitor_interface_any_op_ch (new_ctx);
case TAO_CodeGen::TAO_INTERFACE_ANY_OP_CS:
@@ -486,10 +472,6 @@ TAO_Common_Visitor_Factory::make_visitor (be_visitor_context *ctx)
case TAO_CodeGen::TAO_ATTRIBUTE_IS:
case TAO_CodeGen::TAO_ATTRIBUTE_TIE_SH:
case TAO_CodeGen::TAO_ATTRIBUTE_TIE_SI:
- case TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_ATTRIBUTE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_ATTRIBUTE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_ATTRIBUTE_INTERCEPTORS_CH:
@@ -587,14 +569,6 @@ TAO_Compiled_Visitor_Factory::make_visitor (be_visitor_context *ctx)
return new be_visitor_operation_is (new_ctx);
case TAO_CodeGen::TAO_OPERATION_IH:
return new be_visitor_operation_ih (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SH:
- return new be_visitor_operation_thru_poa_collocated_sh (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SS:
- return new be_visitor_operation_thru_poa_collocated_ss (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SH:
- return new be_visitor_operation_direct_collocated_sh (new_ctx);
- case TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SS:
- return new be_visitor_operation_direct_collocated_ss (new_ctx);
case TAO_CodeGen::TAO_OPERATION_SMART_PROXY_CH:
return new be_visitor_operation_smart_proxy_ch (new_ctx);
case TAO_CodeGen::TAO_OPERATION_SMART_PROXY_CS:
diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp
index ce1cfefe2a5..3334d14f4fa 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface.cpp
@@ -32,10 +32,10 @@
#include "be_visitor_interface/interface_si.cpp"
#include "be_visitor_interface/interface_ss.cpp"
#include "be_visitor_interface/interface_is.cpp"
-#include "be_visitor_interface/thru_poa_collocated_sh.cpp"
-#include "be_visitor_interface/thru_poa_collocated_ss.cpp"
-#include "be_visitor_interface/direct_collocated_sh.cpp"
-#include "be_visitor_interface/direct_collocated_ss.cpp"
+// #include "be_visitor_interface/thru_poa_collocated_sh.cpp"
+// #include "be_visitor_interface/thru_poa_collocated_ss.cpp"
+// #include "be_visitor_interface/direct_collocated_sh.cpp"
+// #include "be_visitor_interface/direct_collocated_ss.cpp"
#include "be_visitor_interface/tie_sh.cpp"
#include "be_visitor_interface/tie_si.cpp"
#include "be_visitor_interface/any_op_ch.cpp"
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp
index 5b7ff0cf05b..2d01cd2ee3b 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp
@@ -153,6 +153,14 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node)
<< "ACE_ENV_ARG_DECL" << be_uidt_nl
<< ");\n" << be_uidt_nl;
+ // Add a skeleton for our _component method.
+ *os << "static void _component_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *obj," << be_nl
+ << "void *servant_upcall" << be_nl
+ << "ACE_ENV_ARG_DECL" << be_uidt_nl
+ << ");\n" << be_uidt_nl;
+
// Add the dispatch method.
*os << "virtual void _dispatch (" << be_idt << be_idt_nl
<< "TAO_ServerRequest &req," << be_nl
@@ -297,7 +305,7 @@ be_visitor_amh_interface_sh::add_amh_operation (be_operation *node,
);
UTL_ScopedName *op_name =
- ACE_static_cast (UTL_ScopedName *,
+ ACE_static_cast (UTL_ScopedName *,
amh_node->name ()->copy ());
ACE_NEW_RETURN (id,
@@ -383,7 +391,7 @@ be_visitor_amh_interface_sh::create_amh_class (ACE_CString name)
UTL_ScopedName *amh_class_name = 0;
ACE_NEW_RETURN (amh_class_name,
- UTL_ScopedName (id,
+ UTL_ScopedName (id,
0),
0);
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp
deleted file mode 100644
index fa2aebe35da..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_sh.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for direct_collocated classes for the Interface node
-// inside the server header.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-ACE_RCSID(be_visitor_interface, direct_collocated_sh, "$Id$")
-
-
-// ************************************************************
-// direct_collocated class in header
-// ************************************************************
-
-be_visitor_interface_direct_collocated_sh::be_visitor_interface_direct_collocated_sh
-(be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_direct_collocated_sh::~be_visitor_interface_direct_collocated_sh (void)
-{
-}
-
-int be_visitor_interface_direct_collocated_sh::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->gen_ifdef_macro (node->flat_name (), "_direct_collocated");
-
- // output the class defn
- os->indent ();
- *os << "class "
- << be_global->skel_export_macro ()
- << " " << node->local_coll_name (be_interface::DIRECT);
- *os << be_idt << be_idt_nl
- << ": public virtual " << node->name () << be_nl
- << ", public virtual TAO_Collocated_Object";
-
- // generate base classes if any
- if (node->n_inherits () > 0)
- {
- for (int i = 0; i < node->n_inherits (); ++i)
- {
- be_interface* parent =
- be_interface::narrow_from_decl (node->inherits()[i]);
- *os << be_nl << ", public virtual "
- << be_interface::relative_name (parent->full_coll_name (be_interface::DIRECT),
- node->full_coll_name (be_interface::DIRECT));
- }
- }
- *os << be_uidt << be_uidt_nl
- << "{" << be_nl
- << "public:\n";
- os->incr_indent ();
-
- *os << node->local_coll_name (be_interface::DIRECT) << " (\n";
-
- os->incr_indent (0);
- os->incr_indent ();
-
- // XXXASG - can we make this a method to return the right name ??
- if (!node->is_nested ())
- {
- // The skeleton name is the outermost, we need to printout the
- // POA_ prefix that goes with it.
- *os << "POA_";
- }
-
- *os << node->local_name () << "_ptr "
- << " servant," << be_nl;
-
- *os << "TAO_Stub *stub\n";
- os->decr_indent ();
- *os << ");\n";
- os->decr_indent (0);
-
- os->indent ();
-
- *os << "virtual CORBA::Boolean _is_a" << be_idt
- << "(" << be_idt_nl
- << "const CORBA::Char *logical_type_id" << be_nl
- << "ACE_ENV_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
-
- *os << "virtual void *_tao_QueryInterface (ptr_arith_t type);\n"
- << be_nl;
-
- if (!node->is_nested ())
- {
- // The skeleton name is the outermost, we need to printout the
- // POA_ prefix that goes with it.
- *os << "POA_";
- }
-
- *os << node->local_name ()
- << "_ptr _get_servant (void) const;" << be_nl << be_nl;
-
- *os << "virtual CORBA::Boolean _non_existent" << be_idt
- << "(" << be_idt_nl
- << "ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_direct_collocated_sh::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
-
- os->decr_indent ();
-
- *os << be_nl << "private:\n";
- os->incr_indent ();
- if (!node->is_nested ())
- {
- // The skeleton name is the outermost, we need to printout the
- // POA_ prefix that goes with it.
- *os << "POA_";
- }
- *os << node->local_name () << "_ptr servant_;\n";
- os->decr_indent ();
- *os << "};\n\n";
-
- os->gen_endif ();
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_ss.cpp
deleted file mode 100644
index 1d9bb2bb34f..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_ss.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_ss.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for direct_collocated classes for an Interface in the
-// server skeleton file.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-ACE_RCSID(be_visitor_interface, direct_collocated_ss, "$Id$")
-
-
-// ************************************************************
-// be_visitor_interface_collacted_ss
-// ************************************************************
-
-be_visitor_interface_direct_collocated_ss::be_visitor_interface_direct_collocated_ss
-(be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_direct_collocated_ss::~be_visitor_interface_direct_collocated_ss (void)
-{
-}
-
-int be_visitor_interface_direct_collocated_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- this->ctx_->node (node);
-
- os->indent ();
- *os << node->full_coll_name (be_interface::DIRECT) << "::"
- << node->local_coll_name (be_interface::DIRECT) << " (\n";
-
- os->incr_indent (0);
- os->incr_indent ();
- *os << node->full_skel_name () << "_ptr "
- << " servant," << be_nl;
-
- *os << "TAO_Stub *stub\n";
- os->decr_indent ();
- *os << ")\n";
- os->decr_indent (0);
-
- os->incr_indent ();
-
- if (node->is_nested ())
- {
- be_decl* scope = be_scope::narrow_from_scope (node->defined_in ())->decl ();
-
- *os << ": ACE_NESTED_CLASS ("
- << scope->name () << ","
- << node->local_name ()
- << ") ()" << be_nl;
- }
- else
- {
- *os << ": " << node->name () << " ()" << be_nl;
- }
-
- // @@ We should call the constructor for all base classes, since we
- // are using multiple inheritance.
-
- if (node->traverse_inheritance_graph (be_visitor_interface_direct_collocated_ss::collocated_ctor_helper, os)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_direct_collocated_ss::"
- "visit_interface - "
- "codegen for base class ctor init failed\n"),
- -1);
- }
-
- *os << be_nl << ", TAO_Collocated_Object (stub, 1, servant)"
- << be_nl << ", CORBA_Object (stub, 1)"
- << be_nl << ", servant_ (servant)"
- << be_uidt_nl;
- *os << "{\n";
- *os << "}\n\n";
-
- os->indent ();
-
- // Generate _is_a implementation.
- *os << "CORBA::Boolean " << node->full_coll_name (be_interface::DIRECT) << "::"
- << "_is_a" << be_idt
- << "(" << be_idt_nl
- << "const CORBA::Char *logical_type_id" << be_nl
- << "ACE_ENV_ARG_DECL" << be_uidt_nl
- << ")" << be_uidt_nl << be_nl;
- *os << "{" << be_idt_nl
- << "return this->servant_->_is_a (logical_type_id ACE_ENV_ARG_PARAMETER);"
- << be_uidt_nl
- << "}\n\n" << be_uidt_nl;
-
- // Generate _tao_QueryInterface implementation
- *os << "void *" << be_nl
- << node->full_coll_name (be_interface::DIRECT)
- << "::_tao_QueryInterface (ptr_arith_t type)" << be_nl
- << "{" << be_idt_nl
- << "void *result =" << be_nl
- << " this->TAO_Collocated_Object::_tao_QueryInterface (type);"
- << be_nl
- << "if (result != 0)" << be_nl
- << " return result;" << be_nl;
- *os << "return this->";
- if (!node->is_nested ())
- {
- *os << node->name ();
- }
- else
- {
- be_decl* scope =
- be_scope::narrow_from_scope (node->defined_in ())->decl ();
- *os << "ACE_NESTED_CLASS ("
- << scope->name () << ","
- << node->local_name ()
- << ")";
- }
- *os << "::_tao_QueryInterface (type);" << be_uidt_nl
- << "}\n" << be_nl;
-
- // Generate _get_servant implementation.
- *os << node->full_skel_name () << "_ptr "
- << node->full_coll_name (be_interface::DIRECT) << "::"
- << "_get_servant (void) const\n"
- << "{\n";
- os->incr_indent ();
- *os << "return this->servant_;\n";
- os->decr_indent ();
- *os << "}\n\n";
-
- os->indent ();
-
- // Generate _non_existent implementation.
- *os << "CORBA::Boolean " << node->full_coll_name (be_interface::DIRECT) << "::"
- << "_non_existent" << be_idt
- << "(" << be_idt_nl
- << "ACE_ENV_SINGLE_ARG_DECL" << be_uidt_nl
- << ")" << be_uidt_nl << be_nl;
- *os << "{" << be_idt_nl
- << "return this->servant_->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);"
- << be_uidt_nl
- << "}\n\n" << be_uidt_nl;
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_direct_collocated_ss::"
- "visit_scope - "
- "codegen for scope failed\n"),
- -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_interface_direct_collocated_ss::collocated_ctor_helper (be_interface *derived,
- be_interface *base,
- TAO_OutStream *os)
-{
- if (derived == base)
- // we are the same. Don't do anything, otherwise we will end up calling
- // ourself
- return 0;
-
- if (base->is_nested ())
- {
- be_decl *scope;
- scope = be_scope::narrow_from_scope (base->defined_in ())->decl ();
- *os << be_nl << ", "
- << "ACE_NESTED_CLASS (POA_" << scope->name ()
- << ","
- << base->local_coll_name (be_interface::DIRECT)
- << ") (servant, stub)";
- }
- else
- {
- *os << be_nl << ", "
- << base->full_coll_name (be_interface::DIRECT)
- << " (servant, stub)";
- }
-
- 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 8b7aef7aa1e..1ccc1b815d2 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
@@ -50,7 +50,7 @@ int
be_visitor_interface::is_amh_rh_node (be_interface *node)
{
//If, is implied-IDL
- if (node->original_interface () != 0)
+ if (node->original_interface () != 0)
{
// and the name starts with AMH
if (ACE_OS::strncmp (node->local_name (), "AMH", 3) == 0)
@@ -96,18 +96,6 @@ be_visitor_interface::visit_attribute (be_attribute *node)
case TAO_CodeGen::TAO_INTERFACE_IS:
ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_IS);
break;
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SS);
- break;
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SMART_PROXY_CH);
break;
@@ -157,11 +145,11 @@ be_visitor_interface::visit_attribute (be_attribute *node)
// AMH stuff
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SH);
- break;
+ ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SH);
+ break;
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS:
- ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SS);
- break;
+ ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SS);
+ break;
case TAO_CodeGen::TAO_INTERFACE_PROXY_IMPLS_CH:
case TAO_CodeGen::TAO_INTERFACE_PROXY_IMPLS_CS:
@@ -248,10 +236,6 @@ be_visitor_interface::visit_constant (be_constant *node)
case TAO_CodeGen::TAO_INTERFACE_CDR_OP_CH:
case TAO_CodeGen::TAO_INTERFACE_CDR_OP_CI:
case TAO_CodeGen::TAO_INTERFACE_CDR_OP_CS:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_INTERFACE_INTERCEPTORS_CH:
@@ -292,9 +276,9 @@ be_visitor_interface::visit_constant (be_constant *node)
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH:
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS:
- return 0; // nothing to be done
+ return 0; // nothing to be done
- default:
+ default:
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_visitor_interface::"
@@ -370,10 +354,6 @@ be_visitor_interface::visit_enum (be_enum *node)
case TAO_CodeGen::TAO_INTERFACE_IS:
case TAO_CodeGen::TAO_INTERFACE_SI:
case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_INTERFACE_INTERCEPTORS_CH:
@@ -408,7 +388,7 @@ be_visitor_interface::visit_enum (be_enum *node)
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH:
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS:
- return 0; // nothing to be done
+ return 0; // nothing to be done
default:
{
@@ -487,10 +467,6 @@ be_visitor_interface::visit_exception (be_exception *node)
case TAO_CodeGen::TAO_INTERFACE_IS:
case TAO_CodeGen::TAO_INTERFACE_SI:
case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_INTERFACE_INTERCEPTORS_CH:
@@ -525,7 +501,7 @@ be_visitor_interface::visit_exception (be_exception *node)
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH:
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS:
- return 0; // nothing to be done
+ return 0; // nothing to be done
default:
{
@@ -600,18 +576,6 @@ be_visitor_interface::visit_operation (be_operation *node)
case TAO_CodeGen::TAO_INTERFACE_TIE_SI:
ctx.state (TAO_CodeGen::TAO_OPERATION_TIE_SI);
break;
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_THRU_POA_COLLOCATED_SS);
- break;
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SH);
- break;
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
- ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SS);
- break;
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
ctx.state (TAO_CodeGen::TAO_OPERATION_SMART_PROXY_CH);
break;
@@ -783,10 +747,6 @@ be_visitor_interface::visit_structure (be_structure *node)
case TAO_CodeGen::TAO_INTERFACE_IS:
case TAO_CodeGen::TAO_INTERFACE_SI:
case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_INTERFACE_INTERCEPTORS_CH:
@@ -899,10 +859,6 @@ be_visitor_interface::visit_union (be_union *node)
case TAO_CodeGen::TAO_INTERFACE_IS:
case TAO_CodeGen::TAO_INTERFACE_SI:
case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_INTERFACE_INTERCEPTORS_CH:
@@ -937,7 +893,7 @@ be_visitor_interface::visit_union (be_union *node)
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH:
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS:
- return 0; // nothing to be done
+ return 0; // nothing to be done
default:
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -1015,10 +971,6 @@ be_visitor_interface::visit_typedef (be_typedef *node)
case TAO_CodeGen::TAO_INTERFACE_IS:
case TAO_CodeGen::TAO_INTERFACE_SI:
case TAO_CodeGen::TAO_INTERFACE_SS:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_THRU_POA_COLLOCATED_SS:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SH:
- case TAO_CodeGen::TAO_INTERFACE_DIRECT_COLLOCATED_SS:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH:
case TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS:
case TAO_CodeGen::TAO_INTERFACE_INTERCEPTORS_CH:
@@ -1053,7 +1005,7 @@ be_visitor_interface::visit_typedef (be_typedef *node)
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH:
case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS:
- return 0; // nothing to be done
+ return 0; // nothing to be done
default:
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -1086,16 +1038,3 @@ be_visitor_interface::visit_typedef (be_typedef *node)
delete visitor;
return 0;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
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 a011fd31ded..b8384ace7ba 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp
@@ -177,6 +177,14 @@ be_visitor_interface_sh::visit_interface (be_interface *node)
<< "ACE_ENV_ARG_DECL" << be_uidt_nl
<< ");\n" << be_uidt_nl;
+ // Add a skeleton for our _component method.
+ *os << "static void _component_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &req," << be_nl
+ << "void *obj," << be_nl
+ << "void *servant_upcall" << be_nl
+ << "ACE_ENV_ARG_DECL" << be_uidt_nl
+ << ");\n" << be_uidt_nl;
+
// Add the dispatch method.
*os << "virtual void _dispatch (" << be_idt << be_idt_nl
<< "TAO_ServerRequest &req," << be_nl
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 0278ab39ae4..f30ceb3ff6a 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
@@ -281,6 +281,33 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< "}" << be_uidt << be_uidt_nl;
*os << "}\n\n";
+ // Generate code for the _component skeleton.
+ *os << "void " << full_skel_name
+ << "::_component_skel (" << be_idt << be_idt_nl
+ << "TAO_ServerRequest &_tao_server_request, " << be_nl
+ << "void * _tao_object_reference," << be_nl
+ << "void * /* Servant_Upcall */" << be_nl
+ << "ACE_ENV_ARG_DECL" << be_uidt_nl
+ << ")" << be_uidt_nl;
+ *os << "{" << be_idt_nl;
+ *os << full_skel_name << " *_tao_impl = ("
+ << full_skel_name << " *) _tao_object_reference;" << be_nl;
+ *os << "CORBA::Object_var _tao_retval =" << be_idt_nl
+ << "_tao_impl->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);"
+ << be_uidt_nl;
+ *os << "ACE_CHECK;" << be_nl << be_nl;
+ *os << "_tao_server_request.init_reply ();" << be_nl;
+ *os << "TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();"
+ << be_nl;
+ *os << "if (!(_tao_out << _tao_retval._retn ()))"
+ << be_idt_nl;
+
+ if (be_global->use_raw_throw ())
+ *os << "throw CORBA::MARSHAL ();" << be_uidt << be_uidt_nl;
+ else
+ *os << "ACE_THROW (CORBA::MARSHAL ());" << be_uidt << be_uidt_nl;
+ *os << "}\n\n";
+
// Generate code for the _is_a override.
os->indent ();
*os << "CORBA::Boolean " << full_skel_name
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp
deleted file mode 100644
index 7193ad36241..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_sh.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_sh.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for thru_poa_collocated classes for the Interface node
-// inside the server header.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-ACE_RCSID(be_visitor_interface, thru_poa_collocated_sh, "$Id$")
-
-
-// ************************************************************
-// thru_poa_collocated class in header
-// ************************************************************
-
-be_visitor_interface_thru_poa_collocated_sh::be_visitor_interface_thru_poa_collocated_sh
-(be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_thru_poa_collocated_sh::~be_visitor_interface_thru_poa_collocated_sh (void)
-{
-}
-
-int be_visitor_interface_thru_poa_collocated_sh::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->gen_ifdef_macro (node->flat_name (), "_thru_poa_collocated");
-
- // output the class defn
- os->indent ();
- *os << "class " << be_global->skel_export_macro ()
- << " " << node->local_coll_name (be_interface::THRU_POA);
- os->incr_indent ();
- *os << " : public virtual ::" << node->full_name ();
-
- // generate base classes if any
- if (node->n_inherits () > 0)
- {
- for (int i = 0; i < node->n_inherits (); ++i)
- {
- *os << "," << be_nl;
- be_interface* parent =
- be_interface::narrow_from_decl (node->inherits()[i]);
- *os << " public virtual "
- << be_interface::relative_name (parent->full_coll_name (be_interface::THRU_POA),
- node->full_coll_name (be_interface::THRU_POA));
- }
- }
- *os << "\n";
- os->decr_indent ();
- *os << "{" << be_nl;
- *os << "public:\n";
- os->incr_indent ();
-
- *os << node->local_coll_name (be_interface::THRU_POA) << " (\n";
-
- os->incr_indent (0);
- os->incr_indent ();
-
- *os << "TAO_Stub *stub\n";
- os->decr_indent ();
- *os << ");\n";
- os->decr_indent (0);
-
- os->indent ();
-
- *os << "virtual CORBA::Boolean _is_a" << be_idt
- << "(" << be_idt_nl
- << "const CORBA::Char *logical_type_id" << be_nl
- << "ACE_ENV_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
-
- *os << "virtual CORBA::Boolean _non_existent" << be_idt
- << "(" << be_idt_nl
- << "ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl
- << ");" << be_uidt_nl << be_nl;
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_thru_poa_collocated_sh::"
- "visit_interface - "
- "codegen for scope failed\n"),
- -1);
- }
-
- os->decr_indent ();
-
- *os << "};\n\n";
-
- os->gen_endif ();
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp
deleted file mode 100644
index 4a4c59bc34e..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_collocated_ss.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_ss.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for thru_poa_collocated classes for an Interface in the
-// server skeleton file.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_interface.h"
-
-ACE_RCSID(be_visitor_interface, thru_poa_collocated_ss, "$Id$")
-
-
-// ************************************************************
-// be_visitor_interface_collacted_ss
-// ************************************************************
-
-be_visitor_interface_thru_poa_collocated_ss::be_visitor_interface_thru_poa_collocated_ss
-(be_visitor_context *ctx)
- : be_visitor_interface (ctx)
-{
-}
-
-be_visitor_interface_thru_poa_collocated_ss::~be_visitor_interface_thru_poa_collocated_ss (void)
-{
-}
-
-int be_visitor_interface_thru_poa_collocated_ss::visit_interface (be_interface *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- this->ctx_->node (node);
-
- os->indent ();
- *os << node->full_coll_name (be_interface::THRU_POA) << "::"
- << node->local_coll_name (be_interface::THRU_POA) << " (" << be_idt_nl
- << "TAO_Stub *stub" << be_uidt_nl
- << ")" << be_idt_nl;
-
- *os << ":";
-
- // @@ We should call the constructor for all base classes, since we
- // are using multiple inheritance.
-
- if (node->traverse_inheritance_graph (be_visitor_interface_thru_poa_collocated_ss::collocated_ctor_helper, os)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_thru_poa_collocated_ss::"
- "visit_interface - "
- "codegen for base class ctor init failed\n"),
- -1);
- }
-
- *os << " CORBA_Object (stub, 1)" << be_uidt_nl;
-
- *os << "{" << be_nl;
- *os << "}" << be_nl << be_nl;
-
- // Generate _is_a implementation.
- *os << "CORBA::Boolean " << node->full_coll_name (be_interface::THRU_POA) << "::"
- << "_is_a" << be_idt
- << "(" << be_idt_nl
- << "const CORBA::Char *logical_type_id" << be_nl
- << "ACE_ENV_ARG_DECL" << be_uidt_nl
- << ")" << be_uidt_nl << be_nl
- << "{" << be_idt_nl;
- *os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
- << be_idt << be_idt_nl
- << "this->_stubobj ()->"
- << "servant_orb_var ()->orb_core ()"
- << be_uidt_nl
- << ");" << be_uidt_nl
- << "CORBA::Object_var forward_to;" << be_nl
- << "servant_upcall.prepare_for_upcall (" << be_idt << be_idt_nl
- << "this->_object_key ()," << be_nl
- << "\"" << "_is_a" << "\"," << be_nl
- << "forward_to.out ()" << be_nl
- << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl
- << ");" << be_uidt_nl
- << "ACE_CHECK_RETURN (0);" << be_nl;
- *os << "return ACE_reinterpret_cast (" << be_idt << be_idt_nl
- << node->full_skel_name () << "_ptr," << be_nl
- << "servant_upcall.servant ()->_downcast (" << be_idt << be_idt_nl
- << "\"" << node->repoID () << "\"" << be_uidt_nl
- << ")" << be_uidt << be_uidt_nl
- << ")->_is_a (logical_type_id ACE_ENV_ARG_PARAMETER);" << be_uidt << be_uidt_nl
- << "}" << be_uidt_nl << be_nl << be_nl;
-
- // Generate _non_existent implementation.
- *os << "CORBA::Boolean " << node->full_coll_name (be_interface::THRU_POA) << "::"
- << "_non_existent" << be_idt
- << "(" << be_idt_nl
- << "ACE_ENV_SINGLE_ARG_DECL" << be_uidt_nl
- << ")" << be_uidt_nl << be_nl
- << "{" << be_idt_nl;
- *os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
- << be_idt << be_idt_nl
- << "this->_stubobj ()->"
- << "servant_orb_var ()->orb_core ()"
- << be_uidt_nl
- << ");" << be_uidt_nl
- << "CORBA::Object_var forward_to;" << be_nl
- << "servant_upcall.prepare_for_upcall (" << be_idt << be_idt_nl
- << "this->_object_key ()," << be_nl
- << "\"" << "_non_existent" << "\"," << be_nl
- << "forward_to.out ()" << be_nl
- << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl
- << ");" << be_uidt_nl
- << "ACE_CHECK_RETURN (0);" << be_nl;
- *os << "return ACE_reinterpret_cast (" << be_idt << be_idt_nl
- << node->full_skel_name () << "_ptr," << be_nl
- << "servant_upcall.servant ()->_downcast (" << be_idt << be_idt_nl
- << "\"" << node->repoID () << "\"" << be_uidt_nl
- << ")" << be_uidt << be_uidt_nl
- << ")->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);" << be_uidt << be_uidt_nl
- << "}" << be_uidt_nl << be_nl << be_nl;
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_thru_poa_collocated_ss::"
- "visit_scope - "
- "codegen for scope failed\n"),
- -1);
- }
-
- return 0;
-}
-
-int
-be_visitor_interface_thru_poa_collocated_ss::collocated_ctor_helper (be_interface *derived,
- be_interface *base,
- TAO_OutStream *os)
-{
- if (derived == base)
- // we are the same. Don't do anything, otherwise we will end up calling
- // ourself
- return 0;
-
- if (base->is_nested ())
- {
- be_decl *scope;
- scope = be_scope::narrow_from_scope (base->defined_in ())->decl ();
- *os << " ACE_NESTED_CLASS (POA_" << scope->full_name () << ","
- << base->local_coll_name (be_interface::THRU_POA) << ") (stub)," << be_nl;
- }
- else
- {
- *os << " " << base->full_coll_name (be_interface::THRU_POA) << " (stub)," << be_nl;
- }
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp
index ef9ba2b885c..a8351b2acdb 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation.cpp
@@ -30,10 +30,6 @@
#include "be_visitor_operation/argument.cpp"
#include "be_visitor_operation/argument_invoke.cpp"
#include "be_visitor_operation/argument_marshal.cpp"
-#include "be_visitor_operation/thru_poa_collocated_sh.cpp"
-#include "be_visitor_operation/thru_poa_collocated_ss.cpp"
-#include "be_visitor_operation/direct_collocated_sh.cpp"
-#include "be_visitor_operation/direct_collocated_ss.cpp"
#include "be_visitor_operation/exceptlist_cs.cpp"
#include "be_visitor_operation/operation_ch.cpp"
#include "be_visitor_operation/operation_cs.cpp"
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_sh.cpp
deleted file mode 100644
index 19c9b14417e..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_sh.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_sh.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for direct_collocated operation in the server header
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_operation.h"
-
-ACE_RCSID(be_visitor_operation, direct_collocated_sh, "$Id$")
-
-
-// *************************************************************************
-// be_visitor_operation_direct_collocated_sh --
-// This visitor generates code for the direct_collocated operation signature in a
-// server header file
-// *************************************************************************
-
-be_visitor_operation_direct_collocated_sh::be_visitor_operation_direct_collocated_sh
-(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_direct_collocated_sh::~be_visitor_operation_direct_collocated_sh (void)
-{
-}
-
-int be_visitor_operation_direct_collocated_sh::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node representing the return type
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node
-
- os->indent (); // start with the current indentation level
-
- // every operation is declared virtual in the client code
- *os << "virtual ";
-
- // STEP I: generate the return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // grab the right visitor to generate the return type
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 2: generate the operation name
- *os << " " << node->local_name ();
-
- // STEP 3: generate the argument list with the appropriate mapping. For these
- // we grab a visitor that generates the parameter listing
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp
deleted file mode 100644
index a253d39b1e7..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_ss.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for direct_collocated Operation in the skeleton.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_operation.h"
-
-ACE_RCSID(be_visitor_operation, direct_collocated_ss, "$Id$")
-
-
-// *************************************************************************
-// be_visitor_operation_direct_collocated_ss --
-// This visitor generates code for the direct_collocated operation signature in a
-// server skeletons file
-// *************************************************************************
-
-be_visitor_operation_direct_collocated_ss::be_visitor_operation_direct_collocated_ss
-(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_direct_collocated_ss::~be_visitor_operation_direct_collocated_ss (void)
-{
-}
-
-int be_visitor_operation_direct_collocated_ss::visit_operation (be_operation *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- // We need the interface node in which this operation was defined. However,
- // if this operation node was an attribute node in disguise, we get this
- // information from the context
- be_interface *intf;
- intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (node->defined_in ());
-
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_direct_collocated_ss::"
- "visit_operation - "
- "bad interface scope\n"),
- -1);
- }
-
- // retrieve the operation return type
- be_type *bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_direct_collocated_ss::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // STEP 2: generate the return type mapping (same as in the header file)
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_direct_collocated_ss::"
- "visit_operation - "
- "Bad visitor for return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_direct_collocated_ss::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- *os << " " << intf->full_coll_name (be_interface::DIRECT) << "::"
- << node->local_name () << " ";
-
- // STEP 4: generate the argument list with the appropriate mapping (same as
- // in the header file)
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_cs::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- *os << "{" << be_idt << "\n";
-
- os->indent ();
-
- if (!this->void_return_type (bt))
- {
- *os << "return ";
- }
-
- *os << "this->servant_";
- if (this->gen_invoke (ctx, node) == -1)
- return -1;
-
- *os << be_uidt_nl
- << "}\n\n";
-
- return 0;
-}
-
-int be_visitor_operation_direct_collocated_ss::gen_invoke (be_visitor_context &ctx,
- be_operation *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << "->" << node->local_name () << " ("
- << be_idt << be_idt << "\n";
-
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_ARG_UPCALL_SS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_direct_collocated_ss::"
- "gen_invoke - "
- "codegen for making upcall failed\n"),
- -1);
- }
-
- // end the upcall
- *os << be_uidt_nl
- << ");\n" << be_uidt;
- return 0;
-}
-
-int
-be_visitor_operation_direct_collocated_ss::void_return_type (be_type *bt)
-{
- // is the operation return type void?
-
- if (bt->node_type () == AST_Decl::NT_pre_defined
- && (be_predefined_type::narrow_from_decl (bt)->pt ()
- == AST_PredefinedType::PT_void))
- return 1;
- else
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_sh.cpp
deleted file mode 100644
index c098696d347..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_sh.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_sh.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for thru_poa_collocated operation in the server header
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_operation.h"
-
-ACE_RCSID(be_visitor_operation, thru_poa_collocated_sh, "$Id$")
-
-
-// *************************************************************************
-// be_visitor_operation_thru_poa_collocated_sh --
-// This visitor generates code for the thru_poa_collocated operation signature in a
-// server header file
-// *************************************************************************
-
-be_visitor_operation_thru_poa_collocated_sh::be_visitor_operation_thru_poa_collocated_sh
-(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
-{
-}
-
-be_visitor_operation_thru_poa_collocated_sh::~be_visitor_operation_thru_poa_collocated_sh (void)
-{
-}
-
-int be_visitor_operation_thru_poa_collocated_sh::visit_operation (be_operation *node)
-{
- TAO_OutStream *os; // output stream
- be_type *bt; // type node representing the return type
-
- os = this->ctx_->stream ();
- this->ctx_->node (node); // save the node
-
- os->indent (); // start with the current indentation level
-
- // every operation is declared virtual in the client code
- *os << "virtual ";
-
- // STEP I: generate the return type
- bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // grab the right visitor to generate the return type
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- // STEP 2: generate the operation name
- *os << " " << node->local_name ();
-
- // STEP 3: generate the argument list with the appropriate mapping. For these
- // we grab a visitor that generates the parameter listing
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_COLLOCATED_SH);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_sh::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_sh::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- return 0;
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp
deleted file mode 100644
index 45a3a6b8d77..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_ss.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for thru_poa_collocated Operation in the skeleton.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_operation.h"
-
-ACE_RCSID(be_visitor_operation, thru_poa_collocated_ss, "$Id$")
-
-
-// *************************************************************************
-// be_visitor_operation_thru_poa_collocated_ss --
-// This visitor generates code for the thru_poa_collocated operation signature in a
-// server skeletons file
-// *************************************************************************
-
-be_visitor_operation_thru_poa_collocated_ss::be_visitor_operation_thru_poa_collocated_ss
-(be_visitor_context *ctx)
- : be_visitor_operation (ctx)
-{
-}
-
-be_visitor_operation_thru_poa_collocated_ss::~be_visitor_operation_thru_poa_collocated_ss (void)
-{
-}
-
-int be_visitor_operation_thru_poa_collocated_ss::visit_operation (be_operation *node)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- // We need the interface node in which this operation was defined. However,
- // if this operation node was an attribute node in disguise, we get this
- // information from the context
- be_interface *intf;
- intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (node->defined_in ());
-
- if (!intf)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_thru_poa_collocated_ss::"
- "visit_operation - "
- "bad interface scope\n"),
- -1);
- }
-
- // retrieve the operation return type
- be_type *bt = be_type::narrow_from_decl (node->return_type ());
- if (!bt)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_thru_poa_collocated_ss::"
- "visit_operation - "
- "Bad return type\n"),
- -1);
- }
-
- // STEP 2: generate the return type mapping (same as in the header file)
- be_visitor_context ctx (*this->ctx_);
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETTYPE_OTHERS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_thru_poa_collocated_ss::"
- "visit_operation - "
- "Bad visitor for return type\n"),
- -1);
- }
-
- if (bt->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_thru_poa_collocated_ss::"
- "visit_operation - "
- "codegen for return type failed\n"),
- -1);
- }
- delete visitor;
-
- *os << " " << intf->full_coll_name (be_interface::THRU_POA) << "::";
- *os << node->local_name ();
-
- // STEP 4: generate the argument list with the appropriate mapping (same as
- // in the header file)
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_OTHERS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_ss::"
- "visit_operation - "
- "Bad visitor to return type\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "codegen for argument list failed\n"),
- -1);
- }
- delete visitor;
-
- *os << "{" << be_idt_nl
- << "TAO_Object_Adapter::Servant_Upcall servant_upcall ("
- << be_idt << be_idt_nl
- << "this->_stubobj ()->servant_orb_var ()->orb_core ()"
- << be_uidt_nl
- << ");" << be_uidt_nl
- << "CORBA::Object_var forward_to;" << be_nl
- << "servant_upcall.prepare_for_upcall (" << be_idt << be_idt_nl
- << "this->_object_key ()," << be_nl
- << "\"" << node->original_local_name () << "\"," << be_nl
- << "forward_to.out ()";
- if (!be_global->exception_support ())
- *os << " ACE_ENV_ARG_PARAMETER);\n" << be_uidt_nl << be_uidt;
- else
- *os << be_uidt_nl << ");\n" << be_uidt;
-
- // check if there is an exception
- if (!be_global->exception_support ())
- if (this->gen_check_exception (0) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_thru_poa_collocated_ss::"
- "visit_operation - "
- "codegen for checking exception failed\n"),
- -1);
- }
-
- os->indent ();
-
- if (!this->void_return_type (bt))
- {
- *os << "return ";
- }
-
- *os << "ACE_reinterpret_cast (" << be_idt << be_idt_nl
- << intf->full_skel_name () << "_ptr," << be_nl
- << "servant_upcall.servant ()->_downcast (" << be_idt << be_idt_nl
- << "\"" << intf->repoID () << "\"" << be_uidt_nl
- << ")" << be_uidt << be_uidt_nl
- << ")" << be_uidt;
-
- if (this->gen_invoke (ctx, node) == -1)
- return -1;
-
- if (this->void_return_type (bt))
- {
- *os << "return;\n";
- }
-
- *os << "}\n\n";
-
- return 0;
-}
-
-int be_visitor_operation_thru_poa_collocated_ss::gen_invoke (
- be_visitor_context &ctx,
- be_operation *node
- )
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << "->" << node->local_name () << " ("
- << be_idt << be_idt << be_idt_nl;
-
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_COLLOCATED_ARG_UPCALL_SS);
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_thru_poa_collocated_ss::"
- "gen_invoke - "
- "codegen for making upcall failed\n"),
- -1);
- }
-
- // End the upcall
- *os << be_uidt_nl
- << ");\n";
-
- return 0;
-}
-
-int
-be_visitor_operation_thru_poa_collocated_ss::void_return_type (be_type *bt)
-{
- // is the operation return type void?
-
- if (bt->node_type () == AST_Decl::NT_pre_defined
- && (be_predefined_type::narrow_from_decl (bt)->pt ()
- == AST_PredefinedType::PT_void))
- return 1;
- else
- return 0;
-}
diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h
index 3f2b1c07adf..4ff0abea830 100644
--- a/TAO/TAO_IDL/be_include/be_codegen.h
+++ b/TAO/TAO_IDL/be_include/be_codegen.h
@@ -97,12 +97,6 @@ public:
TAO_ATTRIBUTE_IH, // in implementation header
TAO_ATTRIBUTE_SS, // in server skeletons
TAO_ATTRIBUTE_IS, // in implementation skeletons
- TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SH, // in server header for collocated
- TAO_ATTRIBUTE_THRU_POA_COLLOCATED_SS, // in server skeletons for
- // collocated
- TAO_ATTRIBUTE_DIRECT_COLLOCATED_SH, // in server header for collocated
- TAO_ATTRIBUTE_DIRECT_COLLOCATED_SS, // in server skeletons for
- // collocated
TAO_ATTRIBUTE_BASE_PROXY_IMPL_CH, // Proxy Impl Related Attribute visitors.
@@ -177,10 +171,6 @@ public:
TAO_INTERFACE_SI,
TAO_INTERFACE_SS,
TAO_INTERFACE_IS,
- TAO_INTERFACE_THRU_POA_COLLOCATED_SH,
- TAO_INTERFACE_THRU_POA_COLLOCATED_SS,
- TAO_INTERFACE_DIRECT_COLLOCATED_SH,
- TAO_INTERFACE_DIRECT_COLLOCATED_SS,
TAO_INTERFACE_ANY_OP_CH,
TAO_INTERFACE_ANY_OP_CS,
TAO_INTERFACE_CDR_OP_CH,
@@ -292,10 +282,6 @@ public:
TAO_OPERATION_IH, // in implementation header
TAO_OPERATION_SS, // in server skeletons
TAO_OPERATION_IS, // in server skeletons
- TAO_OPERATION_THRU_POA_COLLOCATED_SH, // in collocated server header
- TAO_OPERATION_THRU_POA_COLLOCATED_SS, // in collocated server skel
- TAO_OPERATION_DIRECT_COLLOCATED_SH, // in collocated server header
- TAO_OPERATION_DIRECT_COLLOCATED_SS, // in collocated server skel
TAO_OPERATION_BASE_PROXY_IMPL_CH, // Proxy_Impl operation gen.
// in client header
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h
index ffb728a8f52..7ae796e096c 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h
@@ -32,10 +32,10 @@
#include "be_visitor_interface/interface_si.h"
#include "be_visitor_interface/interface_ss.h"
#include "be_visitor_interface/interface_is.h"
-#include "be_visitor_interface/thru_poa_collocated_sh.h"
-#include "be_visitor_interface/thru_poa_collocated_ss.h"
-#include "be_visitor_interface/direct_collocated_sh.h"
-#include "be_visitor_interface/direct_collocated_ss.h"
+// #include "be_visitor_interface/thru_poa_collocated_sh.h"
+// #include "be_visitor_interface/thru_poa_collocated_ss.h"
+// #include "be_visitor_interface/direct_collocated_sh.h"
+// #include "be_visitor_interface/direct_collocated_ss.h"
#include "be_visitor_interface/any_op_ch.h"
#include "be_visitor_interface/any_op_cs.h"
#include "be_visitor_interface/cdr_op_ch.h"
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_sh.h b/TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_sh.h
deleted file mode 100644
index 76e937d32e9..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_sh.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_sh.h
-//
-// = DESCRIPTION
-// Concrete visitor for the Interface node.
-// This provides code generation for direct collocated classes in server header
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_INTERFACE_DIRECT_COLLOCATED_SH_H_
-#define _BE_INTERFACE_DIRECT_COLLOCATED_SH_H_
-
-class be_visitor_interface_direct_collocated_sh : public be_visitor_interface
-{
- // = TITLE
- // Generate the "direct collocated" class declaration.
-
-public:
- be_visitor_interface_direct_collocated_sh (be_visitor_context *ctx);
- // constructor
-
- virtual ~be_visitor_interface_direct_collocated_sh (void);
- // destructor
-
- virtual int visit_interface (be_interface *node);
- // visit an interface
-
-};
-
-#endif /* _BE_INTERFACE_DIRECT_COLLOCATED_SH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_ss.h
deleted file mode 100644
index faca2392b8e..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/direct_collocated_ss.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// $Id$
-//
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// driect_collocated_ss.h
-//
-// = DESCRIPTION
-// Concrete visitor for the Interface node.
-// This provides code generation for direct collocated classes in server skeleton
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_INTERFACE_DIRECT_COLLOCATED_SS_H_
-#define _BE_INTERFACE_DIRECT_COLLOCATED_SS_H_
-
-class be_visitor_interface_direct_collocated_ss : public be_visitor_interface
-{
- // = TITLE
- // Generate the "direct collocated" class declaration.
-
-public:
- be_visitor_interface_direct_collocated_ss (be_visitor_context *ctx);
- // constructor
-
- virtual ~be_visitor_interface_direct_collocated_ss (void);
- // destructor
-
- virtual int visit_interface (be_interface *node);
- // visit interface
-
- static int collocated_ctor_helper (be_interface *,
- be_interface *,
- TAO_OutStream *os);
- // helper method passed to the template method to invoke ctors of all the
- // base classes.
-};
-
-#endif /* _BE_DIRECT_INTERFACE_COLLOCATED_SS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_sh.h b/TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_sh.h
deleted file mode 100644
index 89a73401341..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_sh.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// $Id$
-//
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_sh.h
-//
-// = DESCRIPTION
-// Concrete visitor for the Interface node.
-// This provides code generation for thru_poa collocated classes in server header
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_INTERFACE_THRU_POA_COLLOCATED_SH_H_
-#define _BE_INTERFACE_THRU_POA_COLLOCATED_SH_H_
-
-class be_visitor_interface_thru_poa_collocated_sh : public be_visitor_interface
-{
- // = TITLE
- // Generate the "thru_poa collocated" class declaration.
-
-public:
- be_visitor_interface_thru_poa_collocated_sh (be_visitor_context *ctx);
- // constructor
-
- virtual ~be_visitor_interface_thru_poa_collocated_sh (void);
- // destructor
-
- virtual int visit_interface (be_interface *node);
- // visit an interface
-
-};
-
-#endif /* _BE_INTERFACE_THRU_POA_COLLOCATED_SH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_ss.h
deleted file mode 100644
index 9348412e9c3..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/thru_poa_collocated_ss.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// $Id$
-//
-/* -*- c++ -*- */
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_ss.h
-//
-// = DESCRIPTION
-// Concrete visitor for the Interface node.
-// This provides code generation for thru_poa collocated classes in server skeleton
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_INTERFACE_THRU_POA_COLLOCATED_SS_H_
-#define _BE_INTERFACE_THRU_POA_COLLOCATED_SS_H_
-
-class be_visitor_interface_thru_poa_collocated_ss : public be_visitor_interface
-{
- // = TITLE
- // Generate the "thru_poa collocated" class declaration.
-
-public:
- be_visitor_interface_thru_poa_collocated_ss (be_visitor_context *ctx);
- // constructor
-
- virtual ~be_visitor_interface_thru_poa_collocated_ss (void);
- // destructor
-
- virtual int visit_interface (be_interface *node);
- // visit interface
-
- static int collocated_ctor_helper (be_interface *,
- be_interface *,
- TAO_OutStream *os);
- // helper method passed to the template method to invoke ctors of all the
- // base classes.
-};
-
-#endif /* _BE_INTERFACE_THRU_POA_COLLOCATED_SS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation.h
index e5f48ddb6ff..9e3d340e234 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation.h
@@ -33,10 +33,6 @@
#include "be_visitor_operation/operation_is.h"
#include "be_visitor_operation/tie_sh.h"
#include "be_visitor_operation/tie_si.h"
-#include "be_visitor_operation/thru_poa_collocated_sh.h"
-#include "be_visitor_operation/thru_poa_collocated_ss.h"
-#include "be_visitor_operation/direct_collocated_sh.h"
-#include "be_visitor_operation/direct_collocated_ss.h"
#include "be_visitor_operation/arglist.h"
#include "be_visitor_operation/rettype.h"
#include "be_visitor_operation/rettype_is.h"
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_sh.h b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_sh.h
deleted file mode 100644
index 413d7ce3059..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_sh.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_ch.h
-//
-// = DESCRIPTION Visitor for generating code for IDL operations for
-// the direct collocated case inside of the servant header
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_VISITOR_OPERATION_DIRECT_COLLOCATED_SH_H_
-#define _BE_VISITOR_OPERATION_DIRECT_COLLOCATED_SH_H_
-
-// ************************************************************
-// Operation visitor for server header in the direct collocated class
-// ************************************************************
-
-class be_visitor_operation_direct_collocated_sh : public be_visitor_scope
-{
- //
- // = TITLE
- // be_visitor_operation_direct_collocated_sh
- //
- // = DESCRIPTION
- // This is a concrete visitor to generate the server header for operation
- // in the direct collocated class
- //
- //
-public:
- be_visitor_operation_direct_collocated_sh (be_visitor_context *ctx);
- // constructor
-
- ~be_visitor_operation_direct_collocated_sh (void);
- // destructor
-
- virtual int visit_operation (be_operation *node);
- // visit operation node.
-
-};
-
-#endif /* _BE_VISITOR_OPERATION_DIRECT_COLLOCATED_SH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h
deleted file mode 100644
index c6ebe06940f..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// direct_collocated_ss.h
-//
-// = DESCRIPTION
-// Visitor for generating code for IDL operations for the direct_collocated case
-// inside of the servant skeleton
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_VISITOR_OPERATION_DIRECT_COLLOCATED_SS_H_
-#define _BE_VISITOR_OPERATION_DIRECT_COLLOCATED_SS_H_
-
-// *****************************************************************
-// Operation visitor for server skeletons for the direct collocated class
-// *****************************************************************
-
-class be_visitor_operation_direct_collocated_ss : public be_visitor_scope
-{
- //
- // = TITLE
- // be_visitor_operation_ss
- //
- // = DESCRIPTION
- // This is a concrete visitor to generate the server skeletons for
- // operation in the direct collocated class
- //
- //
-public:
- be_visitor_operation_direct_collocated_ss (be_visitor_context *ctx);
- // constructor
-
- ~be_visitor_operation_direct_collocated_ss (void);
- // destructor
-
- virtual int visit_operation (be_operation *node);
- // visit operation node.
-
- virtual int gen_invoke (be_visitor_context &ctx, be_operation *node);
- // A helper method to generate operation invocation code.
-
- virtual int void_return_type (be_type *bt);
- // is my return type void?
-};
-
-#endif /* _BE_VISITOR_OPERATION_DIRECT_COLLOCATED_SS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_sh.h b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_sh.h
deleted file mode 100644
index 26aa40394c6..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_sh.h
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_ch.h
-//
-// = DESCRIPTION
-// Visitor for generating code for IDL operations for the thru_poa collocated case
-// inside of the servant header
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_VISITOR_OPERATION_THRU_POA_COLLOCATED_SH_H_
-#define _BE_VISITOR_OPERATION_THRU_POA_COLLOCATED_SH_H_
-
-// ************************************************************
-// Operation visitor for server header in the thru_poa collocated class
-// ************************************************************
-
-class be_visitor_operation_thru_poa_collocated_sh : public be_visitor_scope
-{
- //
- // = TITLE
- // be_visitor_operation_thru_poa_collocated_sh
- //
- // = DESCRIPTION
- // This is a concrete visitor to generate the server header for operation
- // in the thru_poa collocated class
- //
- //
-public:
- be_visitor_operation_thru_poa_collocated_sh (be_visitor_context *ctx);
- // constructor
-
- ~be_visitor_operation_thru_poa_collocated_sh (void);
- // destructor
-
- virtual int visit_operation (be_operation *node);
- // visit operation node.
-
-};
-
-#endif /* _BE_VISITOR_OPERATION_THRU_POA_COLLOCATED_SH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h
deleted file mode 100644
index 2c63169caea..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// thru_poa_collocated_ss.h
-//
-// = DESCRIPTION
-// Visitor for generating code for IDL operations for the thru_poa collocated case
-// inside of the servant skeleton
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#ifndef _BE_VISITOR_OPERATION_THRU_POA_COLLOCATED_SS_H_
-#define _BE_VISITOR_OPERATION_THRU_POA_COLLOCATED_SS_H_
-
-// *****************************************************************
-// Operation visitor for server skeletons for the thru_poa collocated class
-// *****************************************************************
-
-class be_visitor_operation_thru_poa_collocated_ss : public be_visitor_operation
-{
- //
- // = TITLE
- // be_visitor_operation_ss
- //
- // = DESCRIPTION
- // This is a concrete visitor to generate the server skeletons for
- // operation in the thru_poa collocated class
- //
- //
-public:
- be_visitor_operation_thru_poa_collocated_ss (be_visitor_context *ctx);
- // constructor
-
- ~be_visitor_operation_thru_poa_collocated_ss (void);
- // destructor
-
- virtual int visit_operation (be_operation *node);
- // visit operation node.
-
- virtual int gen_invoke (be_visitor_context &ctx, be_operation *node);
- // A helper method to generate operation invocation code.
-
- virtual int void_return_type (be_type *bt);
- // is my return type void?
-};
-
-#endif /* _BE_VISITOR_OPERATION_THRU_POA_COLLOCATED_SS_H_ */
diff --git a/TAO/tao/Abstract_Servant_Base.h b/TAO/tao/Abstract_Servant_Base.h
index 760ffc1924c..b7a3c1a4444 100644
--- a/TAO/tao/Abstract_Servant_Base.h
+++ b/TAO/tao/Abstract_Servant_Base.h
@@ -47,6 +47,9 @@ public:
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
) = 0;
+ /// Default <_get_component>: always returns nil.
+ virtual CORBA::Object_ptr _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) = 0;
+
//@{
/// @name Reference counting hooks: no-ops by default.
virtual void _add_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 21e3f91633c..6b40ff23251 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -416,6 +416,19 @@ CORBA_Object::_get_implementation (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
return 0;
}
+CORBA::Object_ptr
+CORBA_Object::_get_component (ACE_ENV_SINGLE_ARG_DECL)
+{
+ // Get the right Proxy.
+ TAO_Object_Proxy_Impl &the_proxy =
+ this->proxy_broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ // Perform the Call.
+ return the_proxy._get_component (this ACE_ENV_ARG_PARAMETER);
+}
+
+
#endif /* TAO_HAS_MINIMUM_CORBA */
// ****************************************************************
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 1adecfd7b61..eea6a887f72 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -107,6 +107,10 @@ public:
virtual CORBA_InterfaceDef_ptr _get_interface (
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+ /// Get info about the object from the Interface Repository.
+ virtual CORBA::Object_ptr _get_component (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
// DII operations to create a request.
//
@@ -278,7 +282,7 @@ private:
/// Number of outstanding references to this object.
CORBA::ULong refcount_;
-
+
/// Protect reference count manipulation from race conditions.
/**
* This lock is only instantiated for unconstrained objects. The
diff --git a/TAO/tao/Object_Proxy_Impl.h b/TAO/tao/Object_Proxy_Impl.h
index e68da1f582e..923595e82ea 100644
--- a/TAO/tao/Object_Proxy_Impl.h
+++ b/TAO/tao/Object_Proxy_Impl.h
@@ -49,6 +49,9 @@ public:
ACE_ENV_ARG_DECL
) = 0;
+ virtual CORBA::Object_ptr _get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL) = 0;
+
#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
protected:
diff --git a/TAO/tao/PortableServer/Collocated_Object.cpp b/TAO/tao/PortableServer/Collocated_Object.cpp
index e6de093ef81..9de4341dbec 100644
--- a/TAO/tao/PortableServer/Collocated_Object.cpp
+++ b/TAO/tao/PortableServer/Collocated_Object.cpp
@@ -162,6 +162,52 @@ TAO_Collocated_Object::_non_existent (ACE_ENV_SINGLE_ARG_DECL)
ACE_ENDTRY;
return _tao_retval;
}
+
+CORBA::Object_ptr
+TAO_Collocated_Object::_get_component (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CORBA::Object_var _tao_retval (CORBA::Object::_nil ());
+
+ ACE_TRY
+ {
+ // If the object is collocated then try locally....
+ if (!this->_is_collocated ())
+ return this->CORBA_Object::_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ TAO_Stub *stub = this->_stubobj ();
+
+ // Which collocation strategy should we use?
+ if (stub != 0 &&
+ stub->servant_orb_var ()->orb_core ()
+ ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA)
+ {
+ TAO_Object_Adapter::Servant_Upcall servant_upcall (
+ stub->servant_orb_var ()->orb_core ()
+ );
+
+ CORBA::Object_var forward_to;
+ servant_upcall.prepare_for_upcall (this->_object_key (),
+ "_component",
+ forward_to.out ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ return servant_upcall.servant ()->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+
+ // Direct collocation strategy is used.
+ if (this->servant_ != 0)
+ return this->servant_->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ // @@ Maybe we want to change this exception...
+ ACE_THROW_RETURN (CORBA::INV_OBJREF (), 0);
+ }
+ ACE_CATCHANY
+ {
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+ return _tao_retval._retn ();
+}
#endif /* TAO_HAS_MINIMUM_CORBA */
void*
diff --git a/TAO/tao/PortableServer/Collocated_Object.h b/TAO/tao/PortableServer/Collocated_Object.h
index 768d51b2286..45f4ff3a41c 100644
--- a/TAO/tao/PortableServer/Collocated_Object.h
+++ b/TAO/tao/PortableServer/Collocated_Object.h
@@ -55,6 +55,8 @@ public:
ACE_THROW_SPEC (());
#if (TAO_HAS_MINIMUM_CORBA == 0)
virtual CORBA::Boolean _non_existent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ virtual CORBA::Object_ptr _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
#endif /* TAO_HAS_MINIMUM_CORBA */
virtual void *_tao_QueryInterface(ptr_arith_t type);
diff --git a/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.cpp b/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.cpp
index 78e69462db7..d71b07c7501 100644
--- a/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.cpp
+++ b/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.cpp
@@ -80,4 +80,27 @@ TAO_Direct_Object_Proxy_Impl::_get_interface (const CORBA::Object_ptr target
return 0;
}
+CORBA::Object_ptr
+TAO_Direct_Object_Proxy_Impl::_get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL)
+{
+ ACE_TRY
+ {
+ if (target->_servant () != 0)
+ return target->_servant ()->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+
+ // @@ Maybe we want to change this exception...
+ ACE_THROW_RETURN (CORBA::INV_OBJREF (), 0);
+ }
+ ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
+ {
+ }
+ ACE_CATCHANY
+ {
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
diff --git a/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.h b/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.h
index 1a9390437f2..1b3c8b40fdb 100644
--- a/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.h
+++ b/TAO/tao/PortableServer/Direct_Object_Proxy_Impl.h
@@ -63,6 +63,9 @@ public:
ACE_ENV_ARG_DECL
);
+ virtual CORBA::Object_ptr _get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL);
+
#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
};
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp
index 01f966fe916..a2057a0117b 100644
--- a/TAO/tao/PortableServer/Servant_Base.cpp
+++ b/TAO/tao/PortableServer/Servant_Base.cpp
@@ -111,6 +111,12 @@ TAO_ServantBase::_get_interface (ACE_ENV_SINGLE_ARG_DECL)
ACE_ENV_ARG_PARAMETER);
}
+CORBA::Object_ptr
+TAO_ServantBase::_get_component (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+{
+ return CORBA::Object::_nil ();
+}
+
int
TAO_ServantBase::_find (const char *opname,
TAO_Skeleton& skelfunc,
@@ -144,7 +150,7 @@ TAO_ServantBase::_create_stub (ACE_ENV_SINGLE_ARG_DECL)
servant_orb = poa_current_impl->orb_core ().orb () ;
- stub =
+ stub =
poa_current_impl->poa ()->key_to_stub (
poa_current_impl->object_key (),
this->_interface_repository_id (),
@@ -155,11 +161,11 @@ TAO_ServantBase::_create_stub (ACE_ENV_SINGLE_ARG_DECL)
}
else
{
- PortableServer::POA_var poa =
+ PortableServer::POA_var poa =
this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- CORBA::Object_var object =
+ CORBA::Object_var object =
poa->servant_to_reference (this ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
@@ -220,9 +226,9 @@ void TAO_ServantBase::synchronous_upcall_dispatch (TAO_ServerRequest &req,
// Invoke the skeleton, it will demarshal the arguments,
// invoke the right operation on the skeleton class
// (<derived_this>), and marshal any results.
- skel (req,
- derived_this,
- servant_upcall
+ skel (req,
+ derived_this,
+ servant_upcall
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -303,9 +309,9 @@ void TAO_ServantBase::asynchronous_upcall_dispatch (TAO_ServerRequest &req,
// Invoke the skeleton, it will demarshal the arguments,
// invoke the right operation on the skeleton class
// (<derived_this>), and marshal any results.
- skel (req,
- derived_this,
- servant_upcall
+ skel (req,
+ derived_this,
+ servant_upcall
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h
index 5af4946e6d7..7473f093cf3 100644
--- a/TAO/tao/PortableServer/Servant_Base.h
+++ b/TAO/tao/PortableServer/Servant_Base.h
@@ -61,10 +61,12 @@ public:
// Default <_non_existent>: always returns false.
virtual CORBA_InterfaceDef_ptr _get_interface (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
- );
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
// Query the Interface Repository for the interface definition.
+ virtual CORBA::Object_ptr _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+ // Default <_get_component>: always returns CORBA::Object::_nil().
+
virtual void *_downcast (const char *repository_id) = 0;
// Get the correct vtable.
diff --git a/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.cpp b/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.cpp
index 9bb4a7802e0..46a86fd4d89 100644
--- a/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.cpp
+++ b/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.cpp
@@ -100,7 +100,7 @@ TAO_ThruPOA_Object_Proxy_Impl::_get_interface (const CORBA::Object_ptr target
servant_upcall.prepare_for_upcall (
target->_object_key (),
- "_get_interface",
+ "_interface",
forward_to.out ()
ACE_ENV_ARG_PARAMETER
);
@@ -123,4 +123,37 @@ TAO_ThruPOA_Object_Proxy_Impl::_get_interface (const CORBA::Object_ptr target
return 0;
}
+CORBA::Object_ptr
+TAO_ThruPOA_Object_Proxy_Impl::_get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL)
+{
+ ACE_TRY
+ {
+ TAO_Object_Adapter::Servant_Upcall servant_upcall (
+ target->_stubobj ()->servant_orb_var ()->orb_core ()
+ );
+
+ CORBA::Object_var forward_to;
+
+ servant_upcall.prepare_for_upcall (
+ target->_object_key (),
+ "_component",
+ forward_to.out ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ return servant_upcall.servant ()->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+ }
+ ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
+ {
+ }
+ ACE_CATCHANY
+ {
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
+
#endif // TAO_HAS_MINIMUM_CORBA == 0 //
diff --git a/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h b/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h
index 4bfa5073345..6a2a31010fc 100644
--- a/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h
+++ b/TAO/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h
@@ -61,6 +61,9 @@ public:
ACE_ENV_ARG_DECL
);
+ virtual CORBA::Object_ptr _get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL);
+
#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
};
diff --git a/TAO/tao/Remote_Object_Proxy_Impl.cpp b/TAO/tao/Remote_Object_Proxy_Impl.cpp
index e6d7ef635ef..611ab46a829 100644
--- a/TAO/tao/Remote_Object_Proxy_Impl.cpp
+++ b/TAO/tao/Remote_Object_Proxy_Impl.cpp
@@ -164,6 +164,73 @@ TAO_Remote_Object_Proxy_Impl::_non_existent (const CORBA::Object_ptr target
return _tao_retval;
}
+CORBA::Object_ptr
+TAO_Remote_Object_Proxy_Impl::_get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL)
+{
+ CORBA::Object_var _tao_retval (CORBA::Object::_nil ());
+
+ ACE_TRY
+ {
+ // Must catch exceptions, if the server raises a
+ // CORBA::OBJECT_NOT_EXIST then we must return 1, instead of
+ // propagating the exception.
+ TAO_Stub *istub = target->_stubobj ();
+ if (istub == 0)
+ ACE_THROW_RETURN (CORBA::INTERNAL (
+ CORBA_SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ EINVAL),
+ CORBA::COMPLETED_NO),
+ _tao_retval);
+
+ TAO_GIOP_Twoway_Invocation _tao_call (istub,
+ "_component",
+ 10,
+ 1,
+ istub->orb_core ());
+
+ // ACE_TRY_ENV.clear ();
+ for (;;)
+ {
+ _tao_call.start (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG;
+
+ _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag)
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ int _invoke_status =
+ _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_invoke_status == TAO_INVOKE_RESTART)
+ continue;
+ ACE_ASSERT (_invoke_status != TAO_INVOKE_EXCEPTION);
+ if (_invoke_status != TAO_INVOKE_OK)
+ {
+ ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
+ CORBA::COMPLETED_YES),
+ _tao_retval);
+ }
+ break;
+ }
+ TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
+ if (!(
+ (_tao_in >> _tao_retval.inout ())
+ ))
+ ACE_THROW_RETURN (CORBA::MARSHAL (), _tao_retval);
+ }
+ ACE_CATCHANY
+ {
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+ return _tao_retval._retn ();
+}
+
CORBA_InterfaceDef_ptr
TAO_Remote_Object_Proxy_Impl::_get_interface (const CORBA::Object_ptr target
ACE_ENV_ARG_DECL)
diff --git a/TAO/tao/Remote_Object_Proxy_Impl.h b/TAO/tao/Remote_Object_Proxy_Impl.h
index 0be4323cacb..59f3ee784e0 100644
--- a/TAO/tao/Remote_Object_Proxy_Impl.h
+++ b/TAO/tao/Remote_Object_Proxy_Impl.h
@@ -51,6 +51,9 @@ public:
ACE_ENV_ARG_DECL
);
+ virtual CORBA::Object_ptr _get_component (const CORBA::Object_ptr target
+ ACE_ENV_ARG_DECL);
+
#endif /* TAO_HAS_MINIMUM_CORBA == 0 */
};
diff --git a/TAO/tao/ccm_core/Component_Base.idl b/TAO/tao/ccm_core/Component_Base.idl
new file mode 100644
index 00000000000..312471572a1
--- /dev/null
+++ b/TAO/tao/ccm_core/Component_Base.idl
@@ -0,0 +1,808 @@
+// $Id$
+
+/**
+ * @@ Compile this file with:
+ *
+ * tao_idl -Gv -I W:/ACE_wrappers/TAO -I W:/ACE_wrappers/TAO/orbsvcs/orbsvcs Component_Base.idl
+ *
+ * @@ CosPersistentState related stuff are removed completely.
+ *
+ */
+
+// import ::CORBA
+// import ::SecurityLevel2
+// import ::CosPersistentState
+// import ::PortableServer
+// import ::CosNotification
+// import ::CosNotifyChannelAdmin
+
+#include <CORBA.pidl>
+#include <SecurityLevel2.idl>
+#include <CosPersistentState.idl>
+#include <PortableServer/PortableServer.pidl>
+#include <IFR_Client/Interface.pidl>
+#include <CosNotification.idl>
+#include <CosNotifyChannelAdmin.idl>
+
+/**
+ * Temporarily fix for lacking of typePrefix keyword.
+ * Search for the word "typePrefix" when tao_idl starts
+ * supporting the keyword.
+ */
+#pragma prefix "omg.org"
+
+module Components {
+
+ /**
+ * @@ Commented out temporarily for lack of typePrefix support.
+ */
+ // typePrefix Components "omg.org"
+ typedef string FeatureName;
+ typedef sequence<FeatureName> NameList;
+
+ valuetype Cookie
+ {
+ private CORBA::OctetSeq cookieValue;
+ };
+
+ valuetype PortDescription
+ {
+ public FeatureName Name;
+ public CORBA::RepositoryId type_id;
+ };
+
+ valuetype FacetDescription : PortDescription
+ {
+ public Object facet_ref;
+ };
+
+ typedef sequence<FacetDescription> FacetDescriptions;
+
+ typedef unsigned long FailureReason;
+
+ exception InvalidName {};
+ exception InvalidConnection {};
+ exception ExceededConnectionLimit {};
+ exception AlreadyConnected {};
+ exception NoConnection {};
+ exception CookieRequired {};
+ exception CreateFailure {
+ FailureReason reason;
+ };
+ exception FinderFailure
+ {
+ FailureReason reason;
+ };
+ exception RemoveFailure
+ {
+ FailureReason reason;
+ };
+ exception DuplicateKeyValue {};
+ exception InvalidKey {};
+ exception UnknownKeyValue {};
+ exception NoKeyAvailable {};
+ exception BadEventType
+ {
+ CORBA::RepositoryId expected_event_type;
+ };
+ exception HomeNotFound {};
+ exception WrongComponentType {};
+
+ typedef FailureReason InvalidConfigurationReason;
+ const InvalidConfigurationReason UnknownConfigValueName = 0;
+ const InvalidConfigurationReason InvalidConfigValueType = 1;
+ const InvalidConfigurationReason ConfigValueRequired = 2;
+ const InvalidConfigurationReason ConfigValueNotExpected = 3;
+ exception InvalidConfiguration
+ {
+ InvalidConfigurationReason reason;
+ FeatureName name;
+ };
+ exception IllegalState {};
+
+ interface Navigation
+ {
+ Object provide_facet (in FeatureName name)
+ raises (InvalidName);
+ FacetDescriptions get_all_facets();
+ FacetDescriptions get_named_facets (in NameList names)
+ raises (InvalidName);
+ boolean same_component (in Object object_ref);
+ };
+
+ valuetype ConnectionDescription
+ {
+ public Cookie ck;
+ public Object objref;
+ };
+ typedef sequence<ConnectionDescription> ConnectionDescriptions;
+
+ valuetype ReceptacleDescription : PortDescription
+ {
+ public boolean is_multiple;
+ public ConnectionDescriptions connections;
+ };
+ typedef sequence<ReceptacleDescription> ReceptacleDescriptions;
+
+ interface Receptacles
+ {
+ Cookie connect (in FeatureName name, in Object connection )
+ raises (InvalidName,
+ InvalidConnection,
+ AlreadyConnected,
+ ExceededConnectionLimit);
+
+ void disconnect (in FeatureName name, in Cookie ck)
+ raises (InvalidName,
+ InvalidConnection,
+ CookieRequired,
+ NoConnection);
+
+ ConnectionDescriptions get_connections (in FeatureName name)
+ raises (InvalidName);
+
+ ReceptacleDescriptions get_all_receptacles ();
+
+ ReceptacleDescriptions get_named_receptacles (in NameList names)
+ raises (InvalidName);
+ };
+
+ abstract valuetype EventBase {};
+
+ interface EventConsumerBase
+ {
+ void push_event (in EventBase evt) raises (BadEventType);
+ };
+
+ valuetype ConsumerDescription : PortDescription
+ {
+ public EventConsumerBase consumer;
+ };
+ typedef sequence<ConsumerDescription> ConsumerDescriptions;
+
+ valuetype EmitterDescription : PortDescription
+ {
+ public EventConsumerBase consumer;
+ };
+ typedef sequence<EmitterDescription> EmitterDescriptions;
+
+ // @@ I added the parent class "PortDescription" below as it seems
+ // to be missing from the draft.
+ valuetype SubscriberDescription : PortDescription
+ {
+ public Cookie ck;
+ public EventConsumerBase consumer;
+ };
+ typedef sequence<SubscriberDescription> SubscriberDescriptions;
+
+ valuetype PublisherDescription : PortDescription
+ {
+ public SubscriberDescriptions consumer;
+ };
+ typedef sequence<PublisherDescription> PublisherDescriptions;
+
+ interface Events
+ {
+ EventConsumerBase get_consumer (in FeatureName sink_name)
+ raises (InvalidName);
+
+ Cookie subscribe (in FeatureName publisher_name,
+ in EventConsumerBase subscriber)
+ raises (InvalidName,
+ AlreadyConnected,
+ InvalidConnection);
+
+ void unsubscribe (in FeatureName publisher_name,
+ in Cookie ck)
+ raises (InvalidName,
+ InvalidConnection);
+
+ void connect_consumer (in FeatureName emitter_name,
+ in EventConsumerBase consumer)
+ raises (InvalidName,
+ AlreadyConnected,
+ InvalidConnection);
+
+ EventConsumerBase disconnect_consumer (in FeatureName source_name)
+ raises (InvalidName,
+ NoConnection);
+
+ ConsumerDescriptions get_all_consumers ();
+
+ ConsumerDescriptions get_named_consumers (in NameList names)
+ raises (InvalidName);
+
+ EmitterDescriptions get_all_emitters ();
+
+ EmitterDescriptions get_named_emitters (in NameList names)
+ raises (InvalidName);
+
+ PublisherDescriptions get_all_publishers ();
+
+ PublisherDescriptions get_named_publishers (in NameList names)
+ raises (InvalidName);
+ };
+
+ abstract valuetype PrimaryKeyBase {};
+
+ interface CCMObject; //forward reference
+
+ interface CCMHome
+ {
+ CORBA::IRObject get_component_def ();
+ CORBA::IRObject get_home_def ();
+ void remove_component ( in CCMObject comp)
+ raises (RemoveFailure);
+ };
+ typedef sequence<CCMHome> CCMHomes;
+
+ interface KeylessCCMHome
+ {
+ CCMObject create_component()
+ raises (CreateFailure);
+ };
+
+ interface HomeFinder
+ {
+ CCMHome find_home_by_component_type (in CORBA::RepositoryId comp_repid)
+ raises (HomeNotFound);
+
+ CCMHome find_home_by_home_type (in CORBA::RepositoryId home_repid)
+ raises (HomeNotFound);
+
+ CCMHome find_home_by_name (in string home_name)
+ raises (HomeNotFound);
+ };
+
+ interface Configurator
+ {
+ void configure (in CCMObject comp)
+ raises (WrongComponentType);
+ };
+
+ valuetype ConfigValue
+ {
+ public FeatureName name;
+ public any value;
+ };
+
+ typedef sequence<ConfigValue> ConfigValues;
+
+ interface StandardConfigurator : Configurator
+ {
+ void set_configuration (in ConfigValues descr);
+ };
+
+ interface HomeConfiguration : CCMHome
+ {
+ void set_configurator (in Configurator cfg);
+ void set_configuration_values (in ConfigValues config);
+ void complete_component_configuration (in boolean b);
+ void disable_home_configuration();
+ };
+
+ valuetype ComponentPortDescription
+ {
+ public FacetDescriptions facets;
+ public ReceptacleDescriptions receptacles;
+ public ConsumerDescriptions consumers;
+ public EmitterDescriptions emitters;
+ public PublisherDescriptions publishers;
+ };
+
+ interface CCMObject : Navigation, Receptacles, Events
+ {
+ CORBA::IRObject get_component_def ( );
+ CCMHome get_ccm_home( );
+ PrimaryKeyBase get_primary_key( )
+ raises (NoKeyAvailable);
+ void configuration_complete( )
+ raises (InvalidConfiguration);
+ void remove()
+ raises (RemoveFailure);
+ ComponentPortDescription get_all_ports ();
+ };
+
+
+ // @@ Enumeration and DefaultEnumeration are only for EJB to CCM
+ // mapping? At any rate, we should be able to skip them for now.
+ abstract valuetype Enumeration
+ {
+ boolean has_more_elements();
+ CCMObject next_element();
+ };
+
+ typedef sequence<CCMObject> CCMObjectSeq;
+
+ valuetype DefaultEnumeration : Enumeration
+ {
+ private CCMObjectSeq objects;
+ };
+
+ // @@ Components::Transaction is still there.
+ module Transaction
+ {
+
+ typedef sequence<octet> TranToken;
+
+ exception NoTransaction {};
+ exception NotSupported {};
+ exception SystemError {};
+ exception RollbackError {};
+ exception HeuristicMixed {};
+ exception HeuristicRollback {};
+ exception Security {};
+ exception InvalidToken {};
+
+ enum Status
+ {
+ ACTIVE,
+ MARKED_ROLLBACK,
+ PREPARED,
+ COMMITTED,
+ ROLLED_BACK,
+ NO_TRANSACTION,
+ PREPARING,
+ COMMITTING,
+ ROLLING_BACK
+ };
+
+ local interface UserTransaction {
+ void begin ()
+ raises (NotSupported,
+ SystemError);
+
+ void commit ()
+ raises (RollbackError,
+ NoTransaction,
+ HeuristicMixed,
+ HeuristicRollback,
+ Security,
+ SystemError);
+
+ void rollback ()
+ raises (NoTransaction,
+ Security,
+ SystemError);
+
+ void set_rollback_only ()
+ raises (NoTransaction,
+ SystemError);
+
+ Status get_status()
+ raises (SystemError);
+
+ void set_timeout (in long to)
+ raises (SystemError);
+
+ TranToken suspend ()
+ raises (NoTransaction,
+ SystemError);
+
+ void resume (in TranToken txtoken)
+ raises (InvalidToken,
+ SystemError);
+ };
+ };
+
+ // @@ module Notification doesn't seem to exist anymore.
+ module Notification {
+
+ typedef CosNotification::EventHeader EventHeader;
+ /**
+ * @@ Typo with "CosNotifyChannnelAdmin::ChannelId"?
+ */
+ typedef CosNotifyChannelAdmin::ChannelID Channel;
+
+ exception ChannelUnavailable {};
+ exception InvalidSubscription {};
+ exception InvalidName {};
+ exception InvalidChannel {};
+
+ local interface LocalCookie {
+ boolean same_as (in LocalCookie cookie);
+ };
+
+ local interface Event {
+ EventConsumerBase create_channel
+ (out Channel chid)
+ raises (ChannelUnavailable);
+ LocalCookie subscribe (
+ in EventConsumerBase ecb,
+ in Channel chid)
+ raises (ChannelUnavailable);
+ void unsubscribe (in LocalCookie cookie)
+ raises (InvalidSubscription);
+ EventConsumerBase obtain_channel (
+ in string supp_name,
+ in EventHeader hdr)
+ raises (InvalidName);
+ void listen (in EventConsumerBase ecb,
+ in string csmr_name)
+ raises (InvalidName);
+ void push (in EventBase evt);
+ void destroy_channel (in Channel chid)
+ raises (InvalidChannel);
+ };
+ };
+
+ // *************** Basic Container interfaces ***************
+
+ typedef SecurityLevel2::Credentials Principal;
+
+ local interface CCMContext
+ {
+ Principal get_caller_principal();
+
+ CCMHome get_CCM_home();
+
+ boolean get_rollback_only()
+ raises (IllegalState);
+
+ Transaction::UserTransaction get_user_transaction()
+ raises (IllegalState);
+
+ boolean is_caller_in_role (in string role);
+
+ void set_rollback_only()
+ raises (IllegalState);
+ };
+
+ enum CCMExceptionReason
+ {
+ SYSTEM_ERROR,
+ CREATE_ERROR,
+ REMOVE_ERROR,
+ DUPLICATE_KEY,
+ FIND_ERROR,
+ OBJECT_NOT_FOUND,
+ NO_SUCH_ENTITY
+ };
+
+ exception CCMException
+ {
+ CCMExceptionReason reason;
+ };
+
+ local interface EnterpriseComponent {};
+
+ local interface SessionContext : CCMContext
+ {
+ Object get_CCM_object()
+ raises (IllegalState);
+ };
+
+ local interface SessionComponent : EnterpriseComponent
+ {
+ void set_session_context ( in SessionContext ctx)
+ raises (CCMException);
+
+ void ccm_activate()
+ raises (CCMException);
+
+ void ccm_passivate()
+ raises (CCMException);
+
+ void ccm_remove ()
+ raises (CCMException);
+ };
+
+ local interface SessionSynchronization
+ {
+ void after_begin ()
+ raises (CCMException);
+
+ void before_completion ()
+ raises (CCMException);
+
+ void after_completion (in boolean committed)
+ raises (CCMException);
+ };
+
+ local interface EntityContext : CCMContext
+ {
+ Object get_CCM_object ()
+ raises (IllegalState);
+
+ PrimaryKeyBase get_primary_key ()
+ raises (IllegalState);
+ };
+
+ local interface EntityComponent : EnterpriseComponent
+ {
+ void set_entity_context (in EntityContext ctx)
+ raises (CCMException);
+
+ void unset_entity_context ()
+ raises (CCMException);
+
+ void ccm_activate ()
+ raises (CCMException);
+
+ void ccm_load ()
+ raises (CCMException);
+
+ void ccm_store ()
+ raises (CCMException);
+
+ void ccm_passivate ()
+ raises (CCMException);
+
+ void ccm_remove ()
+ raises (CCMException);
+ };
+
+ // *************** Extended Container Interfaces ***************
+
+ enum BadComponentReferenceReason
+ {
+ NON_LOCAL_REFERENCE,
+ NON_COMPONENT_REFERENCE,
+ WRONG_CONTAINER
+ };
+
+ typedef CosPersistentState::CatalogBase CatalogBase;
+ typedef CosPersistentState::TypeId TypeId;
+
+ typedef short SegmentId;
+ const SegmentId COMPONENT_SEGMENT = 0;
+
+ typedef short FacetId;
+ const FacetId COMPONENT_FACET = 0;
+
+ typedef sequence<octet> IdData;
+ typedef CosPersistentState::Pid PersistentId;
+
+ typedef short StateIdType;
+ const StateIdType PERSISTENT_ID = 0;
+
+ exception BadComponentReference
+ {
+ BadComponentReferenceReason reason;
+ };
+ exception PolicyMismatch {};
+ exception PersistenceNotAvailable {};
+ exception UnknownActualHome {};
+ exception ProxyHomeNotSupported {};
+ exception InvalidStateIdData {};
+
+ local interface HomeRegistration
+ {
+ void register_home (in CCMHome home_ref,
+ in string home_name);
+
+ void unregister_home (in CCMHome home_ref);
+ };
+
+ local interface CCM2Context : CCMContext
+ {
+ HomeRegistration get_home_registration ();
+
+ void req_passivate ()
+ raises (PolicyMismatch);
+
+ CatalogBase get_persistence (in TypeId catalog_type_id)
+ raises (PersistenceNotAvailable);
+ };
+
+ local interface ProxyHomeRegistration : HomeRegistration
+ {
+ void register_proxy_home (in CCMHome rhome,
+ in CCMHome ahome)
+ raises (UnknownActualHome,
+ ProxyHomeNotSupported);
+ };
+
+ local interface Session2Context : SessionContext, CCM2Context
+ {
+ Object create_ref (in CORBA::RepositoryId repid);
+
+ Object create_ref_from_oid (in CORBA::OctetSeq oid,
+ in CORBA::RepositoryId repid);
+
+ CORBA::OctetSeq get_oid_from_ref (in Object objref)
+ raises (IllegalState,
+ BadComponentReference);
+ };
+
+ abstract valuetype StateIdValue
+ {
+ StateIdType get_sid_type();
+ IdData get_sid_data();
+ };
+
+ local interface StateIdFactory
+ {
+ StateIdValue create (in IdData data)
+ raises (InvalidStateIdData);
+ };
+
+ valuetype PersistentIdValue : StateIdValue
+ {
+ private PersistentId pid;
+
+ PersistentId get_pid();
+ factory init (in PersistentId pid);
+ };
+
+ valuetype SegmentDescr
+ {
+ private StateIdValue sid;
+ private SegmentId seg;
+
+ StateIdValue get_sid();
+ SegmentId get_seg_id();
+ factory init (in StateIdValue sid,
+ in SegmentId seg);
+ };
+
+ typedef sequence<SegmentDescr> SegmentDescrSeq;
+
+ local interface ComponentId
+ {
+ FacetId get_target_facet();
+
+ SegmentId get_target_segment();
+
+ StateIdValue get_target_state_id (in StateIdFactory sid_factory)
+ raises (InvalidStateIdData);
+
+ StateIdValue get_segment_state_id (in SegmentId seg,
+ in StateIdFactory sid_factory)
+ raises (InvalidStateIdData);
+
+ ComponentId create_with_new_target (in FacetId new_target_facet,
+ in SegmentId new_target_segment);
+
+ SegmentDescrSeq get_segment_descrs (in StateIdFactory sid_factory)
+ raises (InvalidStateIdData);
+ };
+
+ local interface Entity2Context : EntityContext, CCM2Context
+ {
+ ComponentId get_component_id ()
+ raises (IllegalState);
+
+ ComponentId create_component_id (in FacetId target_facet,
+ in SegmentId target_segment,
+ in SegmentDescrSeq seq_descrs);
+
+ ComponentId create_monolithic_component_id (in FacetId target_facet,
+ in StateIdValue sid);
+
+ Object create_ref_from_cid (in CORBA::RepositoryId repid,
+ in ComponentId cid);
+
+ ComponentId get_cid_from_ref (in Object objref)
+ raises (BadComponentReference);
+ };
+
+ // *************** Packaging and Deployment ***************
+
+ module Deployment
+ {
+ typedef string UUID;
+ typedef string Location;
+
+ enum AssemblyState
+ {
+ INACTIVE,
+ INSERVICE
+ };
+
+ exception UnknownImplId {};
+ exception InvalidLocation {};
+ exception InstallationFailure
+ {
+ FailureReason reason;
+ };
+ exception InvalidAssembly {};
+
+ interface ComponentInstallation
+ {
+ void install(in UUID implUUID,
+ in Location component_loc)
+ raises (InvalidLocation,
+ InstallationFailure);
+
+ void replace(in UUID implUUID,
+ in Location component_loc)
+ raises (InvalidLocation,
+ InstallationFailure);
+
+ void remove(in UUID implUUID)
+ raises (UnknownImplId,
+ RemoveFailure);
+
+ Location get_implementation (in UUID implUUID)
+ raises (UnknownImplId,
+ InstallationFailure);
+ };
+
+ interface Assembly
+ {
+ void build();
+
+ void tear_down()
+ raises (RemoveFailure);
+
+ AssemblyState get_state();
+ };
+
+ interface AssemblyFactory
+ {
+ Cookie create(in Location assembly_loc)
+ raises (InvalidLocation,
+ CreateFailure);
+
+ Assembly lookup(in Cookie c)
+ raises (InvalidAssembly);
+
+ void destroy(in Cookie c)
+ raises (InvalidAssembly,
+ RemoveFailure);
+ };
+
+ interface ComponentServer; // Forward decl.
+ typedef sequence<ComponentServer> ComponentServers;
+
+ interface ServerActivator
+ {
+ ComponentServer create_component_server (in ConfigValues config)
+ raises (CreateFailure,
+ InvalidConfiguration);
+
+ void remove_component_server (in ComponentServer server)
+ raises (RemoveFailure);
+
+ ComponentServers get_component_servers ();
+ };
+
+ interface Container; // Forward decl.
+ typedef sequence<Container> Containers;
+
+ interface ComponentServer
+ {
+ readonly attribute ConfigValues configuration;
+
+ ServerActivator get_server_activator ();
+ Container create_container (in ConfigValues config)
+ raises (CreateFailure,
+ InvalidConfiguration);
+
+ void remove_container (in Container cref)
+ raises (RemoveFailure);
+
+ Containers get_containers ();
+
+ void remove ()
+ raises (RemoveFailure);
+ };
+
+ exception ImplEntryPointNotFound {};
+
+ interface Container
+ {
+ readonly attribute ConfigValues configuration;
+
+ ComponentServer get_component_server ();
+
+ CCMHome install_home (in UUID id,
+ in string entrypt,
+ in ConfigValues config)
+ raises (UnknownImplId,
+ ImplEntryPointNotFound,
+ InstallationFailure,
+ InvalidConfiguration);
+
+ void remove_home (in CCMHome href)
+ raises (RemoveFailure);
+
+ CCMHomes get_homes ();
+ void remove ()
+ raises (RemoveFailure);
+
+ };
+
+ };
+};
diff --git a/TAO/tao/ccm_core/CosPersistentState.idl b/TAO/tao/ccm_core/CosPersistentState.idl
new file mode 100644
index 00000000000..65813eb4ed8
--- /dev/null
+++ b/TAO/tao/ccm_core/CosPersistentState.idl
@@ -0,0 +1,16 @@
+// $Id$
+
+/**
+ * @@ This is just a temporary file. Since TAO does not have
+ * CosPersistentState at all, we use this file to define
+ * types necessary to get ComponentBase.idl to compile.
+ */
+
+module CosPersistentState {
+ local interface CatalogBase
+ {
+ };
+
+ typedef sequence<octet> TypeId;
+ typedef string Pid;
+};