diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-06-20 06:07:59 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-06-20 06:07:59 +0000 |
commit | e68fba5aea7ad65936afbb9802dbca5677242b95 (patch) | |
tree | 2d40c5969107d408f9c60168507704f3969986aa /TAO | |
parent | 778869b2df011dc304874e48eb710a1cbd8e4f0c (diff) | |
download | ATCD-e68fba5aea7ad65936afbb9802dbca5677242b95.tar.gz |
ChangeLogTag: Mon Jun 19 12:11:09 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
71 files changed, 898 insertions, 507 deletions
diff --git a/TAO/tao/Any_Insert_Policy_T.h b/TAO/tao/Any_Insert_Policy_T.h index df79cbbc1f9..0745821d7cb 100644 --- a/TAO/tao/Any_Insert_Policy_T.h +++ b/TAO/tao/Any_Insert_Policy_T.h @@ -39,7 +39,7 @@ namespace TAO { public: - void any_insert (CORBA::Any* p, S const & x) const + static inline void any_insert (CORBA::Any* p, S const & x) { (*p) <<= x; } @@ -50,7 +50,7 @@ namespace TAO { public: - void any_insert (CORBA::Any* p, S const & x) const + static inline void any_insert (CORBA::Any* p, S const & x) { TAO_AnyTypeCode_Adapter *adapter = ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance ( @@ -75,7 +75,7 @@ namespace TAO { public: - void any_insert (CORBA::Any* p, S const & x) const + static inline void any_insert (CORBA::Any* p, S const & x) { TAO_IFR_Client_Adapter *adapter = ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( @@ -90,8 +90,7 @@ namespace TAO class Any_Insert_Policy_Noop { public: - - void any_insert (CORBA::Any* , S const &) const + static inline void any_insert (CORBA::Any* , S const &) { } }; @@ -101,7 +100,7 @@ namespace TAO { public: - void any_insert (CORBA::Any* , S const &) const + static inline void any_insert (CORBA::Any* , S const &) { if (TAO_debug_level > 2) { diff --git a/TAO/tao/Argument.h b/TAO/tao/Argument.h index cbaee13f83d..056ef2596b7 100644 --- a/TAO/tao/Argument.h +++ b/TAO/tao/Argument.h @@ -93,37 +93,45 @@ namespace TAO }; +#if TAO_HAS_INTERCEPTORS == 1 class TAO_Export InArgument : public Argument { public: -#if TAO_HAS_INTERCEPTORS == 1 virtual CORBA::ParameterMode mode (void) const; -#endif }; +#else + typedef Argument InArgument; +#endif +#if TAO_HAS_INTERCEPTORS == 1 class TAO_Export InoutArgument : public Argument { public: -#if TAO_HAS_INTERCEPTORS == 1 virtual CORBA::ParameterMode mode (void) const; -#endif }; +#else + typedef Argument InoutArgument; +#endif +#if TAO_HAS_INTERCEPTORS == 1 class TAO_Export OutArgument : public Argument { public: -#if TAO_HAS_INTERCEPTORS == 1 virtual CORBA::ParameterMode mode (void) const; -#endif }; +#else + typedef Argument OutArgument; +#endif +#if TAO_HAS_INTERCEPTORS == 1 class TAO_Export RetArgument : public Argument { public: -#if TAO_HAS_INTERCEPTORS == 1 virtual CORBA::ParameterMode mode (void) const; -#endif }; +#else + typedef Argument RetArgument; +#endif } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/BD_String_Argument_T.cpp b/TAO/tao/BD_String_Argument_T.cpp index eec06e3a721..f606637d097 100644 --- a/TAO/tao/BD_String_Argument_T.cpp +++ b/TAO/tao/BD_String_Argument_T.cpp @@ -13,7 +13,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::marshal ( TAO_OutputCDR & cdr @@ -26,12 +26,12 @@ TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::marshal ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert ( + Insert_Policy<typename S_var::s_traits::from_type>::any_insert ( any, typename S_var::s_traits::from_type (this->x_, BOUND) ); @@ -43,7 +43,7 @@ TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::marshal ( TAO_OutputCDR & cdr @@ -54,7 +54,7 @@ TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::marshal ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -68,12 +68,12 @@ TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert ( + Insert_Policy<typename S_var::s_traits::from_type>::any_insert ( any, typename S_var::s_traits::from_type (this->x_, BOUND) ); @@ -85,7 +85,7 @@ TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -98,12 +98,12 @@ TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert ( + Insert_Policy<typename S_var::s_traits::from_type>::any_insert ( any, typename S_var::s_traits::from_type (this->x_, BOUND) ); @@ -115,7 +115,7 @@ TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -128,12 +128,12 @@ TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::demarshal ( template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert ( + Insert_Policy<typename S_var::s_traits::from_type>::any_insert ( any, typename S_var::s_traits::from_type (this->x_.in (), BOUND) ); diff --git a/TAO/tao/BD_String_Argument_T.h b/TAO/tao/BD_String_Argument_T.h index 006b805e8c4..fa6d5f2f93c 100644 --- a/TAO/tao/BD_String_Argument_T.h +++ b/TAO/tao/BD_String_Argument_T.h @@ -37,8 +37,8 @@ namespace TAO */ template<typename S_var, size_t BOUND, - typename Insert_Policy> - class In_BD_String_Argument_T : public InArgument, private Insert_Policy + template <typename> class Insert_Policy> + class In_BD_String_Argument_T : public InArgument { public: In_BD_String_Argument_T (const typename S_var::s_traits::char_type * x); @@ -63,14 +63,14 @@ namespace TAO */ template<typename S_var, size_t BOUND, - typename Insert_Policy> - class Inout_BD_String_Argument_T : public InoutArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Inout_BD_String_Argument_T : public InoutArgument { public: Inout_BD_String_Argument_T (typename S_var::s_traits::char_type *& x); virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); - virtual CORBA::Boolean demarshal (TAO_InputCDR &); + virtual CORBA::Boolean demarshal (TAO_InputCDR &cdr); #if TAO_HAS_INTERCEPTORS == 1 virtual void interceptor_value (CORBA::Any *any) const; #endif /* TAO_HAS_INTERCEPTORS == 1 */ @@ -88,8 +88,8 @@ namespace TAO */ template<typename S_var, size_t BOUND, - typename Insert_Policy> - class Out_BD_String_Argument_T : public OutArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Out_BD_String_Argument_T : public OutArgument { public: Out_BD_String_Argument_T (typename S_var::s_traits::string_out x); @@ -112,8 +112,8 @@ namespace TAO */ template<typename S_var, size_t BOUND, - typename Insert_Policy> - class Ret_BD_String_Argument_T : public RetArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Ret_BD_String_Argument_T : public RetArgument { public: Ret_BD_String_Argument_T (void); @@ -139,7 +139,7 @@ namespace TAO */ template<typename T_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> struct BD_String_Arg_Traits_T { typedef typename T_var::s_traits::char_type * ret_type; diff --git a/TAO/tao/BD_String_Argument_T.inl b/TAO/tao/BD_String_Argument_T.inl index a0dfa85fc47..7f92afe814f 100644 --- a/TAO/tao/BD_String_Argument_T.inl +++ b/TAO/tao/BD_String_Argument_T.inl @@ -6,7 +6,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::In_BD_String_Argument_T ( const typename S_var::s_traits::char_type * x @@ -16,7 +16,7 @@ TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::In_BD_String_Argument_T template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE const typename S_var::s_traits::char_type * TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) const @@ -28,7 +28,7 @@ TAO::In_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) const template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>:: Inout_BD_String_Argument_T (typename S_var::s_traits::char_type *& x) @@ -37,7 +37,7 @@ Inout_BD_String_Argument_T (typename S_var::s_traits::char_type *& x) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type *& TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) @@ -49,7 +49,7 @@ TAO::Inout_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>:: Out_BD_String_Argument_T (typename S_var::s_traits::string_out x) @@ -58,7 +58,7 @@ Out_BD_String_Argument_T (typename S_var::s_traits::string_out x) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type *& TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) @@ -70,7 +70,7 @@ TAO::Out_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>:: Ret_BD_String_Argument_T (void) @@ -79,7 +79,7 @@ Ret_BD_String_Argument_T (void) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type * TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::excp (void) @@ -89,7 +89,7 @@ TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::excp (void) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type * TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::retn (void) @@ -99,7 +99,7 @@ TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::retn (void) template<typename S_var, size_t BOUND, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type *& TAO::Ret_BD_String_Argument_T<S_var,BOUND,Insert_Policy>::arg (void) diff --git a/TAO/tao/Basic_Argument_T.cpp b/TAO/tao/Basic_Argument_T.cpp index ae34d1062d0..ac0e9d29265 100644 --- a/TAO/tao/Basic_Argument_T.cpp +++ b/TAO/tao/Basic_Argument_T.cpp @@ -11,7 +11,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Basic_Argument_T<S, Insert_Policy>::marshal (TAO_OutputCDR &cdr) { @@ -20,25 +21,28 @@ TAO::In_Basic_Argument_T<S, Insert_Policy>::marshal (TAO_OutputCDR &cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::In_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // =========================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Basic_Argument_T<S, Insert_Policy>::marshal (TAO_OutputCDR &cdr) { return cdr << this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -47,18 +51,20 @@ TAO::Inout_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Inout_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -67,18 +73,20 @@ TAO::Out_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Out_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================ -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -87,11 +95,12 @@ TAO::Ret_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Ret_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Basic_Argument_T.h b/TAO/tao/Basic_Argument_T.h index 958dc38d7bc..d0d437413bf 100644 --- a/TAO/tao/Basic_Argument_T.h +++ b/TAO/tao/Basic_Argument_T.h @@ -30,17 +30,10 @@ namespace TAO * @class In_Basic_Argument_T * * @brief Template class for IN stub argument of basic IDL types. - * - * @todo - * We really would have liked to write the code as following but MSVC6 chokes - * on this, so we can only do this after x.5.1 has been dropped. - * - * template <typename S, template <typename T> class Insert_Policy> - * class In_Basic_Argument_T : public InArgument, private Insert_Policy <S> - * { .. }; */ - template<typename S, typename Insert_Policy> - class In_Basic_Argument_T : public InArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class In_Basic_Argument_T : public InArgument { public: In_Basic_Argument_T (S const & x); @@ -61,8 +54,9 @@ namespace TAO * @brief Template class for INOUT stub argument of basic IDL types. * */ - template<typename S, typename Insert_Policy> - class Inout_Basic_Argument_T : public InoutArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Inout_Basic_Argument_T : public InoutArgument { public: Inout_Basic_Argument_T (S & x); @@ -84,8 +78,9 @@ namespace TAO * @brief Template class for OUT stub argument of basic IDL types. * */ - template<typename S, typename Insert_Policy> - class Out_Basic_Argument_T : public OutArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Out_Basic_Argument_T : public OutArgument { public: Out_Basic_Argument_T (S & x); @@ -106,8 +101,9 @@ namespace TAO * @brief Template class for return stub value of basic IDL types. * */ - template<typename S, typename Insert_Policy> - class Ret_Basic_Argument_T : public RetArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Ret_Basic_Argument_T : public RetArgument { public: Ret_Basic_Argument_T (void); @@ -132,7 +128,7 @@ namespace TAO * @brief Template class for stub argument traits of basic IDL types. * */ - template<typename T, typename Insert_Policy> + template<typename T, template <typename> class Insert_Policy> struct Basic_Arg_Traits_T { typedef T ret_type; diff --git a/TAO/tao/Basic_Argument_T.inl b/TAO/tao/Basic_Argument_T.inl index c8df439d593..72be561a85c 100644 --- a/TAO/tao/Basic_Argument_T.inl +++ b/TAO/tao/Basic_Argument_T.inl @@ -4,13 +4,15 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Basic_Argument_T<S, Insert_Policy>::In_Basic_Argument_T (S const & x) : x_ (x) {} -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::In_Basic_Argument_T<S, Insert_Policy>::arg (void) const @@ -20,13 +22,15 @@ TAO::In_Basic_Argument_T<S, Insert_Policy>::arg (void) const // ================================================================ -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Basic_Argument_T<S, Insert_Policy>::Inout_Basic_Argument_T (S & x) : x_ (x) {} -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Inout_Basic_Argument_T<S, Insert_Policy>::arg (void) @@ -36,13 +40,15 @@ TAO::Inout_Basic_Argument_T<S, Insert_Policy>::arg (void) // ================================================================ -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Basic_Argument_T<S, Insert_Policy>::Out_Basic_Argument_T (S & x) : x_ (x) {} -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Out_Basic_Argument_T<S, Insert_Policy>::arg (void) @@ -52,13 +58,15 @@ TAO::Out_Basic_Argument_T<S, Insert_Policy>::arg (void) // ================================================================ -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Basic_Argument_T<S, Insert_Policy>::Ret_Basic_Argument_T (void) { } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Ret_Basic_Argument_T<S, Insert_Policy>::arg (void) @@ -66,7 +74,8 @@ TAO::Ret_Basic_Argument_T<S, Insert_Policy>::arg (void) return this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::Ret_Basic_Argument_T<S, Insert_Policy>::excp (void) @@ -74,7 +83,8 @@ TAO::Ret_Basic_Argument_T<S, Insert_Policy>::excp (void) return this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::Ret_Basic_Argument_T<S, Insert_Policy>::retn (void) diff --git a/TAO/tao/Basic_Arguments.h b/TAO/tao/Basic_Arguments.h index 4011e41039c..cf73bb0da43 100644 --- a/TAO/tao/Basic_Arguments.h +++ b/TAO/tao/Basic_Arguments.h @@ -52,57 +52,64 @@ namespace TAO template<> class TAO_Export Arg_Traits<CORBA::Short> - : public Basic_Arg_Traits_T<CORBA::Short, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Short> > + : public Basic_Arg_Traits_T<CORBA::Short, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::Long> - : public Basic_Arg_Traits_T<CORBA::Long, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Long> > + : public Basic_Arg_Traits_T<CORBA::Long, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::UShort> - : public Basic_Arg_Traits_T<CORBA::UShort, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::UShort> > + : public Basic_Arg_Traits_T<CORBA::UShort, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::ULong> - : public Basic_Arg_Traits_T<CORBA::ULong, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::ULong> > + : public Basic_Arg_Traits_T<CORBA::ULong, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::Float> - : public Basic_Arg_Traits_T<CORBA::Float, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Float> > + : public Basic_Arg_Traits_T<CORBA::Float, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::Double> - : public Basic_Arg_Traits_T<CORBA::Double, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Double> > + : public Basic_Arg_Traits_T<CORBA::Double, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::LongLong> - : public Basic_Arg_Traits_T<CORBA::LongLong, TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::LongLong> > + : public Basic_Arg_Traits_T<CORBA::LongLong, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::ULongLong> : public Basic_Arg_Traits_T<CORBA::ULongLong, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::ULongLong> > + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::LongDouble> : public Basic_Arg_Traits_T<CORBA::LongDouble, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::LongDouble> > + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; } diff --git a/TAO/tao/Blocked_Connect_Strategy.cpp b/TAO/tao/Blocked_Connect_Strategy.cpp index e5ee355a042..6cd123fcf49 100644 --- a/TAO/tao/Blocked_Connect_Strategy.cpp +++ b/TAO/tao/Blocked_Connect_Strategy.cpp @@ -15,11 +15,6 @@ TAO_Blocked_Connect_Strategy::TAO_Blocked_Connect_Strategy ( { } -TAO_Blocked_Connect_Strategy::~TAO_Blocked_Connect_Strategy (void) -{ -} - - void TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout, ACE_Synch_Options &options) @@ -41,7 +36,7 @@ TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout, int TAO_Blocked_Connect_Strategy::wait_i (TAO_LF_Event *, TAO_Transport *, - ACE_Time_Value * ) + ACE_Time_Value * ) { // We cannot wait for connection completion return -1; diff --git a/TAO/tao/Blocked_Connect_Strategy.h b/TAO/tao/Blocked_Connect_Strategy.h index 9eea4edaebc..9e140e316ec 100644 --- a/TAO/tao/Blocked_Connect_Strategy.h +++ b/TAO/tao/Blocked_Connect_Strategy.h @@ -35,9 +35,6 @@ public: /// Constructor TAO_Blocked_Connect_Strategy (TAO_ORB_Core *orb); - /// Destructor - ~TAO_Blocked_Connect_Strategy (void); - /* * Concrete implementation for this class. Please see * Connect_Strategy.h for details diff --git a/TAO/tao/CONV_FRAMEC.h b/TAO/tao/CONV_FRAMEC.h index 5a5df45164f..348aff238cc 100644 --- a/TAO/tao/CONV_FRAMEC.h +++ b/TAO/tao/CONV_FRAMEC.h @@ -130,8 +130,7 @@ namespace CONV_FRAME typedef TAO_Out_T< - CodeSetComponent, - CodeSetComponent_var + CodeSetComponent > CodeSetComponent_out; @@ -160,8 +159,7 @@ namespace CONV_FRAME typedef TAO_Out_T< - CodeSetComponentInfo, - CodeSetComponentInfo_var + CodeSetComponentInfo > CodeSetComponentInfo_out; diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 6401fac6155..4b6c78baebb 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -363,7 +363,7 @@ TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler *eh) // @@ This seems silly, the reactor is a much better authority to // find out if a handle is registered... - this->transport ()->wait_strategy ()->is_registered (0); + this->transport ()->wait_strategy ()->is_registered (false); } // This call should be made only after the cache and reactor are diff --git a/TAO/tao/DomainC.cpp b/TAO/tao/DomainC.cpp index cd48cc1d9f4..f6e8529bd7c 100644 --- a/TAO/tao/DomainC.cpp +++ b/TAO/tao/DomainC.cpp @@ -75,7 +75,7 @@ namespace TAO template<> CORBA::Boolean - In_Object_Argument_T<CORBA::InterfaceDef_ptr, TAO::Any_Insert_Policy_IFR_Client_Adapter <CORBA::InterfaceDef_ptr> >::marshal (TAO_OutputCDR &cdr) + In_Object_Argument_T<CORBA::InterfaceDef_ptr, TAO::Any_Insert_Policy_IFR_Client_Adapter>::marshal (TAO_OutputCDR &cdr) { TAO_IFR_Client_Adapter *adapter = ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( @@ -101,7 +101,7 @@ namespace TAO CORBA::Policy_var, CORBA::Policy_out, TAO::Objref_Traits<CORBA::Policy>, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Policy_ptr> + TAO::Any_Insert_Policy_AnyTypeCode_Adapter > { }; @@ -119,7 +119,7 @@ namespace TAO CORBA::InterfaceDef_var, CORBA::InterfaceDef_out, TAO::Objref_Traits<CORBA::InterfaceDef>, - TAO::Any_Insert_Policy_IFR_Client_Adapter <CORBA::InterfaceDef_ptr> + TAO::Any_Insert_Policy_IFR_Client_Adapter > { }; diff --git a/TAO/tao/Fixed_Array_Argument_T.cpp b/TAO/tao/Fixed_Array_Argument_T.cpp index e49b66127b6..b50d93423d9 100644 --- a/TAO/tao/Fixed_Array_Argument_T.cpp +++ b/TAO/tao/Fixed_Array_Argument_T.cpp @@ -12,7 +12,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>::marshal ( TAO_OutputCDR & cdr @@ -24,12 +24,12 @@ TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>::marshal ( #if TAO_HAS_INTERCEPTORS == 1 template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_forany>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ @@ -37,7 +37,7 @@ TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: // =========================================================== template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::marshal ( TAO_OutputCDR & cdr @@ -47,7 +47,7 @@ TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::marshal ( } template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -59,12 +59,12 @@ TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_forany>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ @@ -72,7 +72,7 @@ TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: // ============================================================== template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>::demarshal ( TAO_InputCDR & cdr) @@ -83,12 +83,12 @@ TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_forany>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ @@ -97,7 +97,7 @@ TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>:: demarshal (TAO_InputCDR & cdr) @@ -116,12 +116,12 @@ TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>:: template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, S_forany (this->x_.ptr ())); + Insert_Policy<S_forany>::any_insert (any, S_forany (this->x_.ptr ())); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Fixed_Array_Argument_T.h b/TAO/tao/Fixed_Array_Argument_T.h index 03311711e7d..49097e4c472 100644 --- a/TAO/tao/Fixed_Array_Argument_T.h +++ b/TAO/tao/Fixed_Array_Argument_T.h @@ -32,8 +32,8 @@ namespace TAO * */ template<typename S_forany, - typename Insert_Policy> - class In_Fixed_Array_Argument_T : public InArgument, private Insert_Policy + template <typename> class Insert_Policy> + class In_Fixed_Array_Argument_T : public InArgument { public: In_Fixed_Array_Argument_T (const typename S_forany::_slice_type * x); @@ -55,8 +55,8 @@ namespace TAO * */ template<typename S_forany, - typename Insert_Policy> - class Inout_Fixed_Array_Argument_T : public InoutArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Inout_Fixed_Array_Argument_T : public InoutArgument { public: Inout_Fixed_Array_Argument_T (typename S_forany::_slice_type *&x); @@ -79,8 +79,8 @@ namespace TAO * */ template<typename S_forany, - typename Insert_Policy> - class Out_Fixed_Array_Argument_T : public OutArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Out_Fixed_Array_Argument_T : public OutArgument { public: Out_Fixed_Array_Argument_T (typename S_forany::_slice_type *& x); @@ -103,8 +103,8 @@ namespace TAO */ template<typename S_var, typename S_forany, - typename Insert_Policy> - class Ret_Fixed_Array_Argument_T : public RetArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Ret_Fixed_Array_Argument_T : public RetArgument { public: Ret_Fixed_Array_Argument_T (void); @@ -130,7 +130,7 @@ namespace TAO */ template<typename T_var, typename T_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> struct Fixed_Array_Arg_Traits_T { typedef typename T_forany::_slice_type * ret_type; diff --git a/TAO/tao/Fixed_Array_Argument_T.inl b/TAO/tao/Fixed_Array_Argument_T.inl index e809366e892..4530de02917 100644 --- a/TAO/tao/Fixed_Array_Argument_T.inl +++ b/TAO/tao/Fixed_Array_Argument_T.inl @@ -5,7 +5,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: In_Fixed_Array_Argument_T (const typename S_forany::_slice_type * x) @@ -26,7 +26,7 @@ In_Fixed_Array_Argument_T (const typename S_forany::_slice_type * x) } template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE const typename S_forany::_slice_type * TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>::arg (void) const @@ -37,7 +37,7 @@ TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>::arg (void) const // =========================================================================== template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>:: Inout_Fixed_Array_Argument_T (typename S_forany::_slice_type *& x) @@ -45,7 +45,7 @@ Inout_Fixed_Array_Argument_T (typename S_forany::_slice_type *& x) {} template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type * TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::arg (void) @@ -56,7 +56,7 @@ TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::arg (void) // =========================================================================== template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Fixed_Array_Argument_T< S_forany, @@ -66,7 +66,7 @@ TAO::Out_Fixed_Array_Argument_T< {} template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type *& TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>::arg (void) @@ -78,7 +78,7 @@ TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>::arg (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>:: Ret_Fixed_Array_Argument_T (void) @@ -86,7 +86,7 @@ Ret_Fixed_Array_Argument_T (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type *& TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::arg (void) @@ -96,7 +96,7 @@ TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::arg (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type * TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::excp (void) @@ -106,7 +106,7 @@ TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::excp (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type * TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::retn (void) diff --git a/TAO/tao/Fixed_Size_Argument_T.cpp b/TAO/tao/Fixed_Size_Argument_T.cpp index 99b3814f51f..1da9ff0071d 100644 --- a/TAO/tao/Fixed_Size_Argument_T.cpp +++ b/TAO/tao/Fixed_Size_Argument_T.cpp @@ -11,7 +11,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Fixed_Size_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr) { @@ -20,25 +21,28 @@ TAO::In_Fixed_Size_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::In_Fixed_Size_Argument_T<S,Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, *this->x_); + Insert_Policy<S>::any_insert (any, *this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // =========================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr) { return cdr << *this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -47,18 +51,20 @@ TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, *this->x_); + Insert_Policy<S>::any_insert (any, *this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Fixed_Size_Argument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -67,18 +73,20 @@ TAO::Out_Fixed_Size_Argument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Out_Fixed_Size_Argument_T<S,Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================ -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -87,12 +95,13 @@ TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Fixed_Size_Argument_T.h b/TAO/tao/Fixed_Size_Argument_T.h index 46b8efa12d9..eeebf2e1eb2 100644 --- a/TAO/tao/Fixed_Size_Argument_T.h +++ b/TAO/tao/Fixed_Size_Argument_T.h @@ -31,8 +31,9 @@ namespace TAO * @brief Template class for IN stub argument of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class In_Fixed_Size_Argument_T : public InArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class In_Fixed_Size_Argument_T : public InArgument { public: In_Fixed_Size_Argument_T (S const & x); @@ -53,8 +54,9 @@ namespace TAO * @brief Template class for INOUT stub argument of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class Inout_Fixed_Size_Argument_T : public InoutArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Inout_Fixed_Size_Argument_T : public InoutArgument { public: Inout_Fixed_Size_Argument_T (S & x); @@ -76,8 +78,9 @@ namespace TAO * @brief Template class for OUT stub argument of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class Out_Fixed_Size_Argument_T : public OutArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Out_Fixed_Size_Argument_T : public OutArgument { public: Out_Fixed_Size_Argument_T (S & x); @@ -99,8 +102,9 @@ namespace TAO * @brief Template class for return stub value of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class Ret_Fixed_Size_Argument_T : public RetArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Ret_Fixed_Size_Argument_T : public RetArgument { public: Ret_Fixed_Size_Argument_T (void); @@ -123,7 +127,8 @@ namespace TAO * @brief Template class for argument traits of fixed size IDL types. * */ - template<typename T, typename Insert_Policy> + template<typename T, + template <typename> class Insert_Policy> struct Fixed_Size_Arg_Traits_T { typedef T ret_type; diff --git a/TAO/tao/Fixed_Size_Argument_T.inl b/TAO/tao/Fixed_Size_Argument_T.inl index c80be4ca834..d0119fb1b00 100644 --- a/TAO/tao/Fixed_Size_Argument_T.inl +++ b/TAO/tao/Fixed_Size_Argument_T.inl @@ -4,14 +4,16 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Fixed_Size_Argument_T<S,Insert_Policy>:: In_Fixed_Size_Argument_T (S const & x) : x_ (&x) {} -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE const S & TAO::In_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) const @@ -21,14 +23,16 @@ TAO::In_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) const // ========================================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>:: Inout_Fixed_Size_Argument_T (S & x) : x_ (&x) {} -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) @@ -38,7 +42,8 @@ TAO::Inout_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) // ========================================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Fixed_Size_Argument_T<S,Insert_Policy>:: Out_Fixed_Size_Argument_T (S & x) @@ -46,7 +51,8 @@ Out_Fixed_Size_Argument_T (S & x) { } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Out_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) @@ -56,14 +62,16 @@ TAO::Out_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) // ========================================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>:: Ret_Fixed_Size_Argument_T (void) { } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) @@ -71,7 +79,8 @@ TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::arg (void) return this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::excp (void) @@ -79,7 +88,8 @@ TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::excp (void) return this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::Ret_Fixed_Size_Argument_T<S,Insert_Policy>::retn (void) diff --git a/TAO/tao/IIOPC.h b/TAO/tao/IIOPC.h index c2bb85cdd04..2dd44b7940e 100644 --- a/TAO/tao/IIOPC.h +++ b/TAO/tao/IIOPC.h @@ -80,8 +80,7 @@ namespace IIOP typedef TAO_Out_T< - ListenPoint, - ListenPoint_var + ListenPoint > ListenPoint_out; @@ -91,6 +90,7 @@ namespace IIOP struct TAO_Export ListenPoint { typedef ListenPoint_var _var_type; + typedef ListenPoint_out _out_type; static void _tao_any_destructor (void *); TAO::String_Manager host; @@ -155,8 +155,7 @@ namespace IIOP typedef TAO_Out_T< - BiDirIIOPServiceContext, - BiDirIIOPServiceContext_var + BiDirIIOPServiceContext > BiDirIIOPServiceContext_out; diff --git a/TAO/tao/IIOP_EndpointsC.h b/TAO/tao/IIOP_EndpointsC.h index f9d86079b2f..52e0d4a5032 100644 --- a/TAO/tao/IIOP_EndpointsC.h +++ b/TAO/tao/IIOP_EndpointsC.h @@ -84,8 +84,7 @@ namespace TAO typedef TAO_Out_T< - IIOP_Endpoint_Info, - IIOP_Endpoint_Info_var + IIOP_Endpoint_Info > IIOP_Endpoint_Info_out; @@ -95,6 +94,7 @@ namespace TAO struct TAO_Export IIOP_Endpoint_Info { typedef IIOP_Endpoint_Info_var _var_type; + typedef IIOP_Endpoint_Info_out _out_type; static void _tao_any_destructor (void *); TAO::String_Manager host; diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index fddb13520b5..e40e21738c5 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -13,6 +13,9 @@ #include "tao/ORB_Core.h" #include "tao/Thread_Lane_Resources.h" #include "tao/Transport_Mux_Strategy.h" +#include "tao/MMAP_Allocator.h" + +#include "ace/OS_NS_sys_sendfile.h" ACE_RCSID (tao, IIOP_Transport, @@ -71,8 +74,11 @@ TAO_IIOP_Transport::send (iovec *iov, int iovcnt, size_t &bytes_transferred, const ACE_Time_Value *max_wait_time) { - ssize_t retval = this->connection_handler_->peer ().sendv (iov, iovcnt, - max_wait_time); + ssize_t const retval = + this->connection_handler_->peer ().sendv (iov, + iovcnt, + max_wait_time); + if (retval > 0) bytes_transferred = retval; else @@ -89,14 +95,94 @@ TAO_IIOP_Transport::send (iovec *iov, int iovcnt, return retval; } +#ifdef ACE_HAS_SENDFILE +ssize_t +TAO_IIOP_Transport::sendfile (TAO_MMAP_Allocator * allocator, + iovec * iov, + int iovcnt, + size_t &bytes_transferred, + ACE_Time_Value const * timeout) +{ + // @@ We should probably set the TCP_CORK socket option to minimize + // network operations. It may also be useful to adjust the + // socket send buffer size accordingly. + + // If we don't have an allocator, fallback to the regular way of sending + // data + if (allocator == 0) + return this->send (iov, iovcnt, bytes_transferred, timeout); + + // We can only use sendfile when all data is coming from the mmap allocator, + // if not, we just fallback to to the regular way of sending data + iovec * const off_check_begin = iov; + iovec * const off_check_end = iov + iovcnt; + for (iovec * index = off_check_begin; index != off_check_end; ++index) + { + if (-1 == allocator->offset (index->iov_base)) + return this->send (iov, iovcnt, bytes_transferred, timeout); + } + + ssize_t retval = -1; + + ACE_HANDLE const in_fd = allocator->handle (); + + if (in_fd == ACE_INVALID_HANDLE) + return retval; + + ACE_HANDLE const out_fd = + this->connection_handler_->peer ().get_handle (); + + iovec * const begin = iov; + iovec * const end = iov + iovcnt; + for (iovec * i = begin; i != end; ++i) + { + off_t offset = allocator->offset (i->iov_base); + + if (timeout) + { + int val = 0; + if (ACE::enter_send_timedwait (out_fd, timeout, val) == -1) + return retval; + else + { + retval = + ACE_OS::sendfile (out_fd, in_fd, &offset, i->iov_len); + ACE::restore_non_blocking_mode (out_fd, val); + + } + } + else + { + retval = ACE_OS::sendfile (out_fd, in_fd, &offset, i->iov_len); + } + + if (retval <= 0) // Report errors below. + break; + + bytes_transferred += static_cast<size_t> (retval); + } + + if (retval <= 0 && TAO_debug_level > 4) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::sendfile, ") + ACE_TEXT ("sendfile failure - %m (errno: %d)\n"), + this->id (), + errno)); + } + + return retval; +} +#endif /* ACE_HAS_SENDFILE */ + ssize_t TAO_IIOP_Transport::recv (char *buf, size_t len, const ACE_Time_Value *max_wait_time) { - ssize_t n = this->connection_handler_->peer ().recv (buf, - len, - max_wait_time); + ssize_t const n = this->connection_handler_->peer ().recv (buf, + len, + max_wait_time); // Do not print the error message if it is a timeout, which could // occur in thread-per-connection. @@ -166,7 +252,7 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream, return -1; // This guarantees to send all data (bytes) or return an error. - const ssize_t n = this->send_message_shared (stub, + ssize_t const n = this->send_message_shared (stub, message_semantics, stream.begin (), max_wait_time); @@ -345,7 +431,7 @@ TAO_IIOP_Transport::get_listen_point ( iiop_acceptor->endpoints (); // Get the endpoint count - const size_t count = + size_t const count = iiop_acceptor->endpoint_count (); // Get the local address of the connection diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h index e64641d1aa6..70c99088a0a 100644 --- a/TAO/tao/IIOP_Transport.h +++ b/TAO/tao/IIOP_Transport.h @@ -84,6 +84,15 @@ protected: size_t &bytes_transferred, const ACE_Time_Value *timeout = 0); +#ifdef ACE_HAS_SENDFILE + virtual ssize_t sendfile (TAO_MMAP_Allocator * allocator, + iovec * iov, + int iovcnt, + size_t &bytes_transferred, + ACE_Time_Value const * timeout = 0); +#endif /* ACE_HAS_SENDFILE */ + + virtual ssize_t recv (char *buf, size_t len, const ACE_Time_Value *s = 0); @@ -115,9 +124,6 @@ public: int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST, ACE_Time_Value *max_time_wait = 0); - /*virtual int send_reply (TAO_OutputCDR &stream, - TAO_Adapter *poa = 0);*/ - virtual int generate_request_header (TAO_Operation_Details &opdetails, TAO_Target_Specification &spec, TAO_OutputCDR &msg); diff --git a/TAO/tao/IOP_IORC.h b/TAO/tao/IOP_IORC.h index 790ec9730a7..2d4e35627db 100644 --- a/TAO/tao/IOP_IORC.h +++ b/TAO/tao/IOP_IORC.h @@ -98,8 +98,7 @@ namespace IOP typedef TAO_Out_T< - TaggedProfile, - TaggedProfile_var + TaggedProfile > TaggedProfile_out; @@ -173,8 +172,7 @@ namespace IOP typedef TAO_Out_T< - IOR, - IOR_var + IOR > IOR_out; @@ -209,8 +207,7 @@ namespace IOP typedef TAO_Out_T< - TaggedComponent, - TaggedComponent_var + TaggedComponent > TaggedComponent_out; @@ -430,8 +427,7 @@ namespace IOP typedef TAO_Out_T< - ServiceContext, - ServiceContext_var + ServiceContext > ServiceContext_out; diff --git a/TAO/tao/Messaging_PolicyValueC.h b/TAO/tao/Messaging_PolicyValueC.h index 7a95d8fecb0..1e6e16f1f7f 100644 --- a/TAO/tao/Messaging_PolicyValueC.h +++ b/TAO/tao/Messaging_PolicyValueC.h @@ -82,8 +82,7 @@ namespace Messaging typedef TAO_Out_T< - PolicyValue, - PolicyValue_var + PolicyValue > PolicyValue_out; @@ -93,6 +92,7 @@ namespace Messaging struct TAO_Export PolicyValue { typedef PolicyValue_var _var_type; + typedef PolicyValue_out _out_type; static void _tao_any_destructor (void *); CORBA::PolicyType ptype; diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index 10c82a06df8..b08936b74b5 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -361,6 +361,7 @@ CORBA::Object::is_nil_i (CORBA::Object_ptr obj) #if (TAO_HAS_MINIMUM_CORBA == 0) +#if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) void CORBA::Object::_create_request (CORBA::Context_ptr ctx, const char *operation, @@ -398,7 +399,9 @@ CORBA::Object::_create_request (CORBA::Context_ptr ctx, ACE_ENV_ARG_PARAMETER ); } +#endif +#if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) void CORBA::Object::_create_request (CORBA::Context_ptr ctx, const char *operation, @@ -438,6 +441,7 @@ CORBA::Object::_create_request (CORBA::Context_ptr ctx, ACE_ENV_ARG_PARAMETER ); } +#endif CORBA::Request_ptr CORBA::Object::_request (const char *operation diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h index 9b2a75d1d2e..dda42fc82e1 100644 --- a/TAO/tao/Object.h +++ b/TAO/tao/Object.h @@ -183,6 +183,7 @@ namespace CORBA ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ); +#if ! defined (CORBA_E_COMPACT) && ! defined (CORBA_E_MICRO) // DII operations to create a request. // // The mapping for create_request is split into two forms, @@ -206,6 +207,7 @@ namespace CORBA CORBA::Request_ptr &request, CORBA::Flags req_flags ACE_ENV_ARG_DECL_WITH_DEFAULTS); +#endif // The default implementation of this method uses the same simple, // multi-protocol remote invocation interface as is assumed by the @@ -425,7 +427,7 @@ namespace TAO CORBA::Object_var, CORBA::Object_out, TAO::Objref_Traits<CORBA::Object>, - TAO::Any_Insert_Policy_CORBA_Object <CORBA::Object_ptr> > + TAO::Any_Insert_Policy_CORBA_Object> { }; diff --git a/TAO/tao/Object_Argument_T.cpp b/TAO/tao/Object_Argument_T.cpp index 7ddc254c6d8..2761f87305a 100644 --- a/TAO/tao/Object_Argument_T.cpp +++ b/TAO/tao/Object_Argument_T.cpp @@ -11,7 +11,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S_ptr, typename Insert_Policy> +template<typename S_ptr, + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Object_Argument_T<S_ptr,Insert_Policy>::marshal (TAO_OutputCDR &cdr) { @@ -20,25 +21,30 @@ TAO::In_Object_Argument_T<S_ptr,Insert_Policy>::marshal (TAO_OutputCDR &cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_ptr, typename Insert_Policy> +template<typename S_ptr, + template <typename> class Insert_Policy> void TAO::In_Object_Argument_T<S_ptr,Insert_Policy>::interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_ptr>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // =========================================================== -template<typename S_ptr, typename S_traits, typename Insert_Policy> +template<typename S_ptr, + typename S_traits, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::marshal (TAO_OutputCDR &cdr) { return cdr << this->x_; } -template<typename S_ptr, typename S_traits, typename Insert_Policy> +template<typename S_ptr, + typename S_traits, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -48,19 +54,23 @@ TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::demarshal (TAO_Input #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_ptr, typename S_traits, typename Insert_Policy> +template<typename S_ptr, + typename S_traits, + template <typename> class Insert_Policy> void TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_ptr>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================== -template<typename S_ptr, typename S_out, typename Insert_Policy> +template<typename S_ptr, + typename S_out, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Object_Argument_T<S_ptr,S_out,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -69,19 +79,23 @@ TAO::Out_Object_Argument_T<S_ptr,S_out,Insert_Policy>::demarshal (TAO_InputCDR & #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_ptr, typename S_out, typename Insert_Policy> +template<typename S_ptr, + typename S_out, + template <typename> class Insert_Policy> void TAO::Out_Object_Argument_T<S_ptr,S_out,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_ptr>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================ -template<typename S_ptr, typename S_var, typename Insert_Policy> +template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -90,12 +104,14 @@ TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::demarshal (TAO_InputCDR & #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_ptr, typename S_var, typename Insert_Policy> +template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> void TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_.in ()); + Insert_Policy<S_ptr>::any_insert (any, this->x_.in ()); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Object_Argument_T.h b/TAO/tao/Object_Argument_T.h index 54377c8a514..f2179a244aa 100644 --- a/TAO/tao/Object_Argument_T.h +++ b/TAO/tao/Object_Argument_T.h @@ -32,8 +32,9 @@ namespace TAO * @brief Template class for IN object argument. * */ - template<typename S_ptr, typename Insert_Policy> - class In_Object_Argument_T : public InArgument, private Insert_Policy + template<typename S_ptr, + template <typename> class Insert_Policy> + class In_Object_Argument_T : public InArgument { public: In_Object_Argument_T (S_ptr x); @@ -54,8 +55,10 @@ namespace TAO * @brief Template class for INOUT object argument. * */ - template<typename S_ptr, typename S_traits, typename Insert_Policy> - class Inout_Object_Argument_T : public InoutArgument, private Insert_Policy + template<typename S_ptr, + typename S_traits, + template <typename> class Insert_Policy> + class Inout_Object_Argument_T : public InoutArgument { public: Inout_Object_Argument_T (S_ptr & x); @@ -77,8 +80,10 @@ namespace TAO * @brief Template class for OUT object argument. * */ - template<typename S_ptr, typename S_out, typename Insert_Policy> - class Out_Object_Argument_T : public OutArgument, private Insert_Policy + template<typename S_ptr, + typename S_out, + template <typename> class Insert_Policy> + class Out_Object_Argument_T : public OutArgument { public: Out_Object_Argument_T (S_out & x); @@ -99,8 +104,10 @@ namespace TAO * @brief Template class for return stub value of object argument. * */ - template<typename S_ptr, typename S_var, typename Insert_Policy> - class Ret_Object_Argument_T : public RetArgument, private Insert_Policy + template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> + class Ret_Object_Argument_T : public RetArgument { public: @@ -128,7 +135,7 @@ namespace TAO typename T_var, typename T_out, typename T_traits, - typename Insert_Policy> + template <typename> class Insert_Policy> struct Object_Arg_Traits_T { typedef T_ptr ret_type; diff --git a/TAO/tao/Object_Argument_T.inl b/TAO/tao/Object_Argument_T.inl index f8105b5a561..625f916e252 100644 --- a/TAO/tao/Object_Argument_T.inl +++ b/TAO/tao/Object_Argument_T.inl @@ -4,13 +4,15 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S_ptr, typename Insert_Policy> +template<typename S_ptr, + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Object_Argument_T<S_ptr,Insert_Policy>::In_Object_Argument_T (S_ptr x) : x_ (x) {} -template<typename S_ptr, typename Insert_Policy> +template<typename S_ptr, + template <typename> class Insert_Policy> ACE_INLINE S_ptr TAO::In_Object_Argument_T<S_ptr,Insert_Policy>::arg (void) const @@ -20,7 +22,9 @@ TAO::In_Object_Argument_T<S_ptr,Insert_Policy>::arg (void) const // ========================================================================== -template<typename S_ptr, typename S_traits, typename Insert_Policy> +template<typename S_ptr, + typename S_traits, + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::Inout_Object_Argument_T ( S_ptr & x @@ -28,7 +32,9 @@ TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::Inout_Object_Argumen : x_ (x) {} -template<typename S_ptr, typename S_traits, typename Insert_Policy> +template<typename S_ptr, + typename S_traits, + template <typename> class Insert_Policy> ACE_INLINE S_ptr & TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::arg (void) @@ -38,13 +44,17 @@ TAO::Inout_Object_Argument_T<S_ptr,S_traits,Insert_Policy>::arg (void) // ========================================================================== -template<typename S_ptr, typename S_out, typename Insert_Policy> +template<typename S_ptr, + typename S_out, + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Object_Argument_T<S_ptr,S_out,Insert_Policy>::Out_Object_Argument_T (S_out & x) : x_ (x.ptr ()) {} -template<typename S_ptr, typename S_out, typename Insert_Policy> +template<typename S_ptr, + typename S_out, + template <typename> class Insert_Policy> ACE_INLINE S_out TAO::Out_Object_Argument_T<S_ptr,S_out,Insert_Policy>::arg (void) @@ -54,12 +64,16 @@ TAO::Out_Object_Argument_T<S_ptr,S_out,Insert_Policy>::arg (void) // ========================================================================== -template<typename S_ptr, typename S_var, typename Insert_Policy> +template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::Ret_Object_Argument_T (void) {} -template<typename S_ptr, typename S_var, typename Insert_Policy> +template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> ACE_INLINE S_ptr & TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::arg (void) @@ -67,7 +81,9 @@ TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::arg (void) return this->x_.out (); } -template<typename S_ptr, typename S_var, typename Insert_Policy> +template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> ACE_INLINE S_ptr TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::excp (void) @@ -75,7 +91,9 @@ TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::excp (void) return this->x_.ptr (); } -template<typename S_ptr, typename S_var, typename Insert_Policy> +template<typename S_ptr, + typename S_var, + template <typename> class Insert_Policy> ACE_INLINE S_ptr TAO::Ret_Object_Argument_T<S_ptr,S_var,Insert_Policy>::retn (void) diff --git a/TAO/tao/Object_Reference_Sequence_Element_T.h b/TAO/tao/Object_Reference_Sequence_Element_T.h index 7e9d04a4595..5c7f1f6f4ce 100644 --- a/TAO/tao/Object_Reference_Sequence_Element_T.h +++ b/TAO/tao/Object_Reference_Sequence_Element_T.h @@ -89,25 +89,29 @@ public: return *element_; } + inline object_reference_type *in (void) const { + return *this->element_; + } + inline value_type operator->() { - return *element_; + return *this->element_; } inline value_type operator->() const { - return *element_; + return *this->element_; } void swap(object_reference_sequence_element & rhs) { - std::swap(element_, rhs.element_); - std::swap(release_, rhs.release_); + std::swap(this->element_, rhs.element_); + std::swap(this->release_, rhs.release_); } inline CORBA::Boolean release() const { - return release_; + return this->release_; } private: diff --git a/TAO/tao/OctetSeq.pidl b/TAO/tao/OctetSeq.pidl index 2c59a050eb2..19ad732f38c 100644 --- a/TAO/tao/OctetSeq.pidl +++ b/TAO/tao/OctetSeq.pidl @@ -9,7 +9,7 @@ * * tao_idl * -oA AnyTypeCode - * -Ge 1 -GA -SS -Sci + * -Ge 1 -GA -SS -Sci -Sorb * -Wb,pre_include=ace/pre.h * -Wb,post_include=ace/post.h * -Wb,export_macro=TAO_Export diff --git a/TAO/tao/OctetSeqC.h b/TAO/tao/OctetSeqC.h index 8f7c1f2ca4e..adf0c683d25 100644 --- a/TAO/tao/OctetSeqC.h +++ b/TAO/tao/OctetSeqC.h @@ -41,7 +41,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/TAO_Export.h" -#include "tao/ORB.h" #include "tao/Environment.h" #include "tao/Sequence_T.h" #include "tao/Seq_Var_T.h" diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp index f5a8d53ed0c..f1fa66892ff 100644 --- a/TAO/tao/PolicyC.cpp +++ b/TAO/tao/PolicyC.cpp @@ -85,7 +85,7 @@ namespace TAO CORBA::Policy_var, CORBA::Policy_out, TAO::Objref_Traits<CORBA::Policy>, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Policy_ptr> + TAO::Any_Insert_Policy_AnyTypeCode_Adapter > { }; @@ -983,13 +983,13 @@ CORBA::Boolean operator>> ( CORBA::Boolean CORBA::Policy::_tao_encode (TAO_OutputCDR &) { - return 0; + return false; } CORBA::Boolean CORBA::Policy::_tao_decode (TAO_InputCDR &) { - return 0; + return false; } TAO_Cached_Policy_Type diff --git a/TAO/tao/Policy_Forward.pidl b/TAO/tao/Policy_Forward.pidl index abe7a0f954e..ed07e168ce3 100644 --- a/TAO/tao/Policy_Forward.pidl +++ b/TAO/tao/Policy_Forward.pidl @@ -17,24 +17,11 @@ * command used for this is: * * tao_idl.exe - * -o orig -Ge 1 -GA -SS -Sci + * -o orig -Ge 1 -GA -SS -Sci -Sorb * -Wb,export_macro="tao/TAO_Export" * -Wb,pre_include="ace/pre.h" * -Wb,post_include="ace/post.h" * Policy_Forward.pidl - * - * 2. Then patch the generated code. This patch (a) eliminates - * cycles in the include dependencies. - * - * Apply patches using the following commands: - * - * patch < diffs/Policy_Forward.diff - * - * Note: The diffs were generated with these commands: - * - * for i in Policy_ForwardC.{h,cpp}; do - * diff -wBbu orig/$i $i; - * done > diffs/Policy_Forward.diff */ #ifndef TAO_CORBA_POLICY_FORWARD_PIDL diff --git a/TAO/tao/Policy_ForwardC.h b/TAO/tao/Policy_ForwardC.h index 72894e7f1b4..e21c91f8100 100644 --- a/TAO/tao/Policy_ForwardC.h +++ b/TAO/tao/Policy_ForwardC.h @@ -41,7 +41,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/TAO_Export.h" -#include "tao/ORB.h" #include "tao/Environment.h" #include "tao/Sequence_T.h" #include "tao/Objref_VarOut_T.h" diff --git a/TAO/tao/Sequence_T.h b/TAO/tao/Sequence_T.h index 2ee1b14407d..5105a76b7df 100644 --- a/TAO/tao/Sequence_T.h +++ b/TAO/tao/Sequence_T.h @@ -5,11 +5,12 @@ #include "tao/Unbounded_Wstring_Sequence_T.h" #include "tao/Unbounded_String_Sequence_T.h" #include "tao/Unbounded_Object_Reference_Sequence_T.h" -#include "tao/Unbounded_Sequence_CDR_T.h" #include "tao/Unbounded_Array_Sequence_T.h" +#include "tao/Unbounded_Sequence_CDR_T.h" #include "tao/Bounded_Value_Sequence_T.h" #include "tao/Bounded_Wstring_Sequence_T.h" #include "tao/Bounded_String_Sequence_T.h" #include "tao/Bounded_Object_Reference_Sequence_T.h" -#include "tao/Bounded_Sequence_CDR_T.h" #include "tao/Bounded_Array_Sequence_T.h" +#include "tao/Bounded_Sequence_CDR_T.h" + diff --git a/TAO/tao/Service_Callbacks.h b/TAO/tao/Service_Callbacks.h index bf317492e76..935dda88764 100644 --- a/TAO/tao/Service_Callbacks.h +++ b/TAO/tao/Service_Callbacks.h @@ -102,7 +102,7 @@ public: // Verify if condition is given for LOCATION_FORWARD_PERM reply virtual CORBA::Boolean is_permanent_forward_condition (const CORBA::Object_ptr obj, - const TAO_Service_Context &service_context) const; + const TAO_Service_Context &service_context) const; diff --git a/TAO/tao/ServicesC.h b/TAO/tao/ServicesC.h index d137d8282ab..f1f44684c18 100644 --- a/TAO/tao/ServicesC.h +++ b/TAO/tao/ServicesC.h @@ -41,7 +41,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/TAO_Export.h" -#include "tao/ORB.h" #include "tao/Environment.h" #include "tao/Sequence_T.h" #include "tao/Seq_Var_T.h" @@ -156,8 +155,7 @@ namespace CORBA typedef TAO_Out_T< - ServiceDetail, - ServiceDetail_var + ServiceDetail > ServiceDetail_out; @@ -231,8 +229,7 @@ namespace CORBA typedef TAO_Out_T< - ServiceInformation, - ServiceInformation_var + ServiceInformation > ServiceInformation_out; @@ -242,6 +239,7 @@ namespace CORBA struct TAO_Export ServiceInformation { typedef ServiceInformation_var _var_type; + typedef ServiceInformation_out _out_type; static void _tao_any_destructor (void *); CORBA::ServiceOptionSeq service_options; diff --git a/TAO/tao/Special_Basic_Argument_T.cpp b/TAO/tao/Special_Basic_Argument_T.cpp index 771abdf72d6..0937d62d886 100644 --- a/TAO/tao/Special_Basic_Argument_T.cpp +++ b/TAO/tao/Special_Basic_Argument_T.cpp @@ -12,7 +12,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::marshal (TAO_OutputCDR &cdr) { @@ -21,19 +24,25 @@ TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::marshal (TAO_Outp #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> void TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, from_S (this->x_)); + Insert_Policy<from_S>::any_insert (any, from_S (this->x_)); } #endif /* TAO_HAS_INTERCEPTORS */ // =========================================================== -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::marshal ( TAO_OutputCDR & cdr) @@ -41,7 +50,10 @@ TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::marshal ( return cdr << from_S (this->x_); } -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -52,19 +64,25 @@ TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> void TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, from_S (this->x_)); + Insert_Policy<from_S>::any_insert (any, from_S (this->x_)); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================== -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -75,19 +93,25 @@ TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> void TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, from_S (this->x_)); + Insert_Policy<from_S>::any_insert (any, from_S (this->x_)); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================ -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -98,12 +122,15 @@ TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> void TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, from_S (this->x_)); + Insert_Policy<from_S>::any_insert (any, from_S (this->x_)); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Special_Basic_Argument_T.h b/TAO/tao/Special_Basic_Argument_T.h index b3f1df89e3a..3e2d08848af 100644 --- a/TAO/tao/Special_Basic_Argument_T.h +++ b/TAO/tao/Special_Basic_Argument_T.h @@ -33,8 +33,11 @@ namespace TAO * @brief Template class for IN stub argument of (w)char/boolean/octet. * */ - template<typename S, typename to_S, typename from_S, typename Insert_Policy> - class In_Special_Basic_Argument_T : public InArgument, private Insert_Policy + template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> + class In_Special_Basic_Argument_T : public InArgument { public: In_Special_Basic_Argument_T (S const &); @@ -55,8 +58,11 @@ namespace TAO * @brief Template class for INOUT stub argument of (w)char/boolean/octet. * */ - template<typename S, typename to_S, typename from_S, typename Insert_Policy> - class Inout_Special_Basic_Argument_T : public InoutArgument, private Insert_Policy + template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> + class Inout_Special_Basic_Argument_T : public InoutArgument { public: Inout_Special_Basic_Argument_T (S & x); @@ -78,8 +84,11 @@ namespace TAO * @brief Template class for OUT stub argument of (w)char/boolean/octet. * */ - template<typename S, typename to_S, typename from_S, typename Insert_Policy> - class Out_Special_Basic_Argument_T : public OutArgument, private Insert_Policy + template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> + class Out_Special_Basic_Argument_T : public OutArgument { public: Out_Special_Basic_Argument_T (S & x); @@ -100,8 +109,11 @@ namespace TAO * @brief Template class for return stub value of (w)char/boolean/octet. * */ - template<typename S, typename to_S, typename from_S, typename Insert_Policy> - class Ret_Special_Basic_Argument_T : public RetArgument, private Insert_Policy + template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> + class Ret_Special_Basic_Argument_T : public RetArgument { public: Ret_Special_Basic_Argument_T (void); @@ -133,7 +145,10 @@ namespace TAO * @brief Template class for stub argument traits of (w)char/boolean/octet. * */ - template<typename T, typename to_T, typename from_T, typename Insert_Policy> + template<typename T, + typename to_T, + typename from_T, + template <typename> class Insert_Policy> struct Special_Basic_Arg_Traits_T { typedef T ret_type; diff --git a/TAO/tao/Special_Basic_Argument_T.inl b/TAO/tao/Special_Basic_Argument_T.inl index cf8b7b4e57e..64e86884e4a 100644 --- a/TAO/tao/Special_Basic_Argument_T.inl +++ b/TAO/tao/Special_Basic_Argument_T.inl @@ -4,7 +4,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::In_Special_Basic_Argument_T ( S const & x @@ -12,7 +15,10 @@ TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::In_Special_Basic_ : x_ (x) {} -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE S const & TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) const @@ -22,14 +28,20 @@ TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) const // =========================================================================== -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>:: Inout_Special_Basic_Argument_T (S & x) : x_ (x) {} -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) @@ -39,14 +51,20 @@ TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) // =========================================================================== -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>:: Out_Special_Basic_Argument_T (S & x) : x_ (x) {} -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) @@ -56,14 +74,20 @@ TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) // =========================================================================== -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>:: Ret_Special_Basic_Argument_T (void) { } -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) @@ -71,7 +95,10 @@ TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::arg (void) return this->x_; } -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::excp (void) @@ -79,7 +106,10 @@ TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::excp (void) return this->x_; } -template<typename S, typename to_S, typename from_S, typename Insert_Policy> +template<typename S, + typename to_S, + typename from_S, + template <typename> class Insert_Policy> ACE_INLINE S TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::retn (void) diff --git a/TAO/tao/Special_Basic_Arguments.h b/TAO/tao/Special_Basic_Arguments.h index ff938db4b58..a2f40dd3f2d 100644 --- a/TAO/tao/Special_Basic_Arguments.h +++ b/TAO/tao/Special_Basic_Arguments.h @@ -41,7 +41,7 @@ namespace TAO : public Special_Basic_Arg_Traits_T<CORBA::Char, ACE_InputCDR::to_char, ACE_OutputCDR::from_char, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <ACE_OutputCDR::from_char> > + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; @@ -50,7 +50,7 @@ namespace TAO : public Special_Basic_Arg_Traits_T<CORBA::WChar, ACE_InputCDR::to_wchar, ACE_OutputCDR::from_wchar, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <ACE_OutputCDR::from_wchar> > + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; @@ -59,7 +59,7 @@ namespace TAO : public Special_Basic_Arg_Traits_T<CORBA::Octet, ACE_InputCDR::to_octet, ACE_OutputCDR::from_octet, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <ACE_OutputCDR::from_octet> > + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; @@ -68,7 +68,7 @@ namespace TAO : public Special_Basic_Arg_Traits_T<CORBA::Boolean, ACE_InputCDR::to_boolean, ACE_OutputCDR::from_boolean, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <ACE_OutputCDR::from_boolean> > + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; } diff --git a/TAO/tao/StringSeqC.h b/TAO/tao/StringSeqC.h index 5a9ebf566c0..16e875d21b1 100644 --- a/TAO/tao/StringSeqC.h +++ b/TAO/tao/StringSeqC.h @@ -90,7 +90,7 @@ namespace CORBA StringSeq ( CORBA::ULong max, CORBA::ULong length, - char ** buffer, + ::CORBA::Char ** buffer, CORBA::Boolean release = false ); StringSeq (const StringSeq &); diff --git a/TAO/tao/String_Sequence_Element_T.h b/TAO/tao/String_Sequence_Element_T.h index 245b652b92f..9d7a2bec549 100644 --- a/TAO/tao/String_Sequence_Element_T.h +++ b/TAO/tao/String_Sequence_Element_T.h @@ -93,7 +93,11 @@ public: inline operator const_value_type() const { - return *element_; + return *this->element_; + } + + inline const character_type *in (void) const { + return *this->element_; } void swap(string_sequence_element & rhs) @@ -104,7 +108,7 @@ public: CORBA::Boolean release() const { - return release_; + return this->release_; } private: diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp index 67f196cbc05..270a0562088 100644 --- a/TAO/tao/Transport_Cache_Manager.cpp +++ b/TAO/tao/Transport_Cache_Manager.cpp @@ -195,7 +195,7 @@ namespace TAO } else { - transport->wait_strategy ()->is_registered (0); + transport->wait_strategy ()->is_registered (false); } } } @@ -266,8 +266,8 @@ namespace TAO if (TAO_debug_level > 4) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Transport_Cache_Manager::find_i, " - "at index %d (Transport[%d]) - idle\n", + ACE_TEXT("TAO (%P|%t) - Transport_Cache_Manager::find_i, ") + ACE_TEXT("at index %d (Transport[%d]) - idle\n"), entry->ext_id_.index (), entry->int_id_.transport ()->id ())); } @@ -277,8 +277,8 @@ namespace TAO else if (TAO_debug_level > 6) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Transport_Cache_Manager::find_i, " - "at index %d (Transport[%d]) - not idle\n", + ACE_TEXT("TAO (%P|%t) - Transport_Cache_Manager::find_i, ") + ACE_TEXT("at index %d (Transport[%d]) - not idle\n"), entry->ext_id_.index (), entry->int_id_.transport ()->id ())); } @@ -451,8 +451,8 @@ namespace TAO if (TAO_debug_level) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Transport_Cache_Manager::is_entry_idle, " - "state is [%d]\n", + ACE_TEXT("TAO (%P|%t) - Transport_Cache_Manager::is_entry_idle, ") + ACE_TEXT("state is [%d]\n"), entry_state)); } @@ -618,8 +618,8 @@ namespace TAO if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Transport_Cache_Manager::fill_set_i, " - "current_size = %d, cache_maximum = %d\n", + ACE_TEXT("TAO (%P|%t) - Transport_Cache_Manager::fill_set_i, ") + ACE_TEXT("current_size = %d, cache_maximum = %d\n"), current_size, cache_maximum)); } @@ -655,9 +655,9 @@ namespace TAO if (TAO_debug_level > 2) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Transport_Cache_Manager" - "::wait_for_connection, " - "entering wait loop\n")); + ACE_TEXT("TAO (%P|%t) - Transport_Cache_Manager") + ACE_TEXT("::wait_for_connection, ") + ACE_TEXT("entering wait loop\n"))); } int ready_togo = 0; @@ -673,8 +673,8 @@ namespace TAO if (TAO_debug_level > 2) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Transport_Cache_Manager::wait_for_connection, " - "left wait loop\n")); + ACE_TEXT("TAO (%P|%t) - Transport_Cache_Manager::wait_for_connection, ") + ACE_TEXT("left wait loop\n"))); } // We are not waiting anymore diff --git a/TAO/tao/UB_String_Argument_T.cpp b/TAO/tao/UB_String_Argument_T.cpp index e1d6e7c0ffd..cfc980a4452 100644 --- a/TAO/tao/UB_String_Argument_T.cpp +++ b/TAO/tao/UB_String_Argument_T.cpp @@ -12,7 +12,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_UB_String_Argument_T<S_var,Insert_Policy>::marshal ( TAO_OutputCDR &cdr @@ -23,20 +24,22 @@ TAO::In_UB_String_Argument_T<S_var,Insert_Policy>::marshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> void TAO::In_UB_String_Argument_T<S_var,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<typename S_var::s_traits::char_type const *>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // =========================================================== -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::marshal ( TAO_OutputCDR &cdr @@ -45,7 +48,8 @@ TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::marshal ( return cdr << this->x_; } -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -57,20 +61,22 @@ TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> void TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S const *>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================== -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -79,20 +85,22 @@ TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::demarshal (TAO_InputCDR & cd #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> void TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S const *>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================ -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::demarshal (TAO_InputCDR & cdr) { @@ -101,12 +109,13 @@ TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::demarshal (TAO_InputCDR & cd #if TAO_HAS_INTERCEPTORS == 1 -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> void TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_.in ()); + Insert_Policy<typename S_var::s_traits::char_type const *>::any_insert (any, this->x_.in ()); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/UB_String_Argument_T.h b/TAO/tao/UB_String_Argument_T.h index 26ca05845ad..91a1cb04040 100644 --- a/TAO/tao/UB_String_Argument_T.h +++ b/TAO/tao/UB_String_Argument_T.h @@ -32,8 +32,9 @@ namespace TAO * @brief Template class for IN unbounded (w)string argument. * */ - template<typename S_var, typename Insert_Policy> - class In_UB_String_Argument_T : public InArgument, private Insert_Policy + template<typename S_var, + template <typename> class Insert_Policy> + class In_UB_String_Argument_T : public InArgument { public: In_UB_String_Argument_T (const typename S_var::s_traits::char_type * x); @@ -54,8 +55,9 @@ namespace TAO * @brief Template class for INOUT unbounded (w)string argument. * */ - template<typename S_var, typename Insert_Policy> - class Inout_UB_String_Argument_T : public InoutArgument, private Insert_Policy + template<typename S_var, + template <typename> class Insert_Policy> + class Inout_UB_String_Argument_T : public InoutArgument { public: Inout_UB_String_Argument_T (typename S_var::s_traits::char_type *& x); @@ -77,8 +79,9 @@ namespace TAO * @brief Template class for OUT unbounded (w)string argument. * */ - template<typename S_var, typename Insert_Policy> - class Out_UB_String_Argument_T : public OutArgument, private Insert_Policy + template<typename S_var, + template <typename> class Insert_Policy> + class Out_UB_String_Argument_T : public OutArgument { public: Out_UB_String_Argument_T (typename S_var::s_traits::string_out & x); @@ -99,8 +102,9 @@ namespace TAO * @brief Template class for return stub value of ub (w)string argument. * */ - template<typename S_var, typename Insert_Policy> - class Ret_UB_String_Argument_T : public RetArgument, private Insert_Policy + template<typename S_var, + template <typename> class Insert_Policy> + class Ret_UB_String_Argument_T : public RetArgument { public: Ret_UB_String_Argument_T (void); @@ -123,7 +127,8 @@ namespace TAO * @brief Template class for argument traits of unbounded (w)strings. * */ - template<typename T_var, typename Insert_Policy> + template<typename T_var, + template <typename> class Insert_Policy> struct UB_String_Arg_Traits_T { typedef typename T_var::s_traits::char_type * ret_type; diff --git a/TAO/tao/UB_String_Argument_T.inl b/TAO/tao/UB_String_Argument_T.inl index 373500a50fe..7ef09bb7277 100644 --- a/TAO/tao/UB_String_Argument_T.inl +++ b/TAO/tao/UB_String_Argument_T.inl @@ -4,14 +4,16 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE TAO::In_UB_String_Argument_T<S_var,Insert_Policy>::In_UB_String_Argument_T ( const typename S_var::s_traits::char_type * x) : x_ (x) {} -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE const typename S_var::s_traits::char_type * TAO::In_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) const @@ -21,7 +23,8 @@ TAO::In_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) const // ========================================================================== -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::Inout_UB_String_Argument_T ( typename S_var::s_traits::char_type *& x @@ -29,7 +32,8 @@ TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::Inout_UB_String_Argument_T : x_ (x) {} -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type *& TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) @@ -39,7 +43,8 @@ TAO::Inout_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) // ========================================================================== -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::Out_UB_String_Argument_T ( typename S_var::s_traits::string_out & x @@ -47,7 +52,8 @@ TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::Out_UB_String_Argument_T ( : x_ (x.ptr ()) {} -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type *& TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) @@ -57,12 +63,14 @@ TAO::Out_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) // ========================================================================== -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::Ret_UB_String_Argument_T (void) {} -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type *& TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) @@ -70,7 +78,8 @@ TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::arg (void) return this->x_.out (); } -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type * TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::excp (void) @@ -78,7 +87,8 @@ TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::excp (void) return this->x_.ptr (); } -template<typename S_var, typename Insert_Policy> +template<typename S_var, + template <typename> class Insert_Policy> ACE_INLINE typename S_var::s_traits::char_type * TAO::Ret_UB_String_Argument_T<S_var,Insert_Policy>::retn (void) diff --git a/TAO/tao/UB_String_Arguments.h b/TAO/tao/UB_String_Arguments.h index 5d792c43509..8e240aeba91 100644 --- a/TAO/tao/UB_String_Arguments.h +++ b/TAO/tao/UB_String_Arguments.h @@ -36,19 +36,15 @@ namespace TAO template<> class TAO_Export Arg_Traits<CORBA::Char *> - : public UB_String_Arg_Traits_T< - CORBA::String_var, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Char const *> - > + : public UB_String_Arg_Traits_T<CORBA::String_var, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; template<> class TAO_Export Arg_Traits<CORBA::WChar *> - : public UB_String_Arg_Traits_T< - CORBA::WString_var, - TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::WChar const *> - > + : public UB_String_Arg_Traits_T<CORBA::WString_var, + TAO::Any_Insert_Policy_AnyTypeCode_Adapter> { }; } diff --git a/TAO/tao/VarOut_T.h b/TAO/tao/VarOut_T.h index 904938e35b7..358d7371b26 100644 --- a/TAO/tao/VarOut_T.h +++ b/TAO/tao/VarOut_T.h @@ -129,15 +129,17 @@ public: * and exceptions.. * */ -template<typename T, typename T_var> +template<typename T> class TAO_Out_T { public: + typedef typename T::_var_type T_var; + TAO_Out_T (T *&); TAO_Out_T (T_var &); - TAO_Out_T (const TAO_Out_T<T,T_var> &); + TAO_Out_T (const TAO_Out_T<T> &); - TAO_Out_T &operator= (const TAO_Out_T<T,T_var> &); + TAO_Out_T &operator= (const TAO_Out_T<T> &); TAO_Out_T &operator= (T *); operator T *& (); diff --git a/TAO/tao/VarOut_T.inl b/TAO/tao/VarOut_T.inl index 8eab1e1277d..cd6c1bb8301 100644 --- a/TAO/tao/VarOut_T.inl +++ b/TAO/tao/VarOut_T.inl @@ -198,66 +198,66 @@ TAO_Var_Var_T<T>::_retn (void) // ************************************************************* -template<typename T, typename T_var> +template<typename T> ACE_INLINE -TAO_Out_T<T,T_var>::TAO_Out_T (T *& p) +TAO_Out_T<T>::TAO_Out_T (T *& p) : ptr_ (p) { this->ptr_ = 0; } -template<typename T, typename T_var> +template<typename T> ACE_INLINE -TAO_Out_T<T,T_var>::TAO_Out_T (T_var & p) +TAO_Out_T<T>::TAO_Out_T (T_var & p) : ptr_ (p.out ()) { delete this->ptr_; this->ptr_ = 0; } -template<typename T, typename T_var> +template<typename T> ACE_INLINE -TAO_Out_T<T,T_var>::TAO_Out_T (const TAO_Out_T<T,T_var> & p) +TAO_Out_T<T>::TAO_Out_T (const TAO_Out_T<T> & p) : ptr_ (p.ptr_) {} -template<typename T, typename T_var> +template<typename T> ACE_INLINE -TAO_Out_T<T,T_var> & -TAO_Out_T<T,T_var>::operator= (const TAO_Out_T<T,T_var> & p) +TAO_Out_T<T> & +TAO_Out_T<T>::operator= (const TAO_Out_T<T> & p) { this->ptr_ = p.ptr_; return *this; } -template<typename T, typename T_var> +template<typename T> ACE_INLINE -TAO_Out_T<T,T_var> & -TAO_Out_T<T,T_var>::operator= (T * p) +TAO_Out_T<T> & +TAO_Out_T<T>::operator= (T * p) { this->ptr_ = p; return *this; } -template<typename T, typename T_var> +template<typename T> ACE_INLINE -TAO_Out_T<T,T_var>::operator T *& () +TAO_Out_T<T>::operator T *& () { return this->ptr_; } -template<typename T, typename T_var> +template<typename T> ACE_INLINE T *& -TAO_Out_T<T,T_var>::ptr (void) +TAO_Out_T<T>::ptr (void) { return this->ptr_; } -template<typename T, typename T_var> +template<typename T> ACE_INLINE T * -TAO_Out_T<T,T_var>::operator-> (void) +TAO_Out_T<T>::operator-> (void) { return this->ptr_; } diff --git a/TAO/tao/Var_Array_Argument_T.cpp b/TAO/tao/Var_Array_Argument_T.cpp index 5c34336b9e2..972426b393b 100644 --- a/TAO/tao/Var_Array_Argument_T.cpp +++ b/TAO/tao/Var_Array_Argument_T.cpp @@ -12,7 +12,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::marshal ( TAO_OutputCDR & cdr @@ -24,12 +24,12 @@ TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::marshal ( #if TAO_HAS_INTERCEPTORS == 1 template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_forany>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ @@ -37,7 +37,7 @@ TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::interceptor_value ( // =========================================================== template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::marshal ( TAO_OutputCDR & cdr @@ -47,7 +47,7 @@ TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::marshal ( } template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -59,12 +59,12 @@ TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::interceptor_value ( CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, this->x_); + Insert_Policy<S_forany>::any_insert (any, this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ @@ -73,7 +73,7 @@ TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::interceptor_value ( template<typename S_out, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -91,13 +91,13 @@ TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>::demarshal ( template<typename S_out, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { S_forany tmp (this->x_); - this->Insert_Policy::any_insert (any, tmp); + Insert_Policy<S_forany>::any_insert (any, tmp); } #endif /* TAO_HAS_INTERCEPTORS */ @@ -106,7 +106,7 @@ interceptor_value (CORBA::Any *any) const template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -126,12 +126,12 @@ TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::demarshal ( template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> void TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>:: interceptor_value (CORBA::Any *any) const { - this->Insert_Policy::any_insert (any, S_forany (this->x_.ptr ())); + Insert_Policy<S_forany>::any_insert (any, S_forany (this->x_.ptr ())); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Var_Array_Argument_T.h b/TAO/tao/Var_Array_Argument_T.h index 00f8c3bf8b6..cf5c2a8f5e3 100644 --- a/TAO/tao/Var_Array_Argument_T.h +++ b/TAO/tao/Var_Array_Argument_T.h @@ -31,9 +31,10 @@ namespace TAO * @brief IN stub argument of variable size element array. * */ +<<<<<<< Var_Array_Argument_T.h template<typename S_forany, - typename Insert_Policy> - class In_Var_Array_Argument_T : public InArgument, private Insert_Policy + template <typename> class Insert_Policy> + class In_Var_Array_Argument_T : public InArgument { public: In_Var_Array_Argument_T (const typename S_forany::_slice_type * x); @@ -55,8 +56,8 @@ namespace TAO * */ template<typename S_forany, - typename Insert_Policy> - class Inout_Var_Array_Argument_T : public InoutArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Inout_Var_Array_Argument_T : public InoutArgument { public: Inout_Var_Array_Argument_T (typename S_forany::_slice_type *&x); @@ -80,8 +81,8 @@ namespace TAO */ template<typename S_out, typename S_forany, - typename Insert_Policy> - class Out_Var_Array_Argument_T : public OutArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Out_Var_Array_Argument_T : public OutArgument { public: Out_Var_Array_Argument_T (S_out x); @@ -104,8 +105,8 @@ namespace TAO */ template<typename S_var, typename S_forany, - typename Insert_Policy> - class Ret_Var_Array_Argument_T : public RetArgument, private Insert_Policy + template <typename> class Insert_Policy> + class Ret_Var_Array_Argument_T : public RetArgument { public: Ret_Var_Array_Argument_T (void); @@ -121,6 +122,9 @@ namespace TAO private: S_var x_; +#if TAO_HAS_INTERCEPTORS == 1 + Insert_Policy <S> insert_policy_; +#endif /* TAO_HAS_INTERCEPTORS == 1 */ }; /** @@ -131,7 +135,7 @@ namespace TAO */ template<typename T_out, typename T_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> struct Var_Array_Arg_Traits_T { typedef typename T_forany::_slice_type * ret_type; diff --git a/TAO/tao/Var_Array_Argument_T.inl b/TAO/tao/Var_Array_Argument_T.inl index acd2eabfc92..7ef5373f364 100644 --- a/TAO/tao/Var_Array_Argument_T.inl +++ b/TAO/tao/Var_Array_Argument_T.inl @@ -5,7 +5,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>:: In_Var_Array_Argument_T (const typename S_forany::_slice_type * x) @@ -14,7 +14,7 @@ In_Var_Array_Argument_T (const typename S_forany::_slice_type * x) } template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type const * TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::arg (void) const @@ -25,7 +25,7 @@ TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::arg (void) const // ========================================================================== template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>:: Inout_Var_Array_Argument_T (typename S_forany::_slice_type *&x) @@ -34,7 +34,7 @@ Inout_Var_Array_Argument_T (typename S_forany::_slice_type *&x) } template<typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type * TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::arg (void) @@ -46,7 +46,7 @@ TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::arg (void) template<typename S_out, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>:: Out_Var_Array_Argument_T (S_out x) @@ -56,7 +56,7 @@ Out_Var_Array_Argument_T (S_out x) template<typename S_out, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type *& TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>::arg (void) @@ -68,7 +68,7 @@ TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>::arg (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>:: Ret_Var_Array_Argument_T (void) @@ -76,7 +76,7 @@ Ret_Var_Array_Argument_T (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type *& TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::arg (void) @@ -86,7 +86,7 @@ TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::arg (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type * TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::excp (void) @@ -96,7 +96,7 @@ TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::excp (void) template<typename S_var, typename S_forany, - typename Insert_Policy> + template <typename> class Insert_Policy> ACE_INLINE typename S_forany::_slice_type * TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::retn (void) diff --git a/TAO/tao/Var_Size_Argument_T.cpp b/TAO/tao/Var_Size_Argument_T.cpp index 02a82fbd4fc..0dea62890b2 100644 --- a/TAO/tao/Var_Size_Argument_T.cpp +++ b/TAO/tao/Var_Size_Argument_T.cpp @@ -11,7 +11,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::In_Var_Size_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr) { @@ -20,20 +21,22 @@ TAO::In_Var_Size_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr) #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::In_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, *this->x_); + Insert_Policy<S>::any_insert (any, *this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // =========================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::marshal ( TAO_OutputCDR &cdr @@ -42,7 +45,8 @@ TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::marshal ( return cdr << *this->x_; } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -53,20 +57,22 @@ TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, *this->x_); + Insert_Policy<S>::any_insert (any, *this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -78,20 +84,22 @@ TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, *this->x_); + Insert_Policy<S>::any_insert (any, *this->x_); } #endif /* TAO_HAS_INTERCEPTORS */ // ============================================================ -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::demarshal ( TAO_InputCDR & cdr @@ -107,13 +115,14 @@ TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::demarshal ( #if TAO_HAS_INTERCEPTORS == 1 -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> void TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::interceptor_value ( CORBA::Any *any ) const { - this->Insert_Policy::any_insert (any, this->x_.in ()); + Insert_Policy<S>::any_insert (any, this->x_.in ()); } #endif /* TAO_HAS_INTERCEPTORS */ diff --git a/TAO/tao/Var_Size_Argument_T.h b/TAO/tao/Var_Size_Argument_T.h index e819674efd8..66fe8be82b9 100644 --- a/TAO/tao/Var_Size_Argument_T.h +++ b/TAO/tao/Var_Size_Argument_T.h @@ -31,8 +31,9 @@ namespace TAO * @brief Template class for IN stub argument of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class In_Var_Size_Argument_T : public InArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class In_Var_Size_Argument_T : public InArgument { public: In_Var_Size_Argument_T (S const & x); @@ -45,6 +46,9 @@ namespace TAO private: const S * x_; +#if TAO_HAS_INTERCEPTORS == 1 + Insert_Policy <S> insert_policy_; +#endif /* TAO_HAS_INTERCEPTORS == 1 */ }; /** @@ -53,8 +57,9 @@ namespace TAO * @brief Template class for INOUT stub argument of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class Inout_Var_Size_Argument_T : public InoutArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Inout_Var_Size_Argument_T : public InoutArgument { public: Inout_Var_Size_Argument_T (S & x); @@ -76,8 +81,9 @@ namespace TAO * @brief Template class for OUT stub argument of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class Out_Var_Size_Argument_T : public OutArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Out_Var_Size_Argument_T : public OutArgument { public: Out_Var_Size_Argument_T (typename S::_out_type x); @@ -98,8 +104,9 @@ namespace TAO * @brief Template class for return stub value of fixed size IDL types. * */ - template<typename S, typename Insert_Policy> - class Ret_Var_Size_Argument_T : public RetArgument, private Insert_Policy + template<typename S, + template <typename> class Insert_Policy> + class Ret_Var_Size_Argument_T : public RetArgument { public: Ret_Var_Size_Argument_T (void); @@ -124,7 +131,8 @@ namespace TAO * variable size IDL types. * */ - template<typename T, typename Insert_Policy> + template<typename T, + template <typename> class Insert_Policy> struct Var_Size_Arg_Traits_T { typedef T * ret_type; diff --git a/TAO/tao/Var_Size_Argument_T.inl b/TAO/tao/Var_Size_Argument_T.inl index 2ccdef9db16..b70b5d6905c 100644 --- a/TAO/tao/Var_Size_Argument_T.inl +++ b/TAO/tao/Var_Size_Argument_T.inl @@ -4,14 +4,16 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::In_Var_Size_Argument_T<S,Insert_Policy>::In_Var_Size_Argument_T (S const & x) : x_ (&x) { } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE const S & TAO::In_Var_Size_Argument_T<S,Insert_Policy>::arg (void) const @@ -21,14 +23,16 @@ TAO::In_Var_Size_Argument_T<S,Insert_Policy>::arg (void) const // ========================================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::Inout_Var_Size_Argument_T (S & x) : x_ (&x) { } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S & TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::arg (void) @@ -38,7 +42,8 @@ TAO::Inout_Var_Size_Argument_T<S,Insert_Policy>::arg (void) // ========================================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::Out_Var_Size_Argument_T ( typename S::_out_type x @@ -46,7 +51,8 @@ TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::Out_Var_Size_Argument_T ( : x_ (x.ptr ()) {} -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S *& TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::arg (void) @@ -56,13 +62,15 @@ TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::arg (void) // ========================================================================== -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::Ret_Var_Size_Argument_T (void) { } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S *& TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::arg (void) @@ -70,7 +78,8 @@ TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::arg (void) return this->x_.out (); } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S * TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::excp (void) @@ -78,7 +87,8 @@ TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::excp (void) return this->x_.ptr (); } -template<typename S, typename Insert_Policy> +template<typename S, + template <typename> class Insert_Policy> ACE_INLINE S * TAO::Ret_Var_Size_Argument_T<S,Insert_Policy>::retn (void) diff --git a/TAO/tao/WCharSeqC.cpp b/TAO/tao/WCharSeqC.cpp index 7d9e6cff8ce..6b2ce20b7bd 100644 --- a/TAO/tao/WCharSeqC.cpp +++ b/TAO/tao/WCharSeqC.cpp @@ -26,24 +26,28 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// be\be_codegen.cpp:277 +// be\be_codegen.cpp:282 -#include "tao/WCharSeqC.h" +#include "WCharSeqC.h" #include "tao/CDR.h" // TAO_IDL - Generated from -// be\be_visitor_arg_traits.cpp:70 - +// be\be_visitor_arg_traits.cpp:71 TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + // Arg traits specializations. namespace TAO { } +TAO_END_VERSIONED_NAMESPACE_DECL -// TAO_IDL - Generated from + + +// TAO_IDL - Generated from // be\be_visitor_sequence/sequence_cs.cpp:65 #if !defined (_CORBA_WCHARSEQ_CS_) @@ -98,10 +102,11 @@ void CORBA::WCharSeq::_tao_any_destructor ( // TAO_IDL - Generated from // be\be_visitor_sequence/cdr_op_cs.cpp:96 - #if !defined _TAO_CDR_OP_CORBA_WCharSeq_CPP_ #define _TAO_CDR_OP_CORBA_WCharSeq_CPP_ +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + ::CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA::WCharSeq &_tao_sequence @@ -118,6 +123,7 @@ void CORBA::WCharSeq::_tao_any_destructor ( return TAO::demarshal_sequence(strm, _tao_sequence); } +TAO_END_VERSIONED_NAMESPACE_DECL + #endif /* _TAO_CDR_OP_CORBA_WCharSeq_CPP_ */ -TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/WCharSeqC.h b/TAO/tao/WCharSeqC.h index 380cd8a7faa..f10ebbac8c6 100644 --- a/TAO/tao/WCharSeqC.h +++ b/TAO/tao/WCharSeqC.h @@ -41,11 +41,11 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/TAO_Export.h" -#include "tao/ORB.h" #include "tao/Environment.h" #include "tao/Sequence_T.h" #include "tao/Seq_Var_T.h" #include "tao/Seq_Out_T.h" +#include "tao/Versioned_Namespace.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -55,6 +55,7 @@ // TAO_IDL - Generated from // be\be_visitor_module/module_ch.cpp:49 + TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace CORBA @@ -96,7 +97,7 @@ namespace CORBA ::CORBA::Boolean release = false ); WCharSeq (const WCharSeq &); - ~WCharSeq (void); + virtual ~WCharSeq (void); static void _tao_any_destructor (void *); @@ -107,40 +108,52 @@ namespace CORBA #endif /* end #if !defined */ // TAO_IDL - Generated from -// be\be_visitor_module/module_ch.cpp:78 +// be\be_visitor_module/module_ch.cpp:82 } // module CORBA +TAO_END_VERSIONED_NAMESPACE_DECL + + // TAO_IDL - Generated from -// be\be_visitor_traits.cpp:61 +// be\be_visitor_traits.cpp:63 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + // Traits specializations. namespace TAO { } +TAO_END_VERSIONED_NAMESPACE_DECL + + // TAO_IDL - Generated from // be\be_visitor_sequence/cdr_op_ch.cpp:71 #if !defined _TAO_CDR_OP_CORBA_WCharSeq_H_ #define _TAO_CDR_OP_CORBA_WCharSeq_H_ +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + TAO_Export ::CORBA::Boolean operator<< ( - TAO_OutputCDR &, - const CORBA::WCharSeq & + TAO_OutputCDR &strm, + const CORBA::WCharSeq &_tao_sequence ); TAO_Export ::CORBA::Boolean operator>> ( - TAO_InputCDR &, - CORBA::WCharSeq & + TAO_InputCDR &strm, + CORBA::WCharSeq &_tao_sequence ); +TAO_END_VERSIONED_NAMESPACE_DECL -#endif /* _TAO_CDR_OP_CORBA_WCharSeq_H_ */ -// TAO_IDL - Generated from -// be\be_codegen.cpp:1040 -TAO_END_VERSIONED_NAMESPACE_DECL +#endif /* _TAO_CDR_OP_CORBA_WCharSeq_H_ */ +// TAO_IDL - Generated from +// be\be_codegen.cpp:1092 #include /**/ "ace/post.h" #endif /* ifndef */ diff --git a/TAO/tao/Wait_On_Leader_Follower.cpp b/TAO/tao/Wait_On_Leader_Follower.cpp index b8935c80af6..90b9d41df88 100644 --- a/TAO/tao/Wait_On_Leader_Follower.cpp +++ b/TAO/tao/Wait_On_Leader_Follower.cpp @@ -25,7 +25,7 @@ TAO_Wait_On_Leader_Follower::~TAO_Wait_On_Leader_Follower (void) int TAO_Wait_On_Leader_Follower::register_handler (void) { - if (this->is_registered_ == 0) + if (!this->is_registered_) { return this->transport_->register_handler (); } @@ -44,7 +44,7 @@ TAO_Wait_On_Leader_Follower::sending_request (TAO_ORB_Core *orb_core, int two_way) { // Register the handler. - if (this->is_registered_ == 0) + if (!this->is_registered_) { this->transport_->register_handler (); } diff --git a/TAO/tao/Wait_On_Reactor.cpp b/TAO/tao/Wait_On_Reactor.cpp index de3cc031952..23c5d59df66 100644 --- a/TAO/tao/Wait_On_Reactor.cpp +++ b/TAO/tao/Wait_On_Reactor.cpp @@ -98,7 +98,7 @@ TAO_Wait_On_Reactor::wait (ACE_Time_Value *max_wait_time, int TAO_Wait_On_Reactor::register_handler (void) { - if (this->is_registered_ == 0) + if (!this->is_registered_) { return this->transport_->register_handler (); } diff --git a/TAO/tao/Wait_On_Read.cpp b/TAO/tao/Wait_On_Read.cpp index e510aee3f81..a3c641d9579 100644 --- a/TAO/tao/Wait_On_Read.cpp +++ b/TAO/tao/Wait_On_Read.cpp @@ -104,7 +104,7 @@ TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time, this->transport_->id ())); } - this->is_registered_ = 1; + this->is_registered_ = true; return 0; } diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index efbcc303399..73fda58a00f 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -2,8 +2,8 @@ #include "tao/Wait_Strategy.h" -ACE_RCSID (tao, - Wait_Strategy, +ACE_RCSID (tao, + Wait_Strategy, "$Id$") #if !defined (__ACE_INLINE__) @@ -16,7 +16,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Constructor. TAO_Wait_Strategy::TAO_Wait_Strategy (TAO_Transport *transport) : transport_ (transport), - is_registered_ (0) + is_registered_ (false) { } diff --git a/TAO/tao/Wait_Strategy.h b/TAO/tao/Wait_Strategy.h index d2818275714..d88c5e258bd 100644 --- a/TAO/tao/Wait_Strategy.h +++ b/TAO/tao/Wait_Strategy.h @@ -81,10 +81,10 @@ public: virtual bool can_process_upcalls (void) const = 0; /// Get method for the flag - int is_registered (void); + bool is_registered (void) const; /// Set method for the flag - void is_registered (int flag); + void is_registered (bool flag); protected: /// Transport object. @@ -92,8 +92,8 @@ protected: /// Flag to indicate whether the service handler that created the /// above transport has been registered with the reactor or not. The - /// default is 0. - int is_registered_; + /// default is false. + bool is_registered_; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Wait_Strategy.inl b/TAO/tao/Wait_Strategy.inl index cdb275b9f12..c39b083c95e 100644 --- a/TAO/tao/Wait_Strategy.inl +++ b/TAO/tao/Wait_Strategy.inl @@ -1,14 +1,17 @@ //$Id$ -ACE_INLINE int -TAO_Wait_Strategy::is_registered (void) +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE bool +TAO_Wait_Strategy::is_registered (void) const { return this->is_registered_; } ACE_INLINE void -TAO_Wait_Strategy::is_registered (int flag) +TAO_Wait_Strategy::is_registered (bool flag) { this->is_registered_ = flag; } +TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp index 3986ee1e040..988b98a3f6d 100644 --- a/TAO/tao/default_resource.cpp +++ b/TAO/tao/default_resource.cpp @@ -17,6 +17,7 @@ #include "tao/Codeset_Manager.h" #include "tao/Null_Fragmentation_Strategy.h" #include "tao/On_Demand_Fragmentation_Strategy.h" +#include "tao/MMAP_Allocator.h" #include "ace/TP_Reactor.h" #include "ace/Dynamic_Service.h" @@ -32,7 +33,6 @@ ACE_RCSID (tao, default_resource, "$Id$") - TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) @@ -48,6 +48,11 @@ TAO_Default_Resource_Factory::TAO_Default_Resource_Factory (void) , dynamically_allocated_reactor_ (0) , options_processed_ (0) , factory_disabled_ (0) +#if TAO_USE_OUTPUT_CDR_MMAP_MEMORY_POOL == 1 + , output_cdr_allocator_type_ (MMAP_ALLOCATOR) +#else + , output_cdr_allocator_type_ (DEFAULT) +#endif #if TAO_USE_LOCAL_MEMORY_POOL == 1 , use_local_memory_pool_ (true) #else @@ -127,8 +132,6 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) ++curarg; - - if (curarg == (argc-1) && this->parser_names_count_ != 0) { // This is the last loop.. @@ -477,6 +480,53 @@ TAO_Default_Resource_Factory::init (int argc, ACE_TCHAR *argv[]) this->report_option_value_error (ACE_TEXT("-ORBDropRepliesDuringShutdown"), argv[curarg]); } + else if (0 == ACE_OS::strcasecmp (argv[curarg], + ACE_TEXT("-ORBOutputCDRAllocator"))) + { + ++curarg; + + if (curarg < argc) + { + ACE_TCHAR const * const current_arg = argv[curarg]; + + if (ACE_OS::strcasecmp (current_arg, + ACE_TEXT("mmap")) == 0) + { +#ifdef ACE_HAS_SENDFILE + this->output_cdr_allocator_type_ = MMAP_ALLOCATOR; +#else + ACE_DEBUG ((LM_WARNING, + ACE_TEXT ("MMAP allocator unsupport on this platform"))); +#endif /* ACE_HAS_SENDFILE */ + } + else if (ACE_OS::strcasecmp (current_arg, + ACE_TEXT("local_memory_pool")) == 0 + && this->output_cdr_allocator_type_ != DEFAULT) + { + this->output_cdr_allocator_type_ = LOCAL_MEMORY_POOL; + } + else if (ACE_OS::strcasecmp (current_arg, + ACE_TEXT("default")) == 0) + { + this->output_cdr_allocator_type_ = DEFAULT; + } + else + { + this->report_option_value_error ( + ACE_TEXT("-ORBOutputCDRAllocator"), current_arg); + } + } + } + else if (0 == ACE_OS::strcasecmp (argv[curarg], + ACE_TEXT("-ORBZeroCopyWrite"))) + { +#ifdef ACE_HAS_SENDFILE + this->output_cdr_allocator_type_ = MMAP_ALLOCATOR; +#else + ACE_DEBUG ((LM_WARNING, + ACE_TEXT ("Zero copy writes unsupported on this platform\n"))); +#endif /* ACE_HAS_SENDFILE */ + } else if (ACE_OS::strncmp (argv[curarg], ACE_TEXT ("-ORB"), 4) == 0) @@ -792,7 +842,10 @@ typedef ACE_New_Allocator LOCKED_ALLOCATOR_NO_POOL; void TAO_Default_Resource_Factory::use_local_memory_pool (bool flag) { - use_local_memory_pool_ = flag; + this->use_local_memory_pool_ = flag; + + if (this->output_cdr_allocator_type_ == DEFAULT) + this->output_cdr_allocator_type_ = LOCAL_MEMORY_POOL; } ACE_Allocator * @@ -885,18 +938,33 @@ ACE_Allocator * TAO_Default_Resource_Factory::output_cdr_buffer_allocator (void) { ACE_Allocator *allocator = 0; - if (use_local_memory_pool_) - { - ACE_NEW_RETURN (allocator, - LOCKED_ALLOCATOR_POOL, - 0); - } - else - { - ACE_NEW_RETURN (allocator, - LOCKED_ALLOCATOR_NO_POOL, - 0); - } + + switch (this->output_cdr_allocator_type_) + { + case LOCAL_MEMORY_POOL: + ACE_NEW_RETURN (allocator, + LOCKED_ALLOCATOR_POOL, + 0); + + break; + +#ifdef ACE_HAS_SENDFILE + case MMAP_ALLOCATOR: + ACE_NEW_RETURN (allocator, + TAO_MMAP_Allocator, + 0); + + break; +#endif /* ACE_HAS_SENDFILE */ + + case DEFAULT: + default: + ACE_NEW_RETURN (allocator, + LOCKED_ALLOCATOR_NO_POOL, + 0); + + break; + } return allocator; } diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h index 8f022479fc5..9cf29b89be8 100644 --- a/TAO/tao/default_resource.h +++ b/TAO/tao/default_resource.h @@ -216,7 +216,19 @@ protected: /// were processed before (or later). int factory_disabled_; - /// This flag is used to determine whether the cdr allocators + enum Output_CDR_Allocator_Type + { + LOCAL_MEMORY_POOL, +#ifdef ACE_HAS_SENDFILE + MMAP_ALLOCATOR, +#endif /* ACE_HAS_SENDFILE */ + DEFAULT + }; + + /// Type of allocator to use for output CDR buffers. + Output_CDR_Allocator_Type output_cdr_allocator_type_; + + /// This flag is used to determine whether the CDR allocators /// should use the local memory pool or not. bool use_local_memory_pool_; diff --git a/TAO/tao/diffs/Policy_Forward.diff b/TAO/tao/diffs/Policy_Forward.diff deleted file mode 100644 index 2d0e1822f84..00000000000 --- a/TAO/tao/diffs/Policy_Forward.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- orig/Policy_ForwardC.h 2005-04-08 10:17:32.626595200 +0200 -+++ Policy_ForwardC.h 2005-04-08 10:17:41.859872000 +0200 -@@ -41,7 +41,6 @@ - #endif /* ACE_LACKS_PRAGMA_ONCE */ - - #include "tao/TAO_Export.h" --#include "tao/ORB.h" - #include "tao/Environment.h" - #include "tao/Sequence_T.h" - #include "tao/Objref_VarOut_T.h" diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index b6e8ed7613b..a8ab7fcec9c 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -820,6 +820,11 @@ enum TAO_Policy_Scope # define TAO_USE_LOCAL_MEMORY_POOL 1 #endif /* TAO_USE_LOCAL_MEMORY_POOL */ +#if !defined (TAO_USE_OUTPUT_CDR_MMAP_MEMORY_POOL) +# define TAO_USE_OUTPUT_CDR_MMAP_MEMORY_POOL 0 +#endif /* TAO_USE_LOCAL_MEMORY_POOL */ + + TAO_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" |