diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-08-19 08:02:52 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-08-19 08:02:52 +0000 |
commit | d9e7859115ef1d5ec0f1c0a829b697354990a8a4 (patch) | |
tree | 384c03f0891bbd738983cd5477ac803253f7aaee /TAO/tao/BD_String_Argument_T.h | |
parent | 03b65689794604a55162d73e8a5a4ccb5827b307 (diff) | |
download | ATCD-d9e7859115ef1d5ec0f1c0a829b697354990a8a4.tar.gz |
ChangeLogTag Fri Aug 19 07:56:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/BD_String_Argument_T.h')
-rw-r--r-- | TAO/tao/BD_String_Argument_T.h | 84 |
1 files changed, 36 insertions, 48 deletions
diff --git a/TAO/tao/BD_String_Argument_T.h b/TAO/tao/BD_String_Argument_T.h index 20a8e86e45b..7a2fdc4eddd 100644 --- a/TAO/tao/BD_String_Argument_T.h +++ b/TAO/tao/BD_String_Argument_T.h @@ -23,6 +23,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/Argument.h" +#include "tao/Any_Insert_Policy_T.h" namespace TAO { @@ -32,16 +33,20 @@ namespace TAO * @brief Template class for IN bounded (w)string argument. * */ - template<typename S, typename to_S, typename from_S, size_t BOUND> - class In_BD_String_Argument_T : public Argument + template<typename S, + typename to_S, + typename from_S, + size_t BOUND, + typename Insert_Policy> + class In_BD_String_Argument_T : public InArgument, private Insert_Policy { public: In_BD_String_Argument_T (const S * x); - virtual CORBA::Boolean marshal (TAO_OutputCDR &); + virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); #if TAO_HAS_INTERCEPTORS == 1 - virtual void interceptor_param (Dynamic::Parameter &); + virtual void interceptor_value (CORBA::Any *any) const; #endif /* TAO_HAS_INTERCEPTORS == 1 */ S const * arg (void) const; @@ -58,16 +63,20 @@ namespace TAO * @brief Template class for INOUT bounded (w)string argument. * */ - template<typename S, typename to_S, typename from_S, size_t BOUND> - class Inout_BD_String_Argument_T : public Argument + template<typename S, + typename to_S, + typename from_S, + size_t BOUND, + typename Insert_Policy> + class Inout_BD_String_Argument_T : public InoutArgument, private Insert_Policy { public: Inout_BD_String_Argument_T (S *& x); - virtual CORBA::Boolean marshal (TAO_OutputCDR &); + virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); virtual CORBA::Boolean demarshal (TAO_InputCDR &); #if TAO_HAS_INTERCEPTORS == 1 - virtual void interceptor_param (Dynamic::Parameter &); + virtual void interceptor_value (CORBA::Any *any) const; #endif /* TAO_HAS_INTERCEPTORS == 1 */ S *& arg (void); @@ -78,22 +87,23 @@ namespace TAO /** * @class Out_BD_String_Argument_T * - * @brief Template class for INOUT bounded (w)string argument. + * @brief Template class for OUT bounded (w)string argument. * */ template<typename S, typename S_out, typename to_S, typename from_S, - size_t BOUND> - class Out_BD_String_Argument_T : public Argument + size_t BOUND, + typename Insert_Policy> + class Out_BD_String_Argument_T : public OutArgument, private Insert_Policy { public: Out_BD_String_Argument_T (S_out x); virtual CORBA::Boolean demarshal (TAO_InputCDR &); #if TAO_HAS_INTERCEPTORS == 1 - virtual void interceptor_param (Dynamic::Parameter &); + virtual void interceptor_value (CORBA::Any *any) const; #endif /* TAO_HAS_INTERCEPTORS == 1 */ S *& arg (void); @@ -111,15 +121,16 @@ namespace TAO typename S_var, typename to_S, typename from_S, - size_t BOUND> - class Ret_BD_String_Argument_T : public Argument + size_t BOUND, + typename Insert_Policy> + class Ret_BD_String_Argument_T : public RetArgument, private Insert_Policy { public: Ret_BD_String_Argument_T (void); virtual CORBA::Boolean demarshal (TAO_InputCDR &); #if TAO_HAS_INTERCEPTORS == 1 - virtual void interceptor_result (CORBA::Any *); + virtual void interceptor_value (CORBA::Any *any) const; #endif /* TAO_HAS_INTERCEPTORS == 1 */ S *& arg (void); @@ -151,7 +162,8 @@ namespace TAO typename T_out, typename to_T, typename from_T, - size_t BOUND> + size_t BOUND, + typename Insert_Policy> struct BD_String_Arg_Traits_T { typedef T * ret_type; @@ -162,52 +174,28 @@ namespace TAO typedef In_BD_String_Argument_T<T, to_T, from_T, - BOUND> in_arg_val; + BOUND, + Insert_Policy> in_arg_val; typedef Inout_BD_String_Argument_T<T, to_T, from_T, - BOUND> inout_arg_val; + BOUND, + Insert_Policy> inout_arg_val; typedef Out_BD_String_Argument_T<T, T_out, to_T, from_T, - BOUND> out_arg_val; + BOUND, + Insert_Policy> out_arg_val; typedef Ret_BD_String_Argument_T<T, T_var, to_T, from_T, - BOUND> ret_val; + BOUND, + Insert_Policy> ret_val; typedef BD_String_Tag idl_tag; }; - - /** - * - * @brief Specializations for bounded (w)strings - * - */ - - template<size_t BOUND> - class BD_String_Arg_Traits - : public BD_String_Arg_Traits_T<CORBA::Char, - CORBA::String_var, - CORBA::String_out, - ACE_InputCDR::to_string, - ACE_OutputCDR::from_string, - BOUND> - { - }; - - template<size_t BOUND> - class BD_WString_Arg_Traits - : public BD_String_Arg_Traits_T<CORBA::WChar, - CORBA::WString_var, - CORBA::WString_out, - ACE_InputCDR::to_wstring, - ACE_OutputCDR::from_wstring, - BOUND> - { - }; } #if defined (__ACE_INLINE__) |