summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-18 02:52:03 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-18 02:52:03 +0000
commit4e0db70e1c183c22ab48f8c41ef152915511c43c (patch)
tree7a348a0f2685295a0fb46b5a5ac897e01aaa8dcc
parentcc57840a1efe849f7e33df58168b5e468bc24c1e (diff)
downloadATCD-4e0db70e1c183c22ab48f8c41ef152915511c43c.tar.gz
Added collocated _is_a and _non_existent methods
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/collocated_sh.cpp15
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp67
2 files changed, 81 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/collocated_sh.cpp
index 502272cc7ab..a23393731d4 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/collocated_sh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/collocated_sh.cpp
@@ -95,14 +95,27 @@ int be_visitor_interface_collocated_sh::visit_interface (be_interface *node)
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
+ << "CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()" << be_uidt_nl
+ << ");" << be_uidt_nl << 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;
+ << "_ptr _get_servant (void) const;" << be_nl << be_nl;
+
+ *os << "virtual CORBA::Boolean _non_existent" << be_idt
+ << "(" << be_idt_nl
+ << "CORBA_Environment &TAO_IN_ENV = TAO_default_environment ()" << be_uidt_nl
+ << ");" << be_uidt_nl << be_nl;
if (this->visit_scope (node) == -1)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp
index 27a1ae7c764..deb107546b8 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp
@@ -101,6 +101,40 @@ int be_visitor_interface_collocated_ss::visit_interface (be_interface *node)
*os << "}\n\n";
os->indent ();
+
+ // Generate _is_a implementation.
+ *os << "CORBA::Boolean " << node->full_coll_name () << "::"
+ << "_is_a" << be_idt
+ << "(" << be_idt_nl
+ << "const CORBA::Char *logical_type_id," << be_nl
+ << "CORBA_Environment &ACE_TRY_ENV" << be_uidt_nl
+ << ")" << be_uidt_nl << be_nl;
+ *os << "{" << be_idt_nl
+ << "if (this->_stubobj ()->orb_core ()->get_collocation_strategy ()"
+ " == TAO_ORB_Core::THRU_POA)" << be_idt_nl
+ << "{" << be_idt_nl;
+ *os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
+ << be_idt << be_idt_nl
+ << "*this->_stubobj ()->servant_orb ()->orb_core ()->object_adapter ()"
+ << be_uidt_nl
+ << ");" << be_uidt_nl
+ << "servant_upcall.prepare_for_upcall (" << be_idt << be_idt_nl
+ << "this->_object_key ()," << be_nl
+ << "\"" << "_is_a" << "\"," << be_nl
+ << "ACE_TRY_ENV" << 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_TRY_ENV);" << be_uidt << be_uidt_nl;
+ *os << "}" << be_uidt_nl
+ << "return this->servant_->_is_a (logical_type_id, ACE_TRY_ENV);" << be_uidt_nl
+ << "}\n\n" << be_uidt_nl;
+
+ // Generate _get_servant implementation.
*os << node->full_skel_name () << "_ptr "
<< node->full_coll_name () << "::"
<< "_get_servant (void) const\n"
@@ -110,6 +144,39 @@ int be_visitor_interface_collocated_ss::visit_interface (be_interface *node)
os->decr_indent ();
*os << "}\n\n";
+ os->indent ();
+
+ // Generate _non_existent implementation.
+ *os << "CORBA::Boolean " << node->full_coll_name () << "::"
+ << "_non_existent" << be_idt
+ << "(" << be_idt_nl
+ << "CORBA_Environment &ACE_TRY_ENV" << be_uidt_nl
+ << ")" << be_uidt_nl << be_nl;
+ *os << "{" << be_idt_nl
+ << "if (this->_stubobj ()->orb_core ()->get_collocation_strategy ()"
+ " == TAO_ORB_Core::THRU_POA)" << be_idt_nl
+ << "{" << be_idt_nl;
+ *os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
+ << be_idt << be_idt_nl
+ << "*this->_stubobj ()->servant_orb ()->orb_core ()->object_adapter ()"
+ << be_uidt_nl
+ << ");" << be_uidt_nl
+ << "servant_upcall.prepare_for_upcall (" << be_idt << be_idt_nl
+ << "this->_object_key ()," << be_nl
+ << "\"" << "_non_existent" << "\"," << be_nl
+ << "ACE_TRY_ENV" << 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_TRY_ENV);" << be_uidt << be_uidt_nl;
+ *os << "}" << be_uidt_nl
+ << "return this->servant_->_non_existent (ACE_TRY_ENV);" << be_uidt_nl
+ << "}\n\n" << be_uidt_nl;
+
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,