summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-05-02 21:42:45 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-05-02 21:42:45 +0000
commite664e57768249a5f97cdcc2534c26641e8907f71 (patch)
tree1c8f3e95415f8c04fecd3dab75426aa999f39b70
parentef5c05192744bf0d98f7d7cbea676c4a039e8caa (diff)
downloadATCD-e664e57768249a5f97cdcc2534c26641e8907f71.tar.gz
ChangeLogTag:Tue May 2 16:38:55 2000 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a10
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp162
-rw-r--r--TAO/tao/InterceptorC.cpp48
3 files changed, 131 insertions, 89 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 9e8efa1ba5d..8e314b30e44 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,13 @@
+Tue May 2 16:38:55 2000 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp: Enabled explicit
+ template instantiation for TAO_Object_Manager which is needed
+ for sequences.
+
+ * tao/InterceptorC.cpp: Regenerated the file to solve the link
+ error on SunCC 5.0.
+
+
Tue May 2 12:05:07 2000 Carlos O'Ryan <coryan@uci.edu>
* orbsvcs/orbsvcs/Event/EC_Gateway.cpp:
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
index d9589b63f18..826a66e4634 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
@@ -45,84 +45,87 @@ int
be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
{
if (node->cli_stub_any_op_gen () ||
- node->imported () ||
- node->is_local ())
+ node->imported ())
return 0;
TAO_OutStream *os = this->ctx_->stream ();
os->indent ();
- // Generate the stub factory function pointer definition.
- *os << node->full_name () << "_ptr (*";
-
- *os << "_TAO_collocation_"
- << node->flat_name () << "_Stub_Factory_function_pointer) ("
- << be_idt << be_idt_nl
- << "CORBA::Object_ptr obj" << be_uidt_nl
- << ") = 0;" << be_uidt_nl;
-
- // generate the Any <<= and >>= operator declarations
- // Any <<= and >>= operators
- os->indent ();
- *os << "void operator<<= (CORBA::Any &_tao_any, "
- << node->full_name () << "_ptr _tao_elem)" << be_nl
- << "{" << be_idt_nl
- << "TAO_OutputCDR stream;" << be_nl
- << "if (stream << _tao_elem)" << be_nl
- << "{" << be_idt_nl
- << "_tao_any._tao_replace (" << be_idt << be_idt_nl
- << node->tc_name () << ", " << be_nl
- << "TAO_ENCAP_BYTE_ORDER," << be_nl
- << "stream.begin ()," << be_nl
- << "1," << be_nl
- << node->full_name () << "::_duplicate (_tao_elem)," << be_nl
- << node->name () << "::_tao_any_destructor" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl
- << "}" << be_uidt_nl
- << "}\n" << be_nl;
-
- *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
- << node->full_name () << "_ptr &_tao_elem)" << be_nl
- << "{" << be_idt_nl
- << "ACE_TRY_NEW_ENV" << be_nl
- << "{" << be_idt_nl
- << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl
- << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
- << "if (!type->equivalent (" << node->tc_name ()
- << ", ACE_TRY_ENV)) // not equal" << be_idt_nl
- << "{" << be_idt_nl
- << "return 0;" << be_uidt_nl
- << "}" << be_uidt_nl
- << "ACE_TRY_CHECK;" << be_nl
- << "TAO_InputCDR stream (" << be_idt << be_idt_nl
- << "_tao_any._tao_get_cdr ()," << be_nl
- << "_tao_any._tao_byte_order ()" << be_uidt_nl
- << ");" << be_uidt_nl
- << "CORBA::Object_var _tao_obj_var;" << be_nl
- << "if (stream >> _tao_obj_var.out ())" << be_nl
- << "{" << be_idt_nl
- << "_tao_elem = " << node->full_name ()
- << "::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);" << be_nl
- << "ACE_TRY_CHECK;" << be_nl
- << be_nl
- << "((CORBA::Any *)&_tao_any)->_tao_replace (" << be_idt << be_idt_nl
- << node->tc_name () << "," << be_nl
- << "1," << be_nl
- << "_tao_elem," << be_nl
- << node->name () << "::_tao_any_destructor" << be_uidt_nl
- << ");" << be_uidt_nl
- << "return 1;" << be_uidt_nl
- << "}" << be_uidt_nl
- << "}" << be_nl
- << "ACE_CATCHANY" << be_nl
- << "{" << be_idt_nl
- << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl
- << "return 0;" << be_uidt_nl
- << "}" << be_nl
- << "ACE_ENDTRY;" << be_nl
- << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl
- << "return 0;" << be_uidt_nl
- << "}\n\n";
+ if (!node->is_local ())
+ {
+ // Generate the stub factory function pointer definition.
+ *os << node->full_name () << "_ptr (*";
+
+ *os << "_TAO_collocation_"
+ << node->flat_name () << "_Stub_Factory_function_pointer) ("
+ << be_idt << be_idt_nl
+ << "CORBA::Object_ptr obj" << be_uidt_nl
+ << ") = 0;" << be_uidt_nl;
+
+ os->indent ();
+
+ // generate the Any <<= and >>= operator declarations
+ // Any <<= and >>= operators
+ *os << "void operator<<= (CORBA::Any &_tao_any, "
+ << node->full_name () << "_ptr _tao_elem)" << be_nl
+ << "{" << be_idt_nl
+ << "TAO_OutputCDR stream;" << be_nl
+ << "if (stream << _tao_elem)" << be_nl
+ << "{" << be_idt_nl
+ << "_tao_any._tao_replace (" << be_idt << be_idt_nl
+ << node->tc_name () << ", " << be_nl
+ << "TAO_ENCAP_BYTE_ORDER," << be_nl
+ << "stream.begin ()," << be_nl
+ << "1," << be_nl
+ << node->full_name () << "::_duplicate (_tao_elem)," << be_nl
+ << node->name () << "::_tao_any_destructor" << be_uidt_nl
+ << ");" << be_uidt << be_uidt_nl
+ << "}" << be_uidt_nl
+ << "}\n" << be_nl;
+
+ *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
+ << node->full_name () << "_ptr &_tao_elem)" << be_nl
+ << "{" << be_idt_nl
+ << "ACE_TRY_NEW_ENV" << be_nl
+ << "{" << be_idt_nl
+ << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equivalent (" << node->tc_name ()
+ << ", ACE_TRY_ENV)) // not equal" << be_idt_nl
+ << "{" << be_idt_nl
+ << "return 0;" << be_uidt_nl
+ << "}" << be_uidt_nl
+ << "ACE_TRY_CHECK;" << be_nl
+ << "TAO_InputCDR stream (" << be_idt << be_idt_nl
+ << "_tao_any._tao_get_cdr ()," << be_nl
+ << "_tao_any._tao_byte_order ()" << be_uidt_nl
+ << ");" << be_uidt_nl
+ << "CORBA::Object_var _tao_obj_var;" << be_nl
+ << "if (stream >> _tao_obj_var.out ())" << be_nl
+ << "{" << be_idt_nl
+ << "_tao_elem = " << node->full_name ()
+ << "::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);" << be_nl
+ << "ACE_TRY_CHECK;" << be_nl
+ << be_nl
+ << "((CORBA::Any *)&_tao_any)->_tao_replace (" << be_idt << be_idt_nl
+ << node->tc_name () << "," << be_nl
+ << "1," << be_nl
+ << "_tao_elem," << be_nl
+ << node->name () << "::_tao_any_destructor" << be_uidt_nl
+ << ");" << be_uidt_nl
+ << "return 1;" << be_uidt_nl
+ << "}" << be_uidt_nl
+ << "}" << be_nl
+ << "ACE_CATCHANY" << be_nl
+ << "{" << be_idt_nl
+ << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl
+ << "return 0;" << be_uidt_nl
+ << "}" << be_nl
+ << "ACE_ENDTRY;" << be_nl
+ << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl
+ << "return 0;" << be_uidt_nl
+ << "}\n\n";
+ }
*os << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\"
<< be_idt_nl
@@ -137,12 +140,13 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
<< "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */\n\n";
// all we have to do is to visit the scope and generate code
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::visit_interface - "
- "codegen for scope failed\n"), -1);
- }
+ if (!node->is_local ())
+ if (this->visit_scope (node) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interface::visit_interface - "
+ "codegen for scope failed\n"), -1);
+ }
node->cli_stub_any_op_gen (1);
diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp
index f1966b27380..67573c92572 100644
--- a/TAO/tao/InterceptorC.cpp
+++ b/TAO/tao/InterceptorC.cpp
@@ -45,7 +45,7 @@ PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie::_unchecked_narrow (
);
}
-PortableInterceptor::Cookie_ptr
+PortableInterceptor::Cookie_ptr
PortableInterceptor::Cookie::_duplicate (Cookie_ptr obj)
{
if (!CORBA::is_nil (obj))
@@ -58,7 +58,7 @@ void *PortableInterceptor::Cookie::_tao_QueryInterface (ptr_arith_t type)
void *retv = 0;
if (type == ACE_reinterpret_cast
(ptr_arith_t,
- &Cookie::_narrow))
+ &ACE_NESTED_CLASS (::PortableInterceptor, Cookie)::_narrow))
retv = ACE_reinterpret_cast (void*, this);
else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))
retv = ACE_reinterpret_cast (void *,
@@ -234,7 +234,7 @@ PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor::_unchecke
);
}
-PortableInterceptor::Interceptor_ptr
+PortableInterceptor::Interceptor_ptr
PortableInterceptor::Interceptor::_duplicate (Interceptor_ptr obj)
{
if (!CORBA::is_nil (obj))
@@ -247,7 +247,7 @@ void *PortableInterceptor::Interceptor::_tao_QueryInterface (ptr_arith_t type)
void *retv = 0;
if (type == ACE_reinterpret_cast
(ptr_arith_t,
- &Interceptor::_narrow))
+ &ACE_NESTED_CLASS (::PortableInterceptor, Interceptor)::_narrow))
retv = ACE_reinterpret_cast (void*, this);
else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))
retv = ACE_reinterpret_cast (void *,
@@ -293,7 +293,7 @@ PortableInterceptor::ServerRequestInterceptor_ptr PortableInterceptor::ServerReq
);
}
-PortableInterceptor::ServerRequestInterceptor_ptr
+PortableInterceptor::ServerRequestInterceptor_ptr
PortableInterceptor::ServerRequestInterceptor::_duplicate (ServerRequestInterceptor_ptr obj)
{
if (!CORBA::is_nil (obj))
@@ -306,11 +306,11 @@ void *PortableInterceptor::ServerRequestInterceptor::_tao_QueryInterface (ptr_ar
void *retv = 0;
if (type == ACE_reinterpret_cast
(ptr_arith_t,
- &ServerRequestInterceptor::_narrow))
+ &ACE_NESTED_CLASS (::PortableInterceptor, ServerRequestInterceptor)::_narrow))
retv = ACE_reinterpret_cast (void*, this);
else if (type == ACE_reinterpret_cast
(ptr_arith_t,
- &Interceptor::_narrow))
+ &ACE_NESTED_CLASS (::PortableInterceptor, Interceptor)::_narrow))
retv = ACE_reinterpret_cast
(
void *,
@@ -364,7 +364,7 @@ PortableInterceptor::ClientRequestInterceptor_ptr PortableInterceptor::ClientReq
);
}
-PortableInterceptor::ClientRequestInterceptor_ptr
+PortableInterceptor::ClientRequestInterceptor_ptr
PortableInterceptor::ClientRequestInterceptor::_duplicate (ClientRequestInterceptor_ptr obj)
{
if (!CORBA::is_nil (obj))
@@ -377,11 +377,11 @@ void *PortableInterceptor::ClientRequestInterceptor::_tao_QueryInterface (ptr_ar
void *retv = 0;
if (type == ACE_reinterpret_cast
(ptr_arith_t,
- &ClientRequestInterceptor::_narrow))
+ &ACE_NESTED_CLASS (::PortableInterceptor, ClientRequestInterceptor)::_narrow))
retv = ACE_reinterpret_cast (void*, this);
else if (type == ACE_reinterpret_cast
(ptr_arith_t,
- &Interceptor::_narrow))
+ &ACE_NESTED_CLASS (::PortableInterceptor, Interceptor)::_narrow))
retv = ACE_reinterpret_cast
(
void *,
@@ -406,3 +406,31 @@ const char* PortableInterceptor::ClientRequestInterceptor::_interface_repository
}
#endif /* TAO_HAS_INTERCEPTORS == 1 */
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var>;
+ #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+ # pragma instantiate TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Manager<PortableInterceptor::Interceptor,PortableInterceptor::Interceptor_var>;
+ #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+ # pragma instantiate TAO_Object_Manager<PortableInterceptor::Interceptor,PortableInterceptor::Interceptor_var>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Manager<PortableInterceptor::ServerRequestInterceptor,PortableInterceptor::ServerRequestInterceptor_var>;
+ #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+ # pragma instantiate TAO_Object_Manager<PortableInterceptor::ServerRequestInterceptor,PortableInterceptor::ServerRequestInterceptor_var>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Manager<PortableInterceptor::ClientRequestInterceptor,PortableInterceptor::ClientRequestInterceptor_var>;
+ #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+ # pragma instantiate TAO_Object_Manager<PortableInterceptor::ClientRequestInterceptor,PortableInterceptor::ClientRequestInterceptor_var>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+