diff options
Diffstat (limited to 'TAO/tao/IORInterceptor')
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor.pidl | 32 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptorC.cpp | 258 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptorC.h | 308 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptorC.i | 28 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp | 162 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h | 25 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_List.cpp | 35 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_List.h | 12 |
9 files changed, 548 insertions, 314 deletions
diff --git a/TAO/tao/IORInterceptor/IORInterceptor.pidl b/TAO/tao/IORInterceptor/IORInterceptor.pidl index 1013e104599..2c466dd0e49 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor.pidl +++ b/TAO/tao/IORInterceptor/IORInterceptor.pidl @@ -10,7 +10,7 @@ * * The following is from orbos/99-12-02 Portable Interceptors spec, * the full IDL is downloadable from orbos/99-12-02. This file contains - * interfaces from PortableInterceptor.idl that depend on + * interfaces from PortableInterceptor.idl that depend on * ObjectReferenceFactory and ObjectReferenceTemplate, which inherit * directly or indirectly from CORBA::ValueBase. This separate file * has been created to remove the dependency from the rest of module @@ -27,6 +27,9 @@ * -Wb,pre_include="ace/pre.h" * -Wb,post_include="ace/post.h" * IORInterceptor.pidl + * + * Patches for changes to the generated code are available in the + * `diffs' directory. */ // File: IORInterceptor.idl @@ -34,21 +37,40 @@ #define _IOR_INTERCEPTOR_IDL_ #include "tao/PortableInterceptor.pidl" -#include "tao/IORInterceptor/IORInfo.pidl" #include "tao/ObjRefTemplate/ObjectReferenceTemplate.pidl" -module PortableInterceptor +module PortableInterceptor { typeprefix PortableInterceptor "omg.org"; - local interface IORInterceptor : Interceptor + local interface IORInfo + { + CORBA::Policy get_effective_policy (in CORBA::PolicyType type); + + void add_ior_component (in IOP::TaggedComponent a_component); + + void add_ior_component_to_profile ( + in IOP::TaggedComponent a_component, + in IOP::ProfileId profile_id + ); + + readonly attribute AdapterManagerId manager_id; + + readonly attribute AdapterState state; + + readonly attribute ObjectReferenceTemplate adapter_template; + + attribute ObjectReferenceFactory current_factory; + }; + + local interface IORInterceptor : Interceptor { void establish_components (in IORInfo info); void components_established (in IORInfo info); void adapter_manager_state_changed ( - in AdapterManagerId id, + in AdapterManagerId id, in AdapterState state ); void adapter_state_changed ( diff --git a/TAO/tao/IORInterceptor/IORInterceptorC.cpp b/TAO/tao/IORInterceptor/IORInterceptorC.cpp index be51db89f4b..c839e820eac 100644 --- a/TAO/tao/IORInterceptor/IORInterceptorC.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptorC.cpp @@ -26,11 +26,12 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:303 +// be\be_codegen.cpp:323 #include "IORInterceptorC.h" #include "tao/CDR.h" +#include "tao/Object_Argument_T.h" #include "ace/OS_NS_string.h" #if defined (__BORLANDC__) @@ -38,26 +39,180 @@ #endif /* __BORLANDC__ */ #if !defined (__ACE_INLINE__) -#include "IORInterceptorC.inl" +#include "IORInterceptorC.i" #endif /* !defined INLINE */ // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_arg_traits.cpp:64 +// be\be_visitor_arg_traits.cpp:64 // Arg traits specializations. namespace TAO { + +#if !defined (_PORTABLEINTERCEPTOR_OBJECTREFERENCEFACTORY__ARG_TRAITS_CS_) +#define _PORTABLEINTERCEPTOR_OBJECTREFERENCEFACTORY__ARG_TRAITS_CS_ + + ACE_TEMPLATE_SPECIALIZATION + class TAO_IORInterceptor_Export Arg_Traits<PortableInterceptor::ObjectReferenceFactory> + : public + Object_Arg_Traits_T< + PortableInterceptor::ObjectReferenceFactory *, + PortableInterceptor::ObjectReferenceFactory_var, + PortableInterceptor::ObjectReferenceFactory_out, + TAO::Value_Traits<PortableInterceptor::ObjectReferenceFactory> + > + { + }; + +#endif /* end #if !defined */ } // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:60 +// be\be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for PortableInterceptor::IORInfo. + +ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION +PortableInterceptor::IORInfo_ptr +TAO::Objref_Traits<PortableInterceptor::IORInfo>::tao_duplicate ( + PortableInterceptor::IORInfo_ptr p + ) +{ + return PortableInterceptor::IORInfo::_duplicate (p); +} + +ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION +void +TAO::Objref_Traits<PortableInterceptor::IORInfo>::tao_release ( + PortableInterceptor::IORInfo_ptr p + ) +{ + CORBA::release (p); +} + +ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION +PortableInterceptor::IORInfo_ptr +TAO::Objref_Traits<PortableInterceptor::IORInfo>::tao_nil (void) +{ + return PortableInterceptor::IORInfo::_nil (); +} + +ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION +CORBA::Boolean +TAO::Objref_Traits<PortableInterceptor::IORInfo>::tao_marshal ( + PortableInterceptor::IORInfo_ptr p, + TAO_OutputCDR & cdr + ) +{ + return CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*PortableInterceptor__TAO_IORInfo_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ) = 0; + +PortableInterceptor::IORInfo::IORInfo (void) +{} + +PortableInterceptor::IORInfo::~IORInfo (void) +{} + +PortableInterceptor::IORInfo_ptr +PortableInterceptor::IORInfo::_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + if (CORBA::is_nil (_tao_objref)) + { + return IORInfo::_nil (); + } + + IORInfo_ptr proxy = + dynamic_cast<IORInfo_ptr> (_tao_objref); + + return IORInfo::_duplicate (proxy); +} + +PortableInterceptor::IORInfo_ptr +PortableInterceptor::IORInfo::_unchecked_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + if (CORBA::is_nil (_tao_objref)) + { + return IORInfo::_nil (); + } + + IORInfo_ptr proxy = + dynamic_cast<IORInfo_ptr> (_tao_objref); + + return IORInfo::_duplicate (proxy); +} + +PortableInterceptor::IORInfo_ptr +PortableInterceptor::IORInfo::_duplicate (IORInfo_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +CORBA::Boolean +PortableInterceptor::IORInfo::_is_a ( + const char *value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + if ( + !ACE_OS::strcmp ( + (char *)value, + "IDL:omg.org/PortableInterceptor/IORInfo:1.0" + ) || + !ACE_OS::strcmp ( + (char *)value, + "IDL:omg.org/CORBA/LocalObject:1.0" + ) || + !ACE_OS::strcmp ( + (char *)value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return 1; // success using local knowledge + } + else + { + return 0; + } +} + +const char* PortableInterceptor::IORInfo::_interface_repository_id (void) const +{ + return "IDL:omg.org/PortableInterceptor/IORInfo:1.0"; +} + +CORBA::Boolean +PortableInterceptor::IORInfo::marshal (TAO_OutputCDR &) +{ + return 0; +} + +// TAO_IDL - Generated from +// be\be_visitor_interface/interface_cs.cpp:60 // Traits specializations for PortableInterceptor::IORInterceptor. ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION PortableInterceptor::IORInterceptor_ptr -TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::duplicate ( +TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::tao_duplicate ( PortableInterceptor::IORInterceptor_ptr p ) { @@ -66,7 +221,7 @@ TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::duplicate ( ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION void -TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::release ( +TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::tao_release ( PortableInterceptor::IORInterceptor_ptr p ) { @@ -75,14 +230,14 @@ TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::release ( ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION PortableInterceptor::IORInterceptor_ptr -TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::nil (void) +TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::tao_nil (void) { return PortableInterceptor::IORInterceptor::_nil (); } ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION CORBA::Boolean -TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::marshal ( +TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::tao_marshal ( PortableInterceptor::IORInterceptor_ptr p, TAO_OutputCDR & cdr ) @@ -91,7 +246,7 @@ TAO::Objref_Traits<PortableInterceptor::IORInterceptor>::marshal ( } // Function pointer for collocation factory initialization. -TAO::Collocation_Proxy_Broker * +TAO::Collocation_Proxy_Broker * (*PortableInterceptor__TAO_IORInterceptor_Proxy_Broker_Factory_function_pointer) ( CORBA::Object_ptr obj ) = 0; @@ -112,10 +267,10 @@ PortableInterceptor::IORInterceptor::_narrow ( { return IORInterceptor::_nil (); } - + IORInterceptor_ptr proxy = dynamic_cast<IORInterceptor_ptr> (_tao_objref); - + return IORInterceptor::_duplicate (proxy); } @@ -129,10 +284,10 @@ PortableInterceptor::IORInterceptor::_unchecked_narrow ( { return IORInterceptor::_nil (); } - + IORInterceptor_ptr proxy = dynamic_cast<IORInterceptor_ptr> (_tao_objref); - + return IORInterceptor::_duplicate (proxy); } @@ -143,7 +298,7 @@ PortableInterceptor::IORInterceptor::_duplicate (IORInterceptor_ptr obj) { obj->_add_ref (); } - + return obj; } @@ -192,7 +347,7 @@ PortableInterceptor::IORInterceptor::marshal (TAO_OutputCDR &) } // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_root/root.cpp:1628 +// be\be_visitor_root/root.cpp:1628 #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) @@ -205,12 +360,45 @@ PortableInterceptor::IORInterceptor::marshal (TAO_OutputCDR &) TAO_Objref_Var_T< PortableInterceptor::IORInterceptor >; - + template class TAO_Objref_Out_T< PortableInterceptor::IORInterceptor >; +#if !defined (_PORTABLEINTERCEPTOR_OBJECTREFERENCEFACTORY__ARG_TRAITS_TMPLINST_CS_) +#define _PORTABLEINTERCEPTOR_OBJECTREFERENCEFACTORY__ARG_TRAITS_TMPLINST_CS_ + + template class + TAO::Arg_Traits< + PortableInterceptor::ObjectReferenceFactory + >; + + template class + TAO::Object_Arg_Traits_T< + PortableInterceptor::ObjectReferenceFactory *, + PortableInterceptor::ObjectReferenceFactory_var, + PortableInterceptor::ObjectReferenceFactory_out, + TAO::Objref_Traits<PortableInterceptor::ObjectReferenceFactory> + >; + +#endif /* end #if !defined */ + + template class + TAO::Objref_Traits< + PortableInterceptor::IORInfo + >; + + template class + TAO_Objref_Var_T< + PortableInterceptor::IORInfo + >; + + template class + TAO_Objref_Out_T< + PortableInterceptor::IORInfo + >; + #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate \ @@ -222,10 +410,44 @@ PortableInterceptor::IORInterceptor::marshal (TAO_OutputCDR &) TAO_Objref_Var_T< \ PortableInterceptor::IORInterceptor > - + # pragma instantiate \ TAO_Objref_Out_T< \ PortableInterceptor::IORInterceptor > -#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +#if !defined (_PORTABLEINTERCEPTOR_OBJECTREFERENCEFACTORY__ARG_TRAITS_TMPLINST_CS_) +#define _PORTABLEINTERCEPTOR_OBJECTREFERENCEFACTORY__ARG_TRAITS_TMPLINST_CS_ + +# pragma instantiate \ + TAO::Arg_Traits< \ + PortableInterceptor::ObjectReferenceFactory \ + > + +# pragma instantiate \ + TAO::Object_Arg_Traits_T< \ + PortableInterceptor::ObjectReferenceFactory *, \ + PortableInterceptor::ObjectReferenceFactory_var, \ + PortableInterceptor::ObjectReferenceFactory_out, \ + TAO::Objref_Traits<PortableInterceptor::ObjectReferenceFactory> \ + > + +#endif /* end #if !defined */ + +# pragma instantiate \ + TAO::Objref_Traits< \ + PortableInterceptor::IORInfo \ + > + +# pragma instantiate \ + TAO_Objref_Var_T< \ + PortableInterceptor::IORInfo + > + +# pragma instantiate \ + TAO_Objref_Out_T< \ + PortableInterceptor::IORInfo + > + +#endif /* !ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + diff --git a/TAO/tao/IORInterceptor/IORInterceptorC.h b/TAO/tao/IORInterceptor/IORInterceptorC.h index e7e07e8f806..8dce343deac 100644 --- a/TAO/tao/IORInterceptor/IORInterceptorC.h +++ b/TAO/tao/IORInterceptor/IORInterceptorC.h @@ -26,28 +26,25 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:153 +// be\be_codegen.cpp:171 #ifndef _TAO_IDL_ORIG_IORINTERCEPTORC_H_ #define _TAO_IDL_ORIG_IORINTERCEPTORC_H_ #include /**/ "ace/pre.h" - -#include "ace/config-all.h" +#include "tao/ORB.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "iorinterceptor_export.h" -#include "tao/ORB.h" #include "tao/Environment.h" #include "tao/Object.h" #include "tao/Objref_VarOut_T.h" #include "tao/PortableInterceptorC.h" -#include "tao/IORInterceptor/IORInfoC.h" #include "tao/ObjRefTemplate/ObjectReferenceTemplateC.h" #if defined (TAO_EXPORT_MACRO) @@ -73,38 +70,205 @@ #pragma option push -w-rvl -w-rch -w-ccc -w-inl #endif /* __BORLANDC__ */ -// TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_root/root_ch.cpp:63 +// TAO_IDL - Generated from +// be\be_visitor_root/root_ch.cpp:63 namespace TAO { class Collocation_Proxy_Broker; - + template<typename T> class Narrow_Utils; template<typename T> class AbstractBase_Narrow_Utils; } // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_module/module_ch.cpp:48 +// be\be_visitor_module/module_ch.cpp:48 namespace PortableInterceptor { + + // TAO_IDL - Generated from + // be\be_interface.cpp:611 + +#if !defined (_PORTABLEINTERCEPTOR_IORINFO__VAR_OUT_CH_) +#define _PORTABLEINTERCEPTOR_IORINFO__VAR_OUT_CH_ + + class IORInfo; + typedef IORInfo *IORInfo_ptr; + + typedef + TAO_Objref_Var_T< + IORInfo + > + IORInfo_var; + + typedef + TAO_Objref_Out_T< + IORInfo + > + IORInfo_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be\be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_PORTABLEINTERCEPTOR_IORINFO_CH_) +#define _PORTABLEINTERCEPTOR_IORINFO_CH_ + + class TAO_IORInterceptor_Export IORInfo + : public virtual CORBA::Object + { + public: + typedef IORInfo_ptr _ptr_type; + typedef IORInfo_var _var_type; + + // The static operations. + static IORInfo_ptr _duplicate (IORInfo_ptr obj); + + static IORInfo_ptr _narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static IORInfo_ptr _unchecked_narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static IORInfo_ptr _nil (void) + { + return (IORInfo_ptr)0; + } + + + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Policy_ptr get_effective_policy ( + CORBA::PolicyType type + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual void add_ior_component ( + const IOP::TaggedComponent & a_component + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual void add_ior_component_to_profile ( + const IOP::TaggedComponent & a_component, + IOP::ProfileId profile_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual PortableInterceptor::AdapterManagerId manager_id ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual PortableInterceptor::AdapterState state ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual ::PortableInterceptor::ObjectReferenceTemplate * adapter_template ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual ::PortableInterceptor::ObjectReferenceFactory * current_factory ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_operation/operation_ch.cpp:46 + + virtual void current_factory ( + PortableInterceptor::ObjectReferenceFactory * current_factory + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + // TAO_IDL - Generated from + // be\be_visitor_interface/interface_ch.cpp:208 + + virtual CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); + + protected: + // Abstract or local interface only. + IORInfo (void); + + virtual ~IORInfo (void); + + private: + // Private and unimplemented for concrete interfaces. + IORInfo (const IORInfo &); + + void operator= (const IORInfo &); + }; +#endif /* end #if !defined */ + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_interface.cpp:613 + // be\be_interface.cpp:611 #if !defined (_PORTABLEINTERCEPTOR_IORINTERCEPTOR__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_IORINTERCEPTOR__VAR_OUT_CH_ - + class IORInterceptor; typedef IORInterceptor *IORInterceptor_ptr; - + typedef TAO_Objref_Var_T< IORInterceptor > IORInterceptor_var; - + typedef TAO_Objref_Out_T< IORInterceptor @@ -112,119 +276,119 @@ namespace PortableInterceptor IORInterceptor_out; #endif /* end #if !defined */ - + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ch.cpp:54 + // be\be_visitor_interface/interface_ch.cpp:54 #if !defined (_PORTABLEINTERCEPTOR_IORINTERCEPTOR_CH_) #define _PORTABLEINTERCEPTOR_IORINTERCEPTOR_CH_ - + class TAO_IORInterceptor_Export IORInterceptor - : public virtual ::PortableInterceptor::Interceptor + : public virtual PortableInterceptor::Interceptor { public: typedef IORInterceptor_ptr _ptr_type; typedef IORInterceptor_var _var_type; - + // The static operations. static IORInterceptor_ptr _duplicate (IORInterceptor_ptr obj); - + static IORInterceptor_ptr _narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static IORInterceptor_ptr _unchecked_narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static IORInterceptor_ptr _nil (void) { return (IORInterceptor_ptr)0; } - - - + + + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 - + // be\be_visitor_operation/operation_ch.cpp:46 + virtual void establish_components ( - ::PortableInterceptor::IORInfo_ptr info + PortableInterceptor::IORInfo_ptr info ACE_ENV_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; - + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 - + // be\be_visitor_operation/operation_ch.cpp:46 + virtual void components_established ( - ::PortableInterceptor::IORInfo_ptr info + PortableInterceptor::IORInfo_ptr info ACE_ENV_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; - + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 - + // be\be_visitor_operation/operation_ch.cpp:46 + virtual void adapter_manager_state_changed ( - ::PortableInterceptor::AdapterManagerId id, - ::PortableInterceptor::AdapterState state + PortableInterceptor::AdapterManagerId id, + PortableInterceptor::AdapterState state ACE_ENV_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; - + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 - + // be\be_visitor_operation/operation_ch.cpp:46 + virtual void adapter_state_changed ( - const ::PortableInterceptor::ObjectReferenceTemplateSeq & templates, - ::PortableInterceptor::AdapterState state + const PortableInterceptor::ObjectReferenceTemplateSeq & templates, + PortableInterceptor::AdapterState state ACE_ENV_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; - + // TAO_IDL - Generated from - // C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ch.cpp:208 - + // be\be_visitor_interface/interface_ch.cpp:208 + virtual CORBA::Boolean _is_a ( const char *type_id ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + virtual const char* _interface_repository_id (void) const; virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); - + protected: // Abstract or local interface only. IORInterceptor (void); - + virtual ~IORInterceptor (void); - + private: // Private and unimplemented for concrete interfaces. IORInterceptor (const IORInterceptor &); - + void operator= (const IORInterceptor &); }; #endif /* end #if !defined */ // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_module/module_ch.cpp:66 +// be\be_visitor_module/module_ch.cpp:66 } // module PortableInterceptor // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_traits.cpp:59 +// be\be_visitor_traits.cpp:59 // Traits specializations. namespace TAO @@ -232,19 +396,40 @@ namespace TAO #if !defined (_PORTABLEINTERCEPTOR_IORINTERCEPTOR__TRAITS_CH_) #define _PORTABLEINTERCEPTOR_IORINTERCEPTOR__TRAITS_CH_ + + ACE_TEMPLATE_SPECIALIZATION + struct TAO_IORInterceptor_Export Objref_Traits<PortableInterceptor::IORInterceptor> + { + static PortableInterceptor::IORInterceptor_ptr tao_duplicate ( + PortableInterceptor::IORInterceptor_ptr + ); + static void tao_release ( + PortableInterceptor::IORInterceptor_ptr + ); + static PortableInterceptor::IORInterceptor_ptr tao_nil (void); + static CORBA::Boolean tao_marshal ( + PortableInterceptor::IORInterceptor_ptr p, + TAO_OutputCDR & cdr + ); + }; +#endif /* end #if !defined */ + +#if !defined (_PORTABLEINTERCEPTOR_IORINFO__TRAITS_CH_) +#define _PORTABLEINTERCEPTOR_IORINFO__TRAITS_CH_ + ACE_TEMPLATE_SPECIALIZATION - struct TAO_IORInterceptor_Export Objref_Traits< ::PortableInterceptor::IORInterceptor> + struct TAO_IORInterceptor_Export Objref_Traits<PortableInterceptor::IORInfo> { - static ::PortableInterceptor::IORInterceptor_ptr duplicate ( - ::PortableInterceptor::IORInterceptor_ptr + static PortableInterceptor::IORInfo_ptr tao_duplicate ( + PortableInterceptor::IORInfo_ptr ); - static void release ( - ::PortableInterceptor::IORInterceptor_ptr + static void tao_release ( + PortableInterceptor::IORInfo_ptr ); - static ::PortableInterceptor::IORInterceptor_ptr nil (void); - static CORBA::Boolean marshal ( - ::PortableInterceptor::IORInterceptor_ptr p, + static PortableInterceptor::IORInfo_ptr tao_nil (void); + static CORBA::Boolean tao_marshal ( + PortableInterceptor::IORInfo_ptr p, TAO_OutputCDR & cdr ); }; @@ -253,10 +438,10 @@ namespace TAO } // TAO_IDL - Generated from -// C:\ACE\develop\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:958 +// be\be_codegen.cpp:978 #if defined (__ACE_INLINE__) -#include "IORInterceptorC.inl" +#include "IORInterceptorC.i" #endif /* defined INLINE */ #if defined(_MSC_VER) && (_MSC_VER >= 1200) @@ -270,3 +455,4 @@ namespace TAO #include /**/ "ace/post.h" #endif /* ifndef */ + diff --git a/TAO/tao/IORInterceptor/IORInterceptorC.i b/TAO/tao/IORInterceptor/IORInterceptorC.i new file mode 100644 index 00000000000..38aa32569ba --- /dev/null +++ b/TAO/tao/IORInterceptor/IORInterceptorC.i @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp index 39bf2af372e..2fa56bf2766 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp @@ -16,7 +16,7 @@ TAO_IORInterceptor_Adapter * TAO_IORInterceptor_Adapter_Factory_Impl::create ( ) ACE_THROW_SPEC ((CORBA::SystemException)) { - TAO_IORInterceptor_Adapter_Impl * new_iorinterceptor_adapter = 0; + TAO_IORInterceptor_Adapter_Impl * new_iorinterceptor_adapter; ACE_NEW_RETURN (new_iorinterceptor_adapter, TAO_IORInterceptor_Adapter_Impl, 0); diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp index ecd898772e8..727319bb0e7 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp @@ -1,10 +1,7 @@ // $Id$ #include "IORInterceptor_Adapter_Impl.h" -#include "IORInfo.h" #include "tao/debug.h" -#include "tao/ORB_Constants.h" -#include "tao/PortableServer/POA.h" ACE_RCSID (IORInterceptor, IORInterceptor_Adapter_Impl, @@ -80,162 +77,3 @@ TAO_IORInterceptor_Adapter_Impl::interceptor_list (void) { return &this->ior_interceptor_list_; } - -void -TAO_IORInterceptor_Adapter_Impl::establish_components ( - TAO_POA* poa - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - TAO_IORInterceptor_List::TYPE & interceptors = - this->ior_interceptor_list_.interceptors (); - - const size_t interceptor_count = interceptors.size (); - - if (interceptor_count == 0) - return; - - TAO_IORInfo *tao_info = 0; - ACE_NEW_THROW_EX (tao_info, - TAO_IORInfo (poa), - CORBA::NO_MEMORY ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - ENOMEM), - CORBA::COMPLETED_NO)); - ACE_CHECK; - - PortableInterceptor::IORInfo_var info = tao_info; - - // Release the POA during IORInterceptor calls to avoid potential - // deadlocks. - TAO_Object_Adapter::Non_Servant_Upcall non_servant_upcall (*poa); - ACE_UNUSED_ARG (non_servant_upcall); - - for (size_t i = 0; i < interceptor_count; ++i) - { - ACE_TRY - { - interceptors[i]->establish_components (info.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // According to the Portable Interceptors specification, - // IORInterceptor::establish_components() must not throw an - // exception. If it does, then the ORB is supposed to - // ignore it and continue processing the remaining - // IORInterceptors. - if (TAO_debug_level > 1) - { - CORBA::String_var name = interceptors[i]->name ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - // @@ What do we do if we get an exception here? - - if (name.in () != 0) - { - ACE_DEBUG ((LM_WARNING, - "(%P|%t) Exception thrown while processing " - "IORInterceptor \"%s\">\n", - ACE_TEXT_CHAR_TO_TCHAR (name.in ()))); - } - - ACE_PRINT_TAO_EXCEPTION (ACE_ANY_EXCEPTION, - "Ignoring exception in " - "IORInterceptor::establish_components"); - } - } - ACE_ENDTRY; - ACE_CHECK; - } - - tao_info->components_established (); - - this->components_established (info.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - // The IORInfo instance is no longer valid. Invalidate it to - // prevent the user from peforming "illegal" operations. - tao_info->invalidate (); -} - -void -TAO_IORInterceptor_Adapter_Impl::components_established ( - PortableInterceptor::IORInfo_ptr info - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - // Iterate over the registered IOR interceptors so that they may be - // given the opportunity to add tagged components to the profiles - // for this servant. - TAO_IORInterceptor_List::TYPE & interceptors = - this->ior_interceptor_list_.interceptors (); - - const size_t interceptor_count = interceptors.size (); - - // All the establish_components() interception points have been - // invoked. Now call the components_established() interception point - // on all the IORInterceptors. - for (size_t j = 0; j < interceptor_count; ++j) - { - ACE_TRY - { - interceptors[j]->components_established ( - info - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_THROW (CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 6, - CORBA::COMPLETED_NO)); - } - ACE_ENDTRY; - ACE_CHECK; - } -} - -void -TAO_IORInterceptor_Adapter_Impl::adapter_state_changed ( - const TAO_ObjectReferenceTemplate_Array &array_obj_ref_template, - PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->ior_interceptor_list_.adapter_state_changed ( - array_obj_ref_template, - state - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} - -void -TAO_IORInterceptor_Adapter_Impl::adapter_manager_state_changed ( - PortableInterceptor::AdapterManagerId id, - PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - /// Whenever the POAManager state is changed, the - /// adapter_manager_state_changed method is to be invoked on all the IOR - /// Interceptors. - TAO_IORInterceptor_List::TYPE & interceptors = - this->ior_interceptor_list_.interceptors (); - - const size_t interceptor_count = interceptors.size (); - - if (interceptor_count == 0) - return; - - for (size_t i = 0; i < interceptor_count; ++i) - { - interceptors[i]->adapter_manager_state_changed ( - id, - state - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -} diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h index 8a4a7f82b6f..160476a9949 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h @@ -27,8 +27,6 @@ #include "ace/Service_Config.h" #include "IORInterceptor_List.h" -class TAO_POA; - /** * @class TAO_IORInterceptor_Adapter_Impl * @@ -44,6 +42,7 @@ class TAO_IORInterceptor_Export TAO_IORInterceptor_Adapter_Impl public: virtual ~TAO_IORInterceptor_Adapter_Impl (void); + virtual void add_interceptor (PortableInterceptor::IORInterceptor_ptr interceptor ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -54,28 +53,8 @@ public: virtual TAO_IORInterceptor_List *interceptor_list (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void establish_components (TAO_POA *poa ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Call the IORInterceptor::components_established() method on all - /// registered IORInterceptors. - virtual void components_established (PortableInterceptor::IORInfo_ptr info - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void adapter_state_changed ( - const TAO_ObjectReferenceTemplate_Array &array_obj_ref_template, - PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void adapter_manager_state_changed ( - PortableInterceptor::AdapterManagerId id, - PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - private: + /// List of IOR interceptors maintained TAO_IORInterceptor_List ior_interceptor_list_; }; diff --git a/TAO/tao/IORInterceptor/IORInterceptor_List.cpp b/TAO/tao/IORInterceptor/IORInterceptor_List.cpp index debefc5ac8b..d31f6348adc 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_List.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_List.cpp @@ -52,41 +52,6 @@ TAO_IORInterceptor_List::add_interceptor ( PortableInterceptor::IORInterceptor::_duplicate (interceptor); } -void -TAO_IORInterceptor_List::adapter_state_changed ( - const TAO::ORT_Array &array_obj_ref_template, - PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - const size_t interceptor_count = this->interceptors_.size (); - - if (interceptor_count == 0) - return; - - PortableInterceptor::ObjectReferenceTemplateSeq seq_obj_ref_template; - - seq_obj_ref_template.length (array_obj_ref_template.size()); - - for (size_t counter = 0; counter < array_obj_ref_template.size(); ++counter) - { - PortableInterceptor::ObjectReferenceTemplate *member = - array_obj_ref_template[counter]; - - CORBA::add_ref (member); - - seq_obj_ref_template[counter] = member; - } - - for (size_t i = 0; i < interceptor_count; ++i) - { - this->interceptors_[i]->adapter_state_changed (seq_obj_ref_template, - state - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - -} #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/tao/IORInterceptor/IORInterceptor_List.h b/TAO/tao/IORInterceptor/IORInterceptor_List.h index 05bd4f9d3c5..3d77e7aec7a 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_List.h +++ b/TAO/tao/IORInterceptor/IORInterceptor_List.h @@ -24,7 +24,6 @@ #include "IORInterceptorC.h" #include "tao/Interceptor_List.h" -#include "tao/PortableServer/ORT_Adapter.h" /** * @class TAO_IORInterceptor_List @@ -54,12 +53,6 @@ public: /// Return reference to the underlying Portable Interceptor array. TYPE & interceptors (void); - void adapter_state_changed ( - const TAO::ORT_Array &array_obj_ref_template, - PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - protected: /// Return the length of the underlying interceptor array. @@ -68,13 +61,14 @@ protected: /// Set the length of the underlying interceptor array. virtual void length (size_t); - /// Return the interceptor in array element @a index. - virtual PortableInterceptor::Interceptor_ptr interceptor (size_t index); + /// Return the interceptor in array element <index>. + virtual PortableInterceptor::Interceptor_ptr interceptor (size_t); private: /// Dynamic array of registered IOR interceptors. TYPE interceptors_; + }; |