BD_String_SArgument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    BD_String_SArgument_T.h
00006  *
00007  *  $Id: BD_String_SArgument_T.h 73268 2006-06-27 06:23:42Z jwillemsen $
00008  *
00009  *  @authors Jeff Parsons, Carlos O'Ryan and Ossama Othman
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_BD_STRING_SARGUMENT_T_H
00015 #define TAO_BD_STRING_SARGUMENT_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_SArgument_T
00034    *
00035    * @brief Template class for IN skeleton bd (w)string argument.
00036    *
00037    */
00038   template<typename S_var,
00039            size_t BOUND,
00040            class Insert_Policy>
00041   class In_BD_String_SArgument_T : public InArgument
00042   {
00043   public:
00044     In_BD_String_SArgument_T (void);
00045 
00046     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00047 #if TAO_HAS_INTERCEPTORS == 1
00048     virtual void interceptor_value (CORBA::Any *any) const;
00049 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00050     const typename S_var::s_traits::char_type * arg (void) const;
00051 
00052   private:
00053     S_var x_;
00054   };
00055 
00056   /**
00057    * @class Inout_BD_String_SArgument_T
00058    *
00059    * @brief Template class for INOUT skeleton bd (w)string argument.
00060    *
00061    */
00062   template<typename S_var,
00063            size_t BOUND,
00064            class Insert_Policy>
00065   class Inout_BD_String_SArgument_T : public InoutArgument
00066   {
00067   public:
00068     Inout_BD_String_SArgument_T (void);
00069 
00070     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00071     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00072 #if TAO_HAS_INTERCEPTORS == 1
00073     virtual void interceptor_value (CORBA::Any *any) const;
00074 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00075     typename S_var::s_traits::char_type *& arg (void);
00076 
00077   private:
00078     S_var x_;
00079   };
00080 
00081   /**
00082    * @class Out_BD_String_SArgument_T
00083    *
00084    * @brief Template class for INOUT skeleton bd (w)string argument.
00085    *
00086    */
00087   template<typename S_var,
00088            size_t BOUND,
00089            class Insert_Policy>
00090   class Out_BD_String_SArgument_T : public OutArgument
00091   {
00092   public:
00093     Out_BD_String_SArgument_T (void);
00094 
00095     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00096 #if TAO_HAS_INTERCEPTORS == 1
00097     virtual void interceptor_value (CORBA::Any *any) const;
00098 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00099     typename S_var::s_traits::char_type *& arg (void);
00100 
00101   private:
00102     S_var x_;
00103   };
00104 
00105   /**
00106    * @class Ret_BD_String_SArgument_T
00107    *
00108    * @brief Template class for return skeleton value of bd (w)string.
00109    *
00110    */
00111   template<typename S_var,
00112            size_t BOUND,
00113            class Insert_Policy>
00114   class Ret_BD_String_SArgument_T : public RetArgument
00115   {
00116   public:
00117     Ret_BD_String_SArgument_T (void);
00118 
00119     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00120 #if TAO_HAS_INTERCEPTORS == 1
00121     virtual void interceptor_value (CORBA::Any *any) const;
00122 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00123     typename S_var::s_traits::char_type *& arg (void);
00124 
00125   private:
00126     S_var x_;
00127   };
00128 
00129   /**
00130    * @struct Basic_SArg_Traits_T
00131    *
00132    * @brief Template class for skeleton argument traits of bounded (w)strings.
00133    *
00134    */
00135   template<typename T_var,
00136            size_t BOUND,
00137            class Insert_Policy>
00138   struct BD_String_SArg_Traits_T
00139   {
00140     typedef typename T_var::s_traits::char_type *       ret_type;
00141     typedef const typename T_var::s_traits::char_type * in_type;
00142     typedef typename T_var::s_traits::char_type *&      inout_type;
00143     typedef typename T_var::s_traits::string_out        out_type;
00144 
00145     typedef In_BD_String_SArgument_T<T_var,
00146                                      BOUND,
00147                                      Insert_Policy>     in_arg_val;
00148     typedef Inout_BD_String_SArgument_T<T_var,
00149                                         BOUND,
00150                                         Insert_Policy>  inout_arg_val;
00151     typedef Out_BD_String_SArgument_T<T_var,
00152                                       BOUND,
00153                                       Insert_Policy>    out_arg_val;
00154     typedef Ret_BD_String_SArgument_T<T_var,
00155                                       BOUND,
00156                                       Insert_Policy>    ret_val;
00157 
00158     // Typedefs corresponding to return value of arg() method in both
00159     // the client and server side argument class templates.
00160     typedef in_type                                     in_arg_type;
00161     typedef inout_type                                  inout_arg_type;
00162     typedef inout_type                                  out_arg_type;
00163     typedef inout_type                                  ret_arg_type;
00164   };
00165 }
00166 
00167 TAO_END_VERSIONED_NAMESPACE_DECL
00168 
00169 #if defined (__ACE_INLINE__)
00170 #include "tao/PortableServer/BD_String_SArgument_T.inl"
00171 #endif /* __ACE_INLINE__ */
00172 
00173 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00174 #include "tao/PortableServer/BD_String_SArgument_T.cpp"
00175 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00176 
00177 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00178 #pragma implementation ("BD_String_SArgument_T.cpp")
00179 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00180 
00181 #include /**/ "ace/post.h"
00182 
00183 #endif /* TAO_BD_STRING_SARGUMENT_T_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7