UB_String_Argument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    UB_String_Argument_T.h
00006  *
00007  *  UB_String_Argument_T.h,v 1.11 2006/06/27 06:22:13 jwillemsen Exp
00008  *
00009  *  @author Jeff Parsons
00010  *  @author Carlos O'Ryan
00011  */
00012 //=============================================================================
00013 
00014 #ifndef TAO_UB_STRING_ARGUMENT_T_H
00015 #define TAO_UB_STRING_ARGUMENT_T_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "tao/Argument.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 namespace TAO
00028 {
00029   /**
00030    * @class In_UB_String_Argument_T
00031    *
00032    * @brief Template class for IN unbounded (w)string argument.
00033    *
00034    */
00035   template<typename S_var,
00036            class Insert_Policy>
00037   class In_UB_String_Argument_T : public InArgument
00038   {
00039   public:
00040     In_UB_String_Argument_T (const typename S_var::s_traits::char_type * x);
00041 
00042     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00043 #if TAO_HAS_INTERCEPTORS == 1
00044     virtual void interceptor_value (CORBA::Any *any) const;
00045 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00046     const typename S_var::s_traits::char_type * arg (void) const;
00047 
00048   private:
00049     typename S_var::s_traits::char_type const * x_;
00050   };
00051 
00052   /**
00053    * @class Inout_UB_String_Argument_T
00054    *
00055    * @brief Template class for INOUT unbounded (w)string argument.
00056    *
00057    */
00058   template<typename S_var,
00059            class Insert_Policy>
00060   class Inout_UB_String_Argument_T : public InoutArgument
00061   {
00062   public:
00063     Inout_UB_String_Argument_T (typename S_var::s_traits::char_type *& x);
00064 
00065     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00066     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00067 #if TAO_HAS_INTERCEPTORS == 1
00068     virtual void interceptor_value (CORBA::Any *any) const;
00069 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00070     typename S_var::s_traits::char_type *& arg (void);
00071 
00072   private:
00073     typename S_var::s_traits::char_type *& x_;
00074   };
00075 
00076   /**
00077    * @class Out_UB_String_Argument_T
00078    *
00079    * @brief Template class for OUT unbounded (w)string argument.
00080    *
00081    */
00082   template<typename S_var,
00083            class Insert_Policy>
00084   class Out_UB_String_Argument_T : public OutArgument
00085   {
00086   public:
00087     Out_UB_String_Argument_T (typename S_var::s_traits::string_out & x);
00088 
00089     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00090 #if TAO_HAS_INTERCEPTORS == 1
00091     virtual void interceptor_value (CORBA::Any *any) const;
00092 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00093     typename S_var::s_traits::char_type *& arg (void);
00094 
00095   private:
00096     typename S_var::s_traits::char_type *& x_;
00097   };
00098 
00099   /**
00100    * @class Ret_UB_String_Argument_T
00101    *
00102    * @brief Template class for return stub value of ub (w)string argument.
00103    *
00104    */
00105   template<typename S_var,
00106            class Insert_Policy>
00107   class Ret_UB_String_Argument_T : public RetArgument
00108   {
00109   public:
00110     Ret_UB_String_Argument_T (void);
00111 
00112     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00113 #if TAO_HAS_INTERCEPTORS == 1
00114     virtual void interceptor_value (CORBA::Any *any) const;
00115 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00116     typename S_var::s_traits::char_type *& arg (void);
00117     typename S_var::s_traits::char_type * excp (void);
00118     typename S_var::s_traits::char_type * retn (void);
00119 
00120   private:
00121     S_var x_;
00122   };
00123 
00124   /**
00125    * @struct UB_String_Arg_Traits_T
00126    *
00127    * @brief Template class for argument traits of unbounded (w)strings.
00128    *
00129    */
00130   template<typename T_var,
00131            class Insert_Policy>
00132   struct UB_String_Arg_Traits_T
00133   {
00134     typedef typename T_var::s_traits::char_type *            ret_type;
00135     typedef typename T_var::s_traits::char_type const *      in_type;
00136     typedef typename T_var::s_traits::char_type *&           inout_type;
00137     typedef typename T_var::s_traits::string_out             out_type;
00138 
00139     typedef In_UB_String_Argument_T<T_var, Insert_Policy>    in_arg_val;
00140     typedef Inout_UB_String_Argument_T<T_var, Insert_Policy> inout_arg_val;
00141     typedef Out_UB_String_Argument_T<T_var, Insert_Policy>   out_arg_val;
00142     typedef Ret_UB_String_Argument_T<T_var, Insert_Policy>   ret_val;
00143   };
00144 }
00145 
00146 TAO_END_VERSIONED_NAMESPACE_DECL
00147 
00148 #if defined (__ACE_INLINE__)
00149 #include "tao/UB_String_Argument_T.inl"
00150 #endif /* __ACE_INLINE__ */
00151 
00152 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00153 #include "tao/UB_String_Argument_T.cpp"
00154 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00155 
00156 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00157 #pragma implementation ("UB_String_Argument_T.cpp")
00158 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00159 
00160 #include /**/ "ace/post.h"
00161 
00162 #endif /* TAO_UB_STRING_ARGUMENT_T_H */

Generated on Thu Nov 9 11:54:27 2006 for TAO by doxygen 1.3.6