diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-29 21:10:14 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-29 21:10:14 +0000 |
commit | cdaaf27641357e3ff99e14f408a33fdcecf95126 (patch) | |
tree | 6c19515c10aa5e131703a667a09ac4535389eb29 | |
parent | 0bce1c2e97ede2b7adce08ecbfab0d46f6813827 (diff) | |
download | ATCD-cdaaf27641357e3ff99e14f408a33fdcecf95126.tar.gz |
Put back the NVList argument in interceptors
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp | 30 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp | 17 | ||||
-rw-r--r-- | TAO/tao/Interceptor.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Interceptor.pidl | 8 | ||||
-rw-r--r-- | TAO/tao/InterceptorC.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/InterceptorC.h | 14 | ||||
-rw-r--r-- | TAO/tao/InterceptorC.i | 135 | ||||
-rw-r--r-- | TAO/tao/InterceptorS.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/InterceptorS.h | 12 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/ORB.h | 8 | ||||
-rw-r--r-- | TAO/tao/ORB.i | 4 | ||||
-rw-r--r-- | TAO/tao/orbconf.h | 5 |
13 files changed, 165 insertions, 95 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp index 853a8c0df96..71dca956f46 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp @@ -750,7 +750,7 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation << ");\n"; // fish out the interceptor from the ORB - *os << "\n#if defined (TAO_HAS_INTERCEPTOR)" << be_nl + *os << "\n#if defined (TAO_HAS_INTERCEPTORS)" << be_nl << "TAO_ClientRequestInterceptor_Adapter" << be_idt_nl << "_tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));" << be_uidt_nl; if (this->gen_check_exception (bt) == -1) @@ -762,10 +762,24 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation -1); } - *os << "PortableInterceptor::Cookies _tao_cookies;\n" << be_nl - << "ACE_TRY" << be_idt_nl + *os << "PortableInterceptor::Cookies _tao_cookies;" << be_nl + << "CORBA::NVList_var _tao_interceptor_args;" << be_nl + << "istub->orb_core ()->orb ()->create_list " + << "(0, _tao_interceptor_args.inout (), ACE_TRY_ENV);\n"; + if (this->gen_check_exception (bt) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_operation_cs::" + "gen_marshal_and_invoke - " + "codegen for checking exception failed\n"), + -1); + + } + + os->indent (); + *os << "ACE_TRY" << be_idt_nl << "{\n" - << "#endif /* ACE_HAS_INTERCEPTOR */\n"; + << "#endif /* TAO_HAS_INTERCEPTORS */\n"; *os << be_nl << "for (;;)" << be_nl @@ -796,7 +810,7 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation *os << "1"; } *os << ", this, " << this->compute_operation_name (node) - << ", _tao_call.service_info (), " + << ", _tao_call.service_info (), _tao_interceptor_args.inout (), " << "_tao_cookies, ACE_TRY_ENV));\n"; if (this->gen_check_interceptor_exception (bt) == -1) { @@ -1028,7 +1042,7 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation *os << "1"; } *os << ", this, " << this->compute_operation_name (node) - << ", _tao_call.service_info (), " + << ", _tao_call.service_info (), _tao_interceptor_args.inout (), " << "_tao_cookies, ACE_TRY_ENV));\n"; if (this->gen_check_interceptor_exception (bt) == -1) { @@ -1045,7 +1059,7 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation << be_uidt_nl << "}\n"; // Generate exception occurred interceptor code - *os << "#if defined (TAO_HAS_INTERCEPTOR)" << be_nl + *os << "#if defined (TAO_HAS_INTERCEPTORS)" << be_nl << be_uidt_nl << "}" << be_uidt_nl << "ACE_CATCHANY" << be_idt_nl << "{" << be_idt_nl @@ -1074,7 +1088,7 @@ be_compiled_visitor_operation_cs::gen_marshal_and_invoke (be_operation -1); } - *os << "#endif /* TAO_HAS_INTERCEPTOR */\n"; + *os << "#endif /* TAO_HAS_INTERCEPTORS */\n"; return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index 28324fa0e66..51a5c2dcbb5 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -181,11 +181,14 @@ be_visitor_operation_ss::visit_operation (be_operation *node) } // Fish out the interceptor and do preinvoke - *os << "#if defined (TAO_HAS_INTERCEPTOR)" << be_nl + *os << "#if defined (TAO_HAS_INTERCEPTORS)" << be_nl << "TAO_ServerRequestInterceptor_Adapter" << be_idt_nl << "_tao_vfr (_tao_server_request.orb ()->_get_server_interceptor (ACE_TRY_ENV));" << be_uidt_nl << "ACE_CHECK;" << be_nl - << "PortableInterceptor::Cookies _tao_cookies;\n" << be_nl + << "PortableInterceptor::Cookies _tao_cookies;" << be_nl + << "CORBA::NVList_var _tao_interceptor_args;" << be_nl + << "_tao_server_request.orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);\n" + << be_nl << "ACE_CHECK;\n" << be_nl << "ACE_TRY" << be_idt_nl << "{" << be_idt_nl << "_tao_vfr.preinvoke (_tao_server_request.request_id (), "; @@ -194,7 +197,7 @@ be_visitor_operation_ss::visit_operation (be_operation *node) else *os << "1"; *os << ", 0, " << this->compute_operation_name (node) - << ", _tao_server_request.service_info (), " + << ", _tao_server_request.service_info (), _tao_interceptor_args.inout (), " << "_tao_cookies, ACE_TRY_ENV);" << be_nl << "TAO_INTERCEPTOR_CHECK;\n"; if (node->flags () == AST_Operation::OP_oneway @@ -204,7 +207,7 @@ be_visitor_operation_ss::visit_operation (be_operation *node) << "ACE_UNUSED_ARG (_tao_server_request);\n"; } - *os << "#endif /* TAO_HAS_INTERCEPTOR */\n\n"; + *os << "#endif /* TAO_HAS_INTERCEPTORS */\n\n"; // do pre upcall processing if any ctx = *this->ctx_; @@ -253,14 +256,14 @@ be_visitor_operation_ss::visit_operation (be_operation *node) << "TAO_INTERCEPTOR_CHECK;\n\n"; // do postinvoke, and check for exception. - *os << "#if defined (TAO_HAS_INTERCEPTOR)" << be_nl + *os << "#if defined (TAO_HAS_INTERCEPTORS)" << be_nl << "_tao_vfr.postinvoke (_tao_server_request.request_id (), "; if (node->flags () == AST_Operation::OP_oneway) *os << "0"; else *os << "1"; *os << ", 0, " << this->compute_operation_name (node) - << ", _tao_server_request.service_info (), " + << ", _tao_server_request.service_info (), _tao_interceptor_args.inout (), " << "_tao_cookies, ACE_TRY_ENV);" << be_nl << "TAO_INTERCEPTOR_CHECK;" << be_uidt_nl << "}" << be_uidt_nl @@ -278,7 +281,7 @@ be_visitor_operation_ss::visit_operation (be_operation *node) << "}" << be_uidt_nl << "ACE_ENDTRY;" << be_nl << "ACE_CHECK;\n" - << "#endif /* TAO_HAS_INTERCEPTOR */\n\n"; + << "#endif /* TAO_HAS_INTERCEPTORS */\n\n"; // do any post processing for the arguments ctx = *this->ctx_; diff --git a/TAO/tao/Interceptor.cpp b/TAO/tao/Interceptor.cpp index d29c131e2c2..aa22b9582ec 100644 --- a/TAO/tao/Interceptor.cpp +++ b/TAO/tao/Interceptor.cpp @@ -19,12 +19,14 @@ // return CORBA::string_dup ("TAO default"); // } +#if defined (TAO_HAS_INTERCEPTORS) void POA_PortableInterceptor:: ServerRequestInterceptor::preinvoke (CORBA::ULong, CORBA::Boolean, CORBA::Object_ptr, const char *, IOP::ServiceContextList &, + CORBA::NVList_ptr &, PortableInterceptor::Cookies &, CORBA::Environment &) { @@ -37,6 +39,7 @@ ServerRequestInterceptor::postinvoke (CORBA::ULong, CORBA::Object_ptr, const char *, IOP::ServiceContextList&, + CORBA::NVList_ptr &, PortableInterceptor::Cookies&, CORBA::Environment &) { @@ -62,6 +65,7 @@ ClientRequestInterceptor::preinvoke (CORBA::ULong, CORBA::Object_ptr, const char *, IOP::ServiceContextList &, + CORBA::NVList_ptr &, PortableInterceptor::Cookies &, CORBA::Environment &) { @@ -74,6 +78,7 @@ ClientRequestInterceptor::postinvoke (CORBA::ULong, CORBA::Object_ptr, const char *, IOP::ServiceContextList&, + CORBA::NVList_ptr &, PortableInterceptor::Cookies&, CORBA::Environment &) { @@ -92,3 +97,4 @@ ClientRequestInterceptor::exception_occurred (CORBA::ULong, { // No-op. } +#endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Interceptor.pidl b/TAO/tao/Interceptor.pidl index 7bab9307a22..eb939496f5a 100644 --- a/TAO/tao/Interceptor.pidl +++ b/TAO/tao/Interceptor.pidl @@ -46,7 +46,7 @@ module PortableInterceptor in CORBA::Object objref, in string operation_name, inout IOP::ServiceContextList sc, - // inout NVList arguments, + inout NVList arguments, inout Cookies ck); // Interception pointer before invoking the servant method. // Currently, we don't pass NVList into the interceptor because @@ -59,7 +59,7 @@ module PortableInterceptor in CORBA::Object objref, in string operation_name, inout IOP::ServiceContextList sc, - // inout NVList arguments, + inout NVList arguments, inout Cookies ck); // Interception pointer after invoking the servant method. // Currently, we don't pass NVList into the interceptor because @@ -84,7 +84,7 @@ module PortableInterceptor in CORBA::Object objref, in string operation_name, inout IOP::ServiceContextList sc, - // inout NVList arguments, + inout NVList arguments, inout Cookies ck); // Before remote invocation. // Currently, we don't pass NVList into the interceptor because @@ -97,7 +97,7 @@ module PortableInterceptor in CORBA::Object objref, in string operation_name, inout IOP::ServiceContextList sc, - // inout NVList arguments, + inout NVList arguments, inout Cookies ck); // After returned from remote invocation. // Currently, we don't pass NVList into the interceptor because diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp index a3cea87c0a8..023f44e0632 100644 --- a/TAO/tao/InterceptorC.cpp +++ b/TAO/tao/InterceptorC.cpp @@ -7,14 +7,13 @@ // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html -#include "tao/InterceptorC.h" - #include "tao/InterceptorS.h" #if !defined (__ACE_INLINE__) #include "tao/InterceptorC.i" #endif /* !defined INLINE */ +#if defined (TAO_HAS_INTERCEPTORS) PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV @@ -692,3 +691,5 @@ template class TAO_Object_Manager<PortableInterceptor::ClientRequestInterceptor, # pragma instantiate TAO_Object_Field_T<PortableInterceptor::ClientRequestInterceptor,PortableInterceptor::ClientRequestInterceptor_var> # pragma instantiate TAO_Object_Manager<PortableInterceptor::ClientRequestInterceptor,PortableInterceptor::ClientRequestInterceptor_var> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +#endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/InterceptorC.h b/TAO/tao/InterceptorC.h index 358fed696b1..2ec95dc515e 100644 --- a/TAO/tao/InterceptorC.h +++ b/TAO/tao/InterceptorC.h @@ -10,14 +10,13 @@ #ifndef _TAO_IDL_INTERCEPTORC_H_ #define _TAO_IDL_INTERCEPTORC_H_ -#define TAO_HAS_INTERCEPTOR - #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "IOPC.h" -#include "Any.h" +#include "tao/orbconf.h" +#include "tao/IOPC.h" +#include "tao/Any.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -33,6 +32,7 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ +#if defined (TAO_HAS_INTERCEPTORS) TAO_NAMESPACE PortableInterceptor { @@ -507,6 +507,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -518,6 +519,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -652,6 +654,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -663,6 +666,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -722,6 +726,8 @@ CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor:: void TAO_Export operator<<= (CORBA::Any &, PortableInterceptor::ClientRequestInterceptor_ptr); CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor::ClientRequestInterceptor *&); +#endif /* TAO_HAS_INTERCEPTORS */ + #ifndef __ACE_INLINE__ diff --git a/TAO/tao/InterceptorC.i b/TAO/tao/InterceptorC.i index 442be50ac52..70c548b1ad1 100644 --- a/TAO/tao/InterceptorC.i +++ b/TAO/tao/InterceptorC.i @@ -7,6 +7,8 @@ // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html +#if defined (TAO_HAS_INTERCEPTORS) + ACE_INLINE PortableInterceptor::Cookie::Cookie (void) // default constructor {} @@ -38,7 +40,7 @@ PortableInterceptor::Cookie_var::Cookie_var (PortableInterceptor::Cookie_ptr p) : ptr_ (p) {} -ACE_INLINE PortableInterceptor::Cookie_ptr +ACE_INLINE PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie_var::ptr (void) const { return this->ptr_; @@ -74,19 +76,19 @@ PortableInterceptor::Cookie_var::operator= (const PortableInterceptor::Cookie_va return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Cookie_var::operator const PortableInterceptor::Cookie_ptr &() const // cast { return this->ptr_; } -ACE_INLINE -PortableInterceptor::Cookie_var::operator PortableInterceptor::Cookie_ptr &() // cast +ACE_INLINE +PortableInterceptor::Cookie_var::operator PortableInterceptor::Cookie_ptr &() // cast { return this->ptr_; } -ACE_INLINE PortableInterceptor::Cookie_ptr +ACE_INLINE PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie_var::operator-> (void) const { return this->ptr_; @@ -112,7 +114,7 @@ PortableInterceptor::Cookie_var::out (void) return this->ptr_; } -ACE_INLINE PortableInterceptor::Cookie_ptr +ACE_INLINE PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie_var::_retn (void) { // yield ownership of managed obj reference @@ -173,7 +175,7 @@ PortableInterceptor::Cookie_out::operator= (PortableInterceptor::Cookie_ptr p) return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Cookie_out::operator PortableInterceptor::Cookie_ptr &() // cast { return this->ptr_; @@ -185,7 +187,7 @@ PortableInterceptor::Cookie_out::ptr (void) // ptr return this->ptr_; } -ACE_INLINE PortableInterceptor::Cookie_ptr +ACE_INLINE PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie_out::operator-> (void) { return this->ptr_; @@ -196,7 +198,7 @@ PortableInterceptor::Cookie_out::operator-> (void) #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - + #if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLEINTERCEPTOR_COOKIES_CI_) #define __TAO_UNBOUNDED_OBJECT_SEQUENCE_PORTABLEINTERCEPTOR_COOKIES_CI_ @@ -204,34 +206,34 @@ PortableInterceptor::Cookie_out::operator-> (void) PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::allocbuf (CORBA::ULong nelems) { PortableInterceptor::Cookie **buf = 0; - + ACE_NEW_RETURN (buf, PortableInterceptor::Cookie*[nelems], 0); - + for (CORBA::ULong i = 0; i < nelems; i++) buf[i] = PortableInterceptor::Cookie::_nil (); - + return buf; } - - ACE_INLINE void + + ACE_INLINE void PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::freebuf (PortableInterceptor::Cookie **buffer) { if (buffer == 0) return; delete[] buffer; } - + ACE_INLINE PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies (void) { } - + ACE_INLINE PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies (CORBA::ULong maximum) : TAO_Unbounded_Base_Sequence (maximum, PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::allocbuf (maximum)) { } - + ACE_INLINE PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies (CORBA::ULong maximum, CORBA::ULong length, @@ -240,30 +242,30 @@ PortableInterceptor::Cookie_out::operator-> (void) : TAO_Unbounded_Base_Sequence (maximum, length, value, release) { } - + ACE_INLINE PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies(const PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies &rhs) : TAO_Unbounded_Base_Sequence (rhs) { PortableInterceptor::Cookie **tmp1 = PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::allocbuf (this->maximum_); PortableInterceptor::Cookie ** const tmp2 = ACE_reinterpret_cast (PortableInterceptor::Cookie ** ACE_CAST_CONST, rhs.buffer_); - + for (CORBA::ULong i = 0; i < rhs.length_; ++i) tmp1[i] = PortableInterceptor::Cookie::_duplicate (tmp2[i]); - + this->buffer_ = tmp1; } - + ACE_INLINE PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies & PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::operator= (const PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies &rhs) { if (this == &rhs) return *this; - + if (this->release_) { PortableInterceptor::Cookie **tmp = ACE_reinterpret_cast (PortableInterceptor::Cookie **, this->buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) { CORBA::release (tmp[i]); @@ -277,18 +279,18 @@ PortableInterceptor::Cookie_out::operator-> (void) } else this->buffer_ = PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::allocbuf (rhs.maximum_); - + TAO_Unbounded_Base_Sequence::operator= (rhs); - + PortableInterceptor::Cookie **tmp1 = ACE_reinterpret_cast (PortableInterceptor::Cookie **, this->buffer_); PortableInterceptor::Cookie ** const tmp2 = ACE_reinterpret_cast (PortableInterceptor::Cookie ** ACE_CAST_CONST, rhs.buffer_); - + for (CORBA::ULong i = 0; i < rhs.length_; ++i) tmp1[i] = PortableInterceptor::Cookie::_duplicate (tmp2[i]); - + return *this; } - + ACE_INLINE TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var> PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::operator[] (CORBA::ULong index) const // read-write accessor @@ -297,7 +299,7 @@ PortableInterceptor::Cookie_out::operator-> (void) PortableInterceptor::Cookie ** const tmp = ACE_reinterpret_cast (PortableInterceptor::Cookie ** ACE_CAST_CONST, this->buffer_); return TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var> (tmp + index, this->release_); } - + ACE_INLINE PortableInterceptor::Cookie* * PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::get_buffer (CORBA::Boolean orphan) { @@ -330,18 +332,18 @@ PortableInterceptor::Cookie_out::operator-> (void) } return result; } - + ACE_INLINE const PortableInterceptor::Cookie* * PortableInterceptor::_TAO_Unbounded_Object_Sequence_PortableInterceptor_Cookies::get_buffer (void) const { return ACE_reinterpret_cast(const PortableInterceptor::Cookie ** ACE_CAST_CONST, this->buffer_); } - - + + #endif /* end #if !defined */ -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_PORTABLEINTERCEPTOR_COOKIES_CI_) #define _PORTABLEINTERCEPTOR_COOKIES_CI_ @@ -406,25 +408,25 @@ PortableInterceptor::Cookies_var::operator-> (void) return this->ptr_; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Cookies_var::operator const PortableInterceptor::Cookies &() const // cast { return *this->ptr_; } -ACE_INLINE -PortableInterceptor::Cookies_var::operator PortableInterceptor::Cookies &() // cast +ACE_INLINE +PortableInterceptor::Cookies_var::operator PortableInterceptor::Cookies &() // cast { return *this->ptr_; } -ACE_INLINE -PortableInterceptor::Cookies_var::operator PortableInterceptor::Cookies &() const// cast +ACE_INLINE +PortableInterceptor::Cookies_var::operator PortableInterceptor::Cookies &() const// cast { return *this->ptr_; } -ACE_INLINE TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var> +ACE_INLINE TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var> PortableInterceptor::Cookies_var::operator[] (CORBA::ULong index) { return this->ptr_->operator[] (index); @@ -442,7 +444,7 @@ PortableInterceptor::Cookies_var::inout (void) return *this->ptr_; } -// mapping for variable size +// mapping for variable size ACE_INLINE PortableInterceptor::Cookies *& PortableInterceptor::Cookies_var::out (void) { @@ -503,7 +505,7 @@ PortableInterceptor::Cookies_out::operator= (PortableInterceptor::Cookies *p) return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Cookies_out::operator PortableInterceptor::Cookies *&() // cast { return this->ptr_; @@ -521,7 +523,7 @@ PortableInterceptor::Cookies_out::operator-> (void) return this->ptr_; } -ACE_INLINE TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var> +ACE_INLINE TAO_Object_Manager<PortableInterceptor::Cookie,PortableInterceptor::Cookie_var> PortableInterceptor::Cookies_out::operator[] (CORBA::ULong index) { return this->ptr_->operator[] (index); @@ -561,7 +563,7 @@ PortableInterceptor::Interceptor_var::Interceptor_var (PortableInterceptor::Inte : ptr_ (p) {} -ACE_INLINE PortableInterceptor::Interceptor_ptr +ACE_INLINE PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor_var::ptr (void) const { return this->ptr_; @@ -597,19 +599,19 @@ PortableInterceptor::Interceptor_var::operator= (const PortableInterceptor::Inte return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Interceptor_var::operator const PortableInterceptor::Interceptor_ptr &() const // cast { return this->ptr_; } -ACE_INLINE -PortableInterceptor::Interceptor_var::operator PortableInterceptor::Interceptor_ptr &() // cast +ACE_INLINE +PortableInterceptor::Interceptor_var::operator PortableInterceptor::Interceptor_ptr &() // cast { return this->ptr_; } -ACE_INLINE PortableInterceptor::Interceptor_ptr +ACE_INLINE PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor_var::operator-> (void) const { return this->ptr_; @@ -635,7 +637,7 @@ PortableInterceptor::Interceptor_var::out (void) return this->ptr_; } -ACE_INLINE PortableInterceptor::Interceptor_ptr +ACE_INLINE PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor_var::_retn (void) { // yield ownership of managed obj reference @@ -696,7 +698,7 @@ PortableInterceptor::Interceptor_out::operator= (PortableInterceptor::Intercepto return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Interceptor_out::operator PortableInterceptor::Interceptor_ptr &() // cast { return this->ptr_; @@ -708,7 +710,7 @@ PortableInterceptor::Interceptor_out::ptr (void) // ptr return this->ptr_; } -ACE_INLINE PortableInterceptor::Interceptor_ptr +ACE_INLINE PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor_out::operator-> (void) { return this->ptr_; @@ -748,7 +750,7 @@ PortableInterceptor::ServerRequestInterceptor_var::ServerRequestInterceptor_var : ptr_ (p) {} -ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr PortableInterceptor::ServerRequestInterceptor_var::ptr (void) const { return this->ptr_; @@ -784,19 +786,19 @@ PortableInterceptor::ServerRequestInterceptor_var::operator= (const PortableInte return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_var::operator const PortableInterceptor::ServerRequestInterceptor_ptr &() const // cast { return this->ptr_; } -ACE_INLINE -PortableInterceptor::ServerRequestInterceptor_var::operator PortableInterceptor::ServerRequestInterceptor_ptr &() // cast +ACE_INLINE +PortableInterceptor::ServerRequestInterceptor_var::operator PortableInterceptor::ServerRequestInterceptor_ptr &() // cast { return this->ptr_; } -ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr PortableInterceptor::ServerRequestInterceptor_var::operator-> (void) const { return this->ptr_; @@ -822,7 +824,7 @@ PortableInterceptor::ServerRequestInterceptor_var::out (void) return this->ptr_; } -ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr PortableInterceptor::ServerRequestInterceptor_var::_retn (void) { // yield ownership of managed obj reference @@ -883,7 +885,7 @@ PortableInterceptor::ServerRequestInterceptor_out::operator= (PortableIntercepto return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_out::operator PortableInterceptor::ServerRequestInterceptor_ptr &() // cast { return this->ptr_; @@ -895,7 +897,7 @@ PortableInterceptor::ServerRequestInterceptor_out::ptr (void) // ptr return this->ptr_; } -ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr PortableInterceptor::ServerRequestInterceptor_out::operator-> (void) { return this->ptr_; @@ -935,7 +937,7 @@ PortableInterceptor::ClientRequestInterceptor_var::ClientRequestInterceptor_var : ptr_ (p) {} -ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr PortableInterceptor::ClientRequestInterceptor_var::ptr (void) const { return this->ptr_; @@ -971,19 +973,19 @@ PortableInterceptor::ClientRequestInterceptor_var::operator= (const PortableInte return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_var::operator const PortableInterceptor::ClientRequestInterceptor_ptr &() const // cast { return this->ptr_; } -ACE_INLINE -PortableInterceptor::ClientRequestInterceptor_var::operator PortableInterceptor::ClientRequestInterceptor_ptr &() // cast +ACE_INLINE +PortableInterceptor::ClientRequestInterceptor_var::operator PortableInterceptor::ClientRequestInterceptor_ptr &() // cast { return this->ptr_; } -ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr PortableInterceptor::ClientRequestInterceptor_var::operator-> (void) const { return this->ptr_; @@ -1009,7 +1011,7 @@ PortableInterceptor::ClientRequestInterceptor_var::out (void) return this->ptr_; } -ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr PortableInterceptor::ClientRequestInterceptor_var::_retn (void) { // yield ownership of managed obj reference @@ -1070,7 +1072,7 @@ PortableInterceptor::ClientRequestInterceptor_out::operator= (PortableIntercepto return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_out::operator PortableInterceptor::ClientRequestInterceptor_ptr &() // cast { return this->ptr_; @@ -1082,7 +1084,7 @@ PortableInterceptor::ClientRequestInterceptor_out::ptr (void) // ptr return this->ptr_; } -ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr PortableInterceptor::ClientRequestInterceptor_out::operator-> (void) { return this->ptr_; @@ -1091,3 +1093,4 @@ PortableInterceptor::ClientRequestInterceptor_out::operator-> (void) #endif /* end #if !defined */ +#endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/InterceptorS.cpp b/TAO/tao/InterceptorS.cpp index ef10cab4daa..8e41fec4137 100644 --- a/TAO/tao/InterceptorS.cpp +++ b/TAO/tao/InterceptorS.cpp @@ -9,6 +9,8 @@ #include "tao/InterceptorS.h" +#if defined (TAO_HAS_INTERCEPTORS) + // skeleton constructor POA_PortableInterceptor::Cookie::Cookie (void) { @@ -289,6 +291,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::p CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) @@ -299,6 +302,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::p objref, operation_name, sc, + arguments, ck, ACE_TRY_ENV ); @@ -311,6 +315,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::p CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) @@ -321,6 +326,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::p objref, operation_name, sc, + arguments, ck, ACE_TRY_ENV ); @@ -441,6 +447,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::p CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) @@ -451,6 +458,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::p objref, operation_name, sc, + arguments, ck, ACE_TRY_ENV ); @@ -463,6 +471,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::p CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) @@ -473,6 +482,7 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::p objref, operation_name, sc, + arguments, ck, ACE_TRY_ENV ); @@ -498,3 +508,5 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::e ); } + +#endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/InterceptorS.h b/TAO/tao/InterceptorS.h index c2615818501..e59d7db8941 100644 --- a/TAO/tao/InterceptorS.h +++ b/TAO/tao/InterceptorS.h @@ -21,6 +21,8 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ +#if defined (TAO_HAS_INTERCEPTORS) + TAO_NAMESPACE POA_PortableInterceptor { class Cookie; @@ -201,6 +203,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -212,6 +215,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -259,6 +263,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -270,6 +275,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -328,6 +334,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -339,6 +346,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -386,6 +394,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -397,6 +406,7 @@ TAO_NAMESPACE POA_PortableInterceptor CORBA::Object_ptr objref, const char * operation_name, IOP::ServiceContextList & sc, + CORBA::NVList_ptr & arguments, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -424,6 +434,8 @@ TAO_NAMESPACE POA_PortableInterceptor } TAO_NAMESPACE_CLOSE +#endif /* TAO_HAS_INTERCEPTORS */ + #if defined(_MSC_VER) #pragma warning(default:4250) #endif /* _MSC_VER */ diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index e4afb26d1d8..4612c95c5d3 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -153,11 +153,13 @@ CORBA_ORB::CORBA_ORB (TAO_ORB_Core *orb_core) trading_service_ (CORBA_Object::_nil ()), implrepo_service_ (CORBA_Object::_nil ()), orb_core_ (orb_core), -# ifdef TAO_HAS_VALUETYPE +# if defined (TAO_HAS_VALUETYPE) valuetype_factory_map_ (0), # endif /* TAO_HAS_VALUETYPE */ +# if defined (TAO_HAS_INTERCEPTORS) client_interceptor_ (), server_interceptor_ (), +# endif /* TAO_HAS_INTERCEPTORS */ use_omg_ior_format_ (1) { } diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h index b9e758ed776..5667fd5f5c3 100644 --- a/TAO/tao/ORB.h +++ b/TAO/tao/ORB.h @@ -32,7 +32,7 @@ #include "tao/IORManipulation.h" // Interceptor definitions. -#include "tao/InterceptorC.h" +#include "tao/Interceptor.h" // IRIX needs this for the throw specs #include "tao/PolicyC.h" @@ -382,6 +382,7 @@ public: CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); #endif /* TAO_HAS_VALUETYPE */ +#if defined (TAO_HAS_INTERCEPTORS) // = Interceptor registration routine // Currently, we only support one interceptor per-ORB. @@ -404,6 +405,7 @@ public: PortableInterceptor::ServerRequestInterceptor_ptr _get_server_interceptor (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); // accessor to the server-side interceptor. You get a duplicate. +#endif /* TAO_HAS_INTERCEPTORS */ #if !defined (TAO_HAS_MINIMUM_CORBA) @@ -765,14 +767,16 @@ private: TAO_ORB_Core *orb_core_; // The ORB_Core that created us.... -#ifdef TAO_HAS_VALUETYPE +#if defined (TAO_HAS_VALUETYPE) TAO_ValueFactory_Map *valuetype_factory_map_; // If non-0 then this is the Factory for OBV unmarshaling #endif /* TAO_HAS_VALUETYPE */ +#if defined (TAO_HAS_INTERCEPTORS) PortableInterceptor::ClientRequestInterceptor_var client_interceptor_; PortableInterceptor::ServerRequestInterceptor_var server_interceptor_; // Interceptor registries. +#endif /* TAO_HAS_INTERCEPTORS */ TAO_IOR_LookupTable lookup_table_; // Table of ObjectID->IOR mappings. diff --git a/TAO/tao/ORB.i b/TAO/tao/ORB.i index fd23f45a8ec..0304bf97567 100644 --- a/TAO/tao/ORB.i +++ b/TAO/tao/ORB.i @@ -315,6 +315,7 @@ CORBA_ORB::orb_core (void) const return this->orb_core_; } +#if defined (TAO_HAS_INTERCEPTORS) ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr CORBA_ORB::_register_client_interceptor (PortableInterceptor::ClientRequestInterceptor_ptr ci, @@ -357,11 +358,12 @@ CORBA_ORB::_get_client_interceptor (CORBA_Environment &) } ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr -CORBA_ORB::_get_server_interceptor (CORBA_Environment &) +CORBA_ORB::_get_server_interceptor (CORBA_Environment &ACE_TRY_ENV) { return PortableInterceptor::ServerRequestInterceptor::_duplicate (this->server_interceptor_); } +#endif /* TAO_HAS_INTERCEPTORS */ // ************************************************************ // These are in CORBA namespace diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index bd7b191844c..ffb5cada259 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -373,6 +373,11 @@ and should not be set by the user. Please use TAO_HAS_REMOTE_POLICIES instead. # if !defined (TAO_HAS_REMOTE_POLICIES) # define TAO_HAS_REMOTE_POLICIES 0 # endif /* TAO_HAS_REMOTE_POLICIES */ +#else + +// Interceptors is supported by default if we are not building +// for MinimumCORBA. +#define TAO_HAS_INTERCEPTORS #endif /* TAO_HAS_MINIMUM_CORBA */ |