BD_String_Argument_T.h

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

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