diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-27 04:29:58 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-27 04:29:58 +0000 |
commit | 4428fe0f8fba2f70b0855a95643df6e6bd373e94 (patch) | |
tree | 1c47a29c0cc131da49809c9f4171f36fb5d876eb | |
parent | 901b29dd7ff29dbacf15db9329e21f9e18aba1a8 (diff) | |
download | ATCD-4428fe0f8fba2f70b0855a95643df6e6bd373e94.tar.gz |
Ready to add hook.
-rw-r--r-- | TAO/ChangeLog-99c | 18 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ci.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/CORBA.pidl | 23 | ||||
-rw-r--r-- | TAO/tao/Interceptor.pidl | 86 | ||||
-rw-r--r-- | TAO/tao/InterceptorC.cpp | 115 | ||||
-rw-r--r-- | TAO/tao/InterceptorC.h | 202 | ||||
-rw-r--r-- | TAO/tao/InterceptorC.i | 320 | ||||
-rw-r--r-- | TAO/tao/InterceptorS.cpp | 244 | ||||
-rw-r--r-- | TAO/tao/InterceptorS.h | 222 |
12 files changed, 324 insertions, 927 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index d859db052a1..21aaceba8be 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,4 +1,13 @@ -Thu Aug 26 01:49:49 1999 Nanbor Wang <nanbor@cs.wustl.edu> +Thu Aug 26 20:26:02 1999 Nanbor Wang <nanbor@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_sequence/cdr_op_ci.cpp: + * TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp: Supressed + generation of cdr operation when generating locality constraint + object. + + * TAO_IDL/be/be_visitor_operation/operation.cpp (gen_throw_spec): + Don't generate THROW_SPEC for LC objects for now. * tao/Invocation.h: * tao/Invocation.i: @@ -14,7 +23,8 @@ Thu Aug 26 01:49:49 1999 Nanbor Wang <nanbor@cs.wustl.edu> * tao/InterceptorC.cpp: Added include "Any.h". - * tao/InterceptorC.h: Removed include "corba.h" and added include "IOPC.h". + * tao/InterceptorC.h: Removed include "corba.h" and added include + "IOPC.h". * tao/InterceptorS.h: Added include "Servant_Base.h". @@ -36,7 +46,7 @@ Wed Aug 25 23:38:32 1999 Nanbor Wang <nanbor@cs.wustl.edu> * Using the -Gl flag of tao_idl: For protable interceptor, I use the following lines to process the Interceptor.pidl file: - tao_idl -Gl -Wb,export_macro=TAO_Export Interceptor.pidl + tao_idl -Gl -Ge 1 -Wb,export_macro=TAO_Export Interceptor.pidl The following manually tweakings on the generated files are necessary: @@ -72,7 +82,7 @@ Wed Aug 25 23:38:32 1999 Nanbor Wang <nanbor@cs.wustl.edu> * tao/InterceptorC.{h,i,cpp}: * tao/InterceptorS.{h,cpp}: Added new interceptor IDL generated files. -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Wed Aug 25 10:16:11 1999 David L. Levine <levine@cs.wustl.edu> diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index b1331e90d75..3f3f39d57d2 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -84,10 +84,13 @@ be_visitor_operation::has_param_type (be_operation *node, } //Method to generate the throw specs for exceptions that are thrown by the -//operation +//operation int be_visitor_operation::gen_throw_spec (be_operation *node) { + // Don't generate throw spec for LC objref for now. + if (idl_global->gen_locality_constraint ()) + return 0; TAO_OutStream *os = this->ctx_->stream (); // grab the out stream @@ -95,7 +98,7 @@ be_visitor_operation::gen_throw_spec (be_operation *node) << be_idt_nl << "CORBA::SystemException"; if (node->exceptions ()) { - + // initialize an iterator to iterate thru the exception list UTL_ExceptlistActiveIterator *ei; ACE_NEW_RETURN (ei, @@ -115,7 +118,7 @@ be_visitor_operation::gen_throw_spec (be_operation *node) "bad exception node\n"), -1); } - + *os << "," << be_nl; // allocator method *os << excp->name (); @@ -146,4 +149,3 @@ be_visitor_operation::gen_environment_var () return null_env_decl; } } - diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp index 01bdb3627b0..68dad324231 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp @@ -44,7 +44,9 @@ be_visitor_sequence_cdr_op_ch::~be_visitor_sequence_cdr_op_ch (void) int be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) { - if (node->cli_hdr_cdr_op_gen () || node->imported ()) + if (node->cli_hdr_cdr_op_gen () || + node->imported () || + idl_global->gen_locality_constraint ()) return 0; TAO_OutStream *os = this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ci.cpp index a1348b531d0..c89dc3f38ca 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ci.cpp @@ -46,7 +46,9 @@ be_visitor_sequence_cdr_op_ci::~be_visitor_sequence_cdr_op_ci (void) int be_visitor_sequence_cdr_op_ci::visit_sequence (be_sequence *node) { - if (node->cli_inline_cdr_op_gen () || node->imported ()) + if (node->cli_inline_cdr_op_gen () || + node->imported () || + idl_global->gen_locality_constraint ()) return 0; TAO_OutStream *os = this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp index fe056a1c96a..e4057834737 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp @@ -45,6 +45,9 @@ be_visitor_sequence_cdr_op_cs::~be_visitor_sequence_cdr_op_cs (void) int be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node) { + if (idl_global->gen_locality_constraint ()) + return 0; + if (this->ctx_->alias ()) { // we are here because the base type of the sequence node is diff --git a/TAO/tao/CORBA.pidl b/TAO/tao/CORBA.pidl index 67fe538d5c9..642ba418552 100644 --- a/TAO/tao/CORBA.pidl +++ b/TAO/tao/CORBA.pidl @@ -11,12 +11,12 @@ module CORBA typedef string Identifier; typedef unsigned long Flags; - interface NamedValue - { - readonly attribute Identifier name; - readonly attribute any value; - readonly attribute Flags flags; - }; + struct NamedValue + { + Identifier name; + any value; + Flags flags; + }; enum exception_type { @@ -28,6 +28,7 @@ module CORBA interface Object; interface Request; interface NVList; + interface Exception; typedef sequence<Request> RequestSeq; @@ -44,11 +45,11 @@ module CORBA sequence <octet> service_detail; }; - struct ServiceInformation - { - sequence <ServiceOption> service_options; - sequence <ServiceDetail> service_details; - }; + struct ServiceInformation + { + sequence <ServiceOption> service_options; + sequence <ServiceDetail> service_details; + }; }; diff --git a/TAO/tao/Interceptor.pidl b/TAO/tao/Interceptor.pidl index 8e8e6478706..d5d79c21e3c 100644 --- a/TAO/tao/Interceptor.pidl +++ b/TAO/tao/Interceptor.pidl @@ -29,32 +29,6 @@ module PortableInterceptor typedef sequence<Cookie> Cookies; // Collections of Cookie's become Cookies'es. - interface RequestInfo - { - unsigned long get_request_id (); - /* - boolean set_request_id (in unsigned long rid); - // This method is disabled for now because I don't know - // the purpose of changing request id and how does it - // fit into TAO's current structure. - */ - - boolean response_expected (); - // This method will eventually changed to support - // AMI. - - CORBA::Object get_object (); - // Get the object reference the targeting object. - - string get_operation (); - // We don't allow changing operation for now. - // Otherwise, we'll change - - CORBA::NVList get_arguments (); - boolean set_arguments (in CORBA::NVList args); - // Accessing and changing the operation arguments/return value. - }; - interface Interceptor { // Base interface for Interceptors. @@ -65,18 +39,38 @@ module PortableInterceptor { // Server side request interceptor definition. - void preinvoke (inout RequestInfo ri, + void preinvoke (in unsigned long request_id, + in boolean response_expected, + in CORBA::Object objref, + in string operation_name, inout IOP::ServiceContextList sc, + // inout NVList arguments, inout Cookies ck); // Interception pointer before invoking the servant method. - - void postinvoke (inout RequestInfo ri, + // Currently, we don't pass NVList into the interceptor because + // I haven't figured out how to best optimize this stuff. + // In the future, NVList will contain all in and inout arguments + // of the operation. + + void postinvoke (in unsigned long request_id, + in boolean response_expected, + in CORBA::Object objref, + in string operation_name, inout IOP::ServiceContextList sc, + // inout NVList arguments, inout Cookies ck); // Interception pointer after invoking the servant method. - - void exception_occurred (inout RequestInfo ri, + // Currently, we don't pass NVList into the interceptor because + // I haven't figured out how to best optimize this stuff. + // In the future, NVList will contain all out, inout arguments + // and the return value of the operation. + + void exception_occurred (in unsigned long request_id, + in boolean response_expected, + in CORBA::Object objref, + in string operation_name, inout IOP::ServiceContextList sc, + inout CORBA::Exception exc, inout Cookies ck); // Exception interception point. }; @@ -85,18 +79,38 @@ module PortableInterceptor { // Client side interceptor. - void preinvoke (inout RequestInfo ri, + void preinvoke (in unsigned long request_id, + in boolean response_expected, + in CORBA::Object objref, + in string operation_name, inout IOP::ServiceContextList sc, + // inout NVList arguments, inout Cookies ck); // Before remote invocation. - - void postinvoke (inout RequestInfo ri, + // Currently, we don't pass NVList into the interceptor because + // I haven't figured out how to best optimize this stuff. + // In the future, NVList will contain all in and inout arguments + // of the operation. + + void postinvoke (in unsigned long request_id, + in boolean response_expected, + in CORBA::Object objref, + in string operation_name, inout IOP::ServiceContextList sc, + // inout NVList arguments, inout Cookies ck); // After returned from remote invocation. - - void exception_occurred (inout RequestInfo ri, + // Currently, we don't pass NVList into the interceptor because + // I haven't figured out how to best optimize this stuff. + // In the future, NVList will contain all out, inout arguments + // and the return value of the operation. + + void exception_occurred (in unsigned long request_id, + in boolean response_expected, + in CORBA::Object objref, + in string operation_name, inout IOP::ServiceContextList sc, + inout CORBA::Exception exc, inout Cookies ck); // Exception occurred. }; diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp index 930071ba71f..e339d283e7f 100644 --- a/TAO/tao/InterceptorC.cpp +++ b/TAO/tao/InterceptorC.cpp @@ -219,63 +219,6 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (PortableInterceptor) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Cookies, &_tc_TAO_tc_PortableInterceptor_Cookies) TAO_NAMESPACE_END -PortableInterceptor::RequestInfo_ptr PortableInterceptor::RequestInfo::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if (CORBA::is_nil (obj)) - return PortableInterceptor::RequestInfo::_nil (); - CORBA::Boolean is_a = obj->_is_a ("IDL:TAO/PortableInterceptor/RequestInfo:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (PortableInterceptor::RequestInfo::_nil ()); - if (is_a == 0) - return PortableInterceptor::RequestInfo::_nil (); - void *servant = 0; - if (!obj->_is_collocated () - || !obj->_servant () - || (servant = obj->_servant()->_downcast ("IDL:TAO/PortableInterceptor/RequestInfo:1.0")) == 0 - ) - ACE_THROW_RETURN (CORBA::MARSHAL (), PortableInterceptor::RequestInfo::_nil ()); - return new POA_PortableInterceptor::_tao_direct_collocated_RequestInfo( - ACE_reinterpret_cast (POA_PortableInterceptor::RequestInfo_ptr, servant), - 0 - ); -} - -PortableInterceptor::RequestInfo_ptr -PortableInterceptor::RequestInfo::_duplicate (PortableInterceptor::RequestInfo_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->_incr_refcnt (); - return obj; -} - -CORBA::Boolean PortableInterceptor::RequestInfo::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:TAO/PortableInterceptor/RequestInfo:1.0")) || - (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0"))) - return 1; // success using local knowledge - else - return this->CORBA_Object::_is_a (value, ACE_TRY_ENV); -} - -const char* PortableInterceptor::RequestInfo::_interface_repository_id (void) const -{ - return "IDL:TAO/PortableInterceptor/RequestInfo:1.0"; -} - -static const CORBA::Long _oc_PortableInterceptor_RequestInfo[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 44, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x54414f2f), ACE_NTOHL (0x506f7274), ACE_NTOHL (0x61626c65), ACE_NTOHL (0x496e7465), ACE_NTOHL (0x72636570), ACE_NTOHL (0x746f722f), ACE_NTOHL (0x52657175), ACE_NTOHL (0x65737449), ACE_NTOHL (0x6e666f3a), ACE_NTOHL (0x312e3000), // repository ID = IDL:TAO/PortableInterceptor/RequestInfo:1.0 - 12, ACE_NTOHL (0x52657175), ACE_NTOHL (0x65737449), ACE_NTOHL (0x6e666f00), // name = RequestInfo -}; -static CORBA::TypeCode _tc_TAO_tc_PortableInterceptor_RequestInfo (CORBA::tk_objref, sizeof (_oc_PortableInterceptor_RequestInfo), (char *) &_oc_PortableInterceptor_RequestInfo, 0, sizeof (PortableInterceptor::RequestInfo)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (PortableInterceptor) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_RequestInfo, &_tc_TAO_tc_PortableInterceptor_RequestInfo) -TAO_NAMESPACE_END PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV @@ -576,64 +519,6 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo return 0; } -void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::RequestInfo_ptr _tao_elem) -{ - CORBA::Object_ptr *_tao_obj_ptr = 0; - ACE_TRY_NEW_ENV - { - ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr); - *_tao_obj_ptr = PortableInterceptor::RequestInfo::_duplicate (_tao_elem); - _tao_any.replace (PortableInterceptor::_tc_RequestInfo, _tao_obj_ptr, 1, ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; -} - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::RequestInfo_ptr &_tao_elem) -{ - CORBA::Object_ptr *tmp = 0; - ACE_TRY_NEW_ENV - { - _tao_elem = PortableInterceptor::RequestInfo::_nil (); - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equal (PortableInterceptor::_tc_RequestInfo, ACE_TRY_ENV)) return 0; // not equal - ACE_TRY_CHECK; - TAO_InputCDR stream (_tao_any._tao_get_cdr ()); - CORBA::Object_var _tao_obj_var; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); - if (stream.decode (PortableInterceptor::_tc_RequestInfo, &_tao_obj_var.out (), 0, ACE_TRY_ENV) - == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - _tao_elem = PortableInterceptor::RequestInfo::_narrow (_tao_obj_var.in (), ACE_TRY_ENV); - ACE_TRY_CHECK; - *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object - ((CORBA::Any *)&_tao_any)->replace (PortableInterceptor::_tc_RequestInfo, tmp, 1, ACE_TRY_ENV); - ACE_TRY_CHECK; - return 1; - } - // failure - } - ACE_CATCHANY - { - delete tmp; - return 0; - } - ACE_ENDTRY; - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - template class TAO_Object_Field_T<PortableInterceptor::RequestInfo,PortableInterceptor::RequestInfo_var>; -template class TAO_Object_Manager<PortableInterceptor::RequestInfo,PortableInterceptor::RequestInfo_var>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate TAO_Object_Field_T<PortableInterceptor::RequestInfo,PortableInterceptor::RequestInfo_var> -# pragma instantiate TAO_Object_Manager<PortableInterceptor::RequestInfo,PortableInterceptor::RequestInfo_var> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Interceptor_ptr _tao_elem) { CORBA::Object_ptr *_tao_obj_ptr = 0; diff --git a/TAO/tao/InterceptorC.h b/TAO/tao/InterceptorC.h index c14fd041727..c5e015604e6 100644 --- a/TAO/tao/InterceptorC.h +++ b/TAO/tao/InterceptorC.h @@ -292,161 +292,6 @@ class TAO_Export Cookie : public virtual ACE_CORBA_1 (Object) TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_Cookies; -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO___PTR_CH_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO___PTR_CH_ - - class RequestInfo; - typedef RequestInfo *RequestInfo_ptr; - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO___VAR_CH_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO___VAR_CH_ - - class TAO_Export RequestInfo_var - { - public: - RequestInfo_var (void); // default constructor - RequestInfo_var (RequestInfo_ptr); - RequestInfo_var (const RequestInfo_var &); // copy constructor - ~RequestInfo_var (void); // destructor - - RequestInfo_var &operator= (RequestInfo_ptr); - RequestInfo_var &operator= (const RequestInfo_var &); - RequestInfo_ptr operator-> (void) const; - - operator const RequestInfo_ptr &() const; - operator RequestInfo_ptr &(); - // in, inout, out, _retn - RequestInfo_ptr in (void) const; - RequestInfo_ptr &inout (void); - RequestInfo_ptr &out (void); - RequestInfo_ptr _retn (void); - RequestInfo_ptr ptr (void) const; - - private: - RequestInfo_ptr ptr_; - }; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO___OUT_CH_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO___OUT_CH_ - - class TAO_Export RequestInfo_out - { - public: - RequestInfo_out (RequestInfo_ptr &); - RequestInfo_out (RequestInfo_var &); - RequestInfo_out (const RequestInfo_out &); - RequestInfo_out &operator= (const RequestInfo_out &); - RequestInfo_out &operator= (const RequestInfo_var &); - RequestInfo_out &operator= (RequestInfo_ptr); - operator RequestInfo_ptr &(); - RequestInfo_ptr &ptr (void); - RequestInfo_ptr operator-> (void); - - private: - RequestInfo_ptr &ptr_; - }; - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO_CH_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO_CH_ - -class TAO_Export RequestInfo : public virtual ACE_CORBA_1 (Object) - { - public: - #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef RequestInfo_ptr _ptr_type; - typedef RequestInfo_var _var_type; - #endif /* ! __GNUC__ || g++ >= 2.8 */ - - // the static operations - static RequestInfo_ptr _duplicate (RequestInfo_ptr obj); - static RequestInfo_ptr _narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env = - TAO_default_environment () - ); - static RequestInfo_ptr _nil (void) - { - return (PortableInterceptor::RequestInfo_ptr)0; - } - - virtual CORBA::ULong get_request_id ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean response_expected ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual IOP::ServiceContextList * get_service_contexts ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean set_service_contexts ( - const IOP::ServiceContextList & sc, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Object_ptr get_object ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual char * get_operation ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::NVList_ptr get_arguments ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean set_arguments ( - CORBA::NVList_ptr args, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean _is_a ( - const CORBA::Char *type_id, - CORBA::Environment &env = - TAO_default_environment () - ); - virtual const char* _interface_repository_id (void) const; - - protected: - RequestInfo (void); - RequestInfo (TAO_Stub *objref, - TAO_ServantBase *_tao_servant = 0, - CORBA::Boolean _tao_collocated = 0 - ); - virtual ~RequestInfo (void); - private: - RequestInfo (const RequestInfo &); - void operator= (const RequestInfo &); - }; - - -#endif /* end #if !defined */ - - TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_RequestInfo; - - #if !defined (_PORTABLEINTERCEPTOR_INTERCEPTOR___PTR_CH_) #define _PORTABLEINTERCEPTOR_INTERCEPTOR___PTR_CH_ @@ -654,21 +499,34 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor } virtual void preinvoke ( - RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void postinvoke ( - RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void exception_occurred ( - RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -788,21 +646,34 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor } virtual void preinvoke ( - RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void postinvoke ( - RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void exception_occurred ( - RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -842,9 +713,6 @@ CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor:: void TAO_Export operator<<= (CORBA::Any &, const PortableInterceptor::Cookies &); // copying version void TAO_Export operator<<= (CORBA::Any &, PortableInterceptor::Cookies*); // noncopying version CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor::Cookies *&); -// Any operators for interface PortableInterceptor::RequestInfo -void TAO_Export operator<<= (CORBA::Any &, PortableInterceptor::RequestInfo_ptr); -CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor::RequestInfo *&); // Any operators for interface PortableInterceptor::Interceptor void TAO_Export operator<<= (CORBA::Any &, PortableInterceptor::Interceptor_ptr); CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor::Interceptor *&); @@ -855,6 +723,12 @@ 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 *&); +#ifndef __ACE_INLINE__ + + +#endif /* __ACE_INLINE__ */ + + #if defined (__ACE_INLINE__) #include "tao/InterceptorC.i" #endif /* defined INLINE */ diff --git a/TAO/tao/InterceptorC.i b/TAO/tao/InterceptorC.i index a1ad11bde72..442be50ac52 100644 --- a/TAO/tao/InterceptorC.i +++ b/TAO/tao/InterceptorC.i @@ -38,7 +38,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 +74,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 +112,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 +173,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 +185,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 +196,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 +204,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 +240,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 +277,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 +297,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 +330,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 +406,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 +442,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 +503,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 +521,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); @@ -531,193 +531,6 @@ PortableInterceptor::Cookies_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ ACE_INLINE -PortableInterceptor::RequestInfo::RequestInfo (void) // default constructor -{} - -ACE_INLINE -PortableInterceptor::RequestInfo::RequestInfo (TAO_Stub *objref, TAO_ServantBase *_tao_servant, CORBA::Boolean _tao_collocated) // constructor - : CORBA_Object (objref, _tao_servant, _tao_collocated) -{} - -ACE_INLINE -PortableInterceptor::RequestInfo::~RequestInfo (void) // destructor -{} - - -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO___VAR_CI_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO___VAR_CI_ - -// ************************************************************* -// Inline operations for class PortableInterceptor::RequestInfo_var -// ************************************************************* - -ACE_INLINE -PortableInterceptor::RequestInfo_var::RequestInfo_var (void) // default constructor - : ptr_ (PortableInterceptor::RequestInfo::_nil ()) -{} - -ACE_INLINE -PortableInterceptor::RequestInfo_var::RequestInfo_var (PortableInterceptor::RequestInfo_ptr p) - : ptr_ (p) -{} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr -PortableInterceptor::RequestInfo_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -PortableInterceptor::RequestInfo_var::RequestInfo_var (const PortableInterceptor::RequestInfo_var &p) // copy constructor - : ptr_ (PortableInterceptor::RequestInfo::_duplicate (p.ptr ())) -{} - -ACE_INLINE -PortableInterceptor::RequestInfo_var::~RequestInfo_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE PortableInterceptor::RequestInfo_var & -PortableInterceptor::RequestInfo_var::operator= (PortableInterceptor::RequestInfo_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE PortableInterceptor::RequestInfo_var & -PortableInterceptor::RequestInfo_var::operator= (const PortableInterceptor::RequestInfo_var &p) -{ - if (this != &p) - { - CORBA::release (this->ptr_); - this->ptr_ = PortableInterceptor::RequestInfo::_duplicate (p.ptr ()); - } - return *this; -} - -ACE_INLINE -PortableInterceptor::RequestInfo_var::operator const PortableInterceptor::RequestInfo_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -PortableInterceptor::RequestInfo_var::operator PortableInterceptor::RequestInfo_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr -PortableInterceptor::RequestInfo_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr -PortableInterceptor::RequestInfo_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr & -PortableInterceptor::RequestInfo_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr & -PortableInterceptor::RequestInfo_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = PortableInterceptor::RequestInfo::_nil (); - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr -PortableInterceptor::RequestInfo_var::_retn (void) -{ - // yield ownership of managed obj reference - PortableInterceptor::RequestInfo_ptr val = this->ptr_; - this->ptr_ = PortableInterceptor::RequestInfo::_nil (); - return val; -} - - -#endif /* end #if !defined */ - - -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO___OUT_CI_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO___OUT_CI_ - -// ************************************************************* -// Inline operations for class PortableInterceptor::RequestInfo_out -// ************************************************************* - -ACE_INLINE -PortableInterceptor::RequestInfo_out::RequestInfo_out (PortableInterceptor::RequestInfo_ptr &p) - : ptr_ (p) -{ - this->ptr_ = PortableInterceptor::RequestInfo::_nil (); -} - -ACE_INLINE -PortableInterceptor::RequestInfo_out::RequestInfo_out (PortableInterceptor::RequestInfo_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - CORBA::release (this->ptr_); - this->ptr_ = PortableInterceptor::RequestInfo::_nil (); -} - -ACE_INLINE -PortableInterceptor::RequestInfo_out::RequestInfo_out (const PortableInterceptor::RequestInfo_out &p) // copy constructor - : ptr_ (ACE_const_cast (PortableInterceptor::RequestInfo_out&,p).ptr_) -{} - -ACE_INLINE PortableInterceptor::RequestInfo_out & -PortableInterceptor::RequestInfo_out::operator= (const PortableInterceptor::RequestInfo_out &p) -{ - this->ptr_ = ACE_const_cast (PortableInterceptor::RequestInfo_out&,p).ptr_; - return *this; -} - -ACE_INLINE PortableInterceptor::RequestInfo_out & -PortableInterceptor::RequestInfo_out::operator= (const PortableInterceptor::RequestInfo_var &p) -{ - this->ptr_ = PortableInterceptor::RequestInfo::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE PortableInterceptor::RequestInfo_out & -PortableInterceptor::RequestInfo_out::operator= (PortableInterceptor::RequestInfo_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -PortableInterceptor::RequestInfo_out::operator PortableInterceptor::RequestInfo_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr & -PortableInterceptor::RequestInfo_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE PortableInterceptor::RequestInfo_ptr -PortableInterceptor::RequestInfo_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - -ACE_INLINE PortableInterceptor::Interceptor::Interceptor (void) // default constructor {} @@ -748,7 +561,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_; @@ -784,19 +597,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_; @@ -822,7 +635,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 @@ -883,7 +696,7 @@ PortableInterceptor::Interceptor_out::operator= (PortableInterceptor::Intercepto return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::Interceptor_out::operator PortableInterceptor::Interceptor_ptr &() // cast { return this->ptr_; @@ -895,7 +708,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_; @@ -935,7 +748,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_; @@ -971,19 +784,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_; @@ -1009,7 +822,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 @@ -1070,7 +883,7 @@ PortableInterceptor::ServerRequestInterceptor_out::operator= (PortableIntercepto return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_out::operator PortableInterceptor::ServerRequestInterceptor_ptr &() // cast { return this->ptr_; @@ -1082,7 +895,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_; @@ -1122,7 +935,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_; @@ -1158,19 +971,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_; @@ -1196,7 +1009,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 @@ -1257,7 +1070,7 @@ PortableInterceptor::ClientRequestInterceptor_out::operator= (PortableIntercepto return *this; } -ACE_INLINE +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_out::operator PortableInterceptor::ClientRequestInterceptor_ptr &() // cast { return this->ptr_; @@ -1269,7 +1082,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_; @@ -1277,3 +1090,4 @@ PortableInterceptor::ClientRequestInterceptor_out::operator-> (void) #endif /* end #if !defined */ + diff --git a/TAO/tao/InterceptorS.cpp b/TAO/tao/InterceptorS.cpp index e6634c3b9af..784d85a22eb 100644 --- a/TAO/tao/InterceptorS.cpp +++ b/TAO/tao/InterceptorS.cpp @@ -104,174 +104,6 @@ char * POA_PortableInterceptor::_tao_direct_collocated_Cookie::myname ( // skeleton constructor -POA_PortableInterceptor::RequestInfo::RequestInfo (void) -{ - -} - -// skeleton destructor -POA_PortableInterceptor::RequestInfo::~RequestInfo (void) -{ -} - -CORBA::Boolean POA_PortableInterceptor::RequestInfo::_is_a ( - const char* value, - CORBA::Environment &ACE_TRY_ENV - ) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:TAO/PortableInterceptor/RequestInfo:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (ACE_TRY_ENV)))) - return 1; - else - return 0; -} - -void* POA_PortableInterceptor::RequestInfo::_downcast ( - const char* logical_type_id - ) -{ -if (ACE_OS::strcmp (logical_type_id, "IDL:TAO/PortableInterceptor/RequestInfo:1.0") == 0) - return ACE_static_cast (POA_PortableInterceptor::RequestInfo_ptr, this); - if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) - return ACE_static_cast(PortableServer::Servant, this); - return 0; -} - -const char* POA_PortableInterceptor::RequestInfo::_interface_repository_id (void) const -{ - return "IDL:TAO/PortableInterceptor/RequestInfo:1.0"; -} - -PortableInterceptor::RequestInfo* -POA_PortableInterceptor::RequestInfo::_this (CORBA_Environment &ACE_TRY_ENV) -{ - TAO_Stub *stub = this->_create_stub (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - return new POA_PortableInterceptor::_tao_direct_collocated_RequestInfo (this, stub); -} - -POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::_tao_direct_collocated_RequestInfo ( - POA_PortableInterceptor::RequestInfo_ptr servant, - TAO_Stub *stub - ) - : ACE_NESTED_CLASS (PortableInterceptor,RequestInfo) (), - CORBA_Object (stub, servant, 1), - servant_ (servant) -{ -} - -CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::_is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV - ) - -{ - return this->servant_->_is_a (logical_type_id, ACE_TRY_ENV); -} - - -POA_PortableInterceptor::RequestInfo_ptr POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::_get_servant (void) const -{ - return this->servant_; -} - -CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::_non_existent( - CORBA_Environment &ACE_TRY_ENV - ) - -{ - return this->servant_->_non_existent (ACE_TRY_ENV); -} - - -CORBA::ULong POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::get_request_id ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->get_request_id ( - ACE_TRY_ENV - ); - -} - -CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::response_expected ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->response_expected ( - ACE_TRY_ENV - ); - -} - -IOP::ServiceContextList * POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::get_service_contexts ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->get_service_contexts ( - ACE_TRY_ENV - ); - -} - -CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::set_service_contexts ( - const IOP::ServiceContextList & sc, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->set_service_contexts ( - sc, - ACE_TRY_ENV - ); - -} - -CORBA::Object_ptr POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::get_object ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->get_object ( - ACE_TRY_ENV - ); - -} - -char * POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::get_operation ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->get_operation ( - ACE_TRY_ENV - ); - -} - -CORBA::NVList_ptr POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::get_arguments ( - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->get_arguments ( - ACE_TRY_ENV - ); - -} - -CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_RequestInfo::set_arguments ( - CORBA::NVList_ptr args, - CORBA::Environment &ACE_TRY_ENV - ) -{ - return this->servant_->set_arguments ( - args, - ACE_TRY_ENV - ); - -} - - - -// skeleton constructor POA_PortableInterceptor::Interceptor::Interceptor (void) { @@ -452,13 +284,21 @@ CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInte void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::preinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) { this->servant_->preinvoke ( - ri, + request_id, + response_expected, + objref, + operation_name, + sc, ck, ACE_TRY_ENV ); @@ -466,13 +306,21 @@ void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::p } void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::postinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) { this->servant_->postinvoke ( - ri, + request_id, + response_expected, + objref, + operation_name, + sc, ck, ACE_TRY_ENV ); @@ -480,13 +328,23 @@ void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::p } void POA_PortableInterceptor::_tao_direct_collocated_ServerRequestInterceptor::exception_occurred ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) { this->servant_->exception_occurred ( - ri, + request_id, + response_expected, + objref, + operation_name, + sc, + exc, ck, ACE_TRY_ENV ); @@ -582,13 +440,21 @@ CORBA::Boolean POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInte void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::preinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) { this->servant_->preinvoke ( - ri, + request_id, + response_expected, + objref, + operation_name, + sc, ck, ACE_TRY_ENV ); @@ -596,13 +462,21 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::p } void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::postinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) { this->servant_->postinvoke ( - ri, + request_id, + response_expected, + objref, + operation_name, + sc, ck, ACE_TRY_ENV ); @@ -610,13 +484,23 @@ void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::p } void POA_PortableInterceptor::_tao_direct_collocated_ClientRequestInterceptor::exception_occurred ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV ) { this->servant_->exception_occurred ( - ri, + request_id, + response_expected, + objref, + operation_name, + sc, + exc, ck, ACE_TRY_ENV ); diff --git a/TAO/tao/InterceptorS.h b/TAO/tao/InterceptorS.h index f120765487d..fa3b4875339 100644 --- a/TAO/tao/InterceptorS.h +++ b/TAO/tao/InterceptorS.h @@ -95,152 +95,6 @@ TAO_NAMESPACE POA_PortableInterceptor #endif /* end #if !defined */ - class RequestInfo; - typedef RequestInfo *RequestInfo_ptr; - class TAO_Export RequestInfo : public virtual TAO_Local_ServantBase - { - protected: - RequestInfo (void); - - public: - virtual ~RequestInfo (void); - - - virtual CORBA::Boolean _is_a ( - const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual void* _downcast ( - const char* logical_type_id - ); - - PortableInterceptor::RequestInfo *_this ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual const char* _interface_repository_id (void) const; - - virtual CORBA::ULong get_request_id ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean response_expected ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual IOP::ServiceContextList * get_service_contexts ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean set_service_contexts ( - const IOP::ServiceContextList & sc, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Object_ptr get_object ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual char * get_operation ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::NVList_ptr get_arguments ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - virtual CORBA::Boolean set_arguments ( - CORBA::NVList_ptr args, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ) = 0; - - - }; - - -#if !defined (_PORTABLEINTERCEPTOR_REQUESTINFO___DIRECT_COLLOCATED_SH_) -#define _PORTABLEINTERCEPTOR_REQUESTINFO___DIRECT_COLLOCATED_SH_ - - class TAO_Export _tao_direct_collocated_RequestInfo : public virtual PortableInterceptor::RequestInfo - { - public: - _tao_direct_collocated_RequestInfo ( - RequestInfo_ptr servant, - TAO_Stub *stub - ); - virtual CORBA::Boolean _is_a( - const CORBA::Char *logical_type_id, - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - RequestInfo_ptr _get_servant (void) const; - - virtual CORBA::Boolean _non_existent( - CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () - ); - - virtual CORBA::ULong get_request_id ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::Boolean response_expected ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual IOP::ServiceContextList * get_service_contexts ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::Boolean set_service_contexts ( - const IOP::ServiceContextList & sc, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::Object_ptr get_object ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual char * get_operation ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::NVList_ptr get_arguments ( - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - virtual CORBA::Boolean set_arguments ( - CORBA::NVList_ptr args, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment () - ); - - - private: - RequestInfo_ptr servant_; - }; - - -#endif /* end #if !defined */ - - class Interceptor; typedef Interceptor *Interceptor_ptr; class TAO_Export Interceptor : public virtual TAO_Local_ServantBase @@ -342,21 +196,34 @@ TAO_NAMESPACE POA_PortableInterceptor virtual const char* _interface_repository_id (void) const; virtual void preinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void postinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void exception_occurred ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -389,21 +256,34 @@ TAO_NAMESPACE POA_PortableInterceptor ); virtual void preinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void postinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void exception_occurred ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -447,21 +327,34 @@ TAO_NAMESPACE POA_PortableInterceptor virtual const char* _interface_repository_id (void) const; virtual void preinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void postinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) = 0; virtual void exception_occurred ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -494,21 +387,34 @@ TAO_NAMESPACE POA_PortableInterceptor ); virtual void preinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void postinvoke ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void exception_occurred ( - PortableInterceptor::RequestInfo_ptr & ri, + CORBA::ULong request_id, + CORBA::Boolean response_expected, + CORBA::Object_ptr objref, + const char * operation_name, + IOP::ServiceContextList & sc, + CORBA::Exception_ptr & exc, PortableInterceptor::Cookies & ck, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () |