Var_Size_SArgument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Var_Size_SArgument_T.h
00006  *
00007  *  $Id: Var_Size_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 #ifndef TAO_VAR_SIZE_SARGUMENT_T_H
00014 #define TAO_VAR_SIZE_SARGUMENT_T_H
00015 
00016 #include /**/ "ace/pre.h"
00017 #include "tao/Argument.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00024 
00025 namespace TAO
00026 {
00027   /**
00028    * @class In_Var_Size_SArgument_T
00029    *
00030    * @brief Template class for IN skeleton argument of fixed size IDL types.
00031    *
00032    */
00033   template<typename S,
00034            class Insert_Policy>
00035   class In_Var_Size_SArgument_T : public InArgument
00036   {
00037   public:
00038 
00039     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00040 #if TAO_HAS_INTERCEPTORS == 1
00041     virtual void interceptor_value (CORBA::Any *any) const;
00042 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00043     S const & arg (void) const;
00044 
00045   private:
00046     S x_;
00047   };
00048 
00049   /**
00050    * @class Inout_Var_Size_SArgument_T
00051    *
00052    * @brief Template class for INOUT skeleton arg of fixed size IDL types.
00053    *
00054    */
00055   template<typename S,
00056            class Insert_Policy>
00057   class Inout_Var_Size_SArgument_T : public InoutArgument
00058   {
00059   public:
00060     Inout_Var_Size_SArgument_T (void);
00061 
00062     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00063     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00064 #if TAO_HAS_INTERCEPTORS == 1
00065     virtual void interceptor_value (CORBA::Any *any) const;
00066 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00067     S & arg (void);
00068 
00069   private:
00070     S x_;
00071   };
00072 
00073   /**
00074    * @class Out_Var_Size_SArgument_T
00075    *
00076    * @brief Template class for OUT skeleton argument of fixed size IDL types.
00077    *
00078    */
00079   template<typename S,
00080            class Insert_Policy>
00081   class Out_Var_Size_SArgument_T : public OutArgument
00082   {
00083   public:
00084     Out_Var_Size_SArgument_T (void);
00085 
00086     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00087 #if TAO_HAS_INTERCEPTORS == 1
00088     virtual void interceptor_value (CORBA::Any *any) const;
00089 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00090     S *& arg (void);
00091 
00092   private:
00093     typename S::_var_type x_;
00094   };
00095 
00096   /**
00097    * @class Ret_Var_Size_SArgument_T
00098    *
00099    * @brief Template class for return skeleton value of fixed size IDL types.
00100    *
00101    */
00102   template<typename S,
00103            class Insert_Policy>
00104   class Ret_Var_Size_SArgument_T : public RetArgument
00105   {
00106   public:
00107     Ret_Var_Size_SArgument_T (void);
00108 
00109     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00110 #if TAO_HAS_INTERCEPTORS == 1
00111     virtual void interceptor_value (CORBA::Any *any) const;
00112 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00113     S *& arg (void);
00114 
00115   private:
00116     typename S::_var_type x_;
00117   };
00118 
00119   /**
00120    * @struct Var_Size_SArg_Traits_T
00121    *
00122    * @brief Template class for skeleton argument traits of
00123    *  variable size IDL types.
00124    *
00125    */
00126   template<typename T,
00127            class Insert_Policy>
00128   struct Var_Size_SArg_Traits_T
00129   {
00130     typedef T *                                             ret_type;
00131     typedef const T &                                       in_type;
00132     typedef T &                                             inout_type;
00133     typedef typename T::_out_type                           out_type;
00134 
00135     typedef In_Var_Size_SArgument_T<T,Insert_Policy>        in_arg_val;
00136     typedef Inout_Var_Size_SArgument_T<T,Insert_Policy>     inout_arg_val;
00137     typedef Out_Var_Size_SArgument_T<T,Insert_Policy>       out_arg_val;
00138     typedef Ret_Var_Size_SArgument_T<T,Insert_Policy>       ret_val;
00139 
00140     // Typedefs corresponding to return value of arg() method in both
00141     // the client and server side argument class templates.
00142     typedef in_type                                         in_arg_type;
00143     typedef inout_type                                      inout_arg_type;
00144     typedef ret_type &                                      out_arg_type;
00145     typedef ret_type &                                      ret_arg_type;
00146   };
00147 }
00148 
00149 TAO_END_VERSIONED_NAMESPACE_DECL
00150 
00151 #if defined (__ACE_INLINE__)
00152 #include "tao/PortableServer/Var_Size_SArgument_T.inl"
00153 #endif /* __ACE_INLINE__ */
00154 
00155 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00156 #include "tao/PortableServer/Var_Size_SArgument_T.cpp"
00157 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00158 
00159 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00160 #pragma implementation ("Var_Size_SArgument_T.cpp")
00161 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00162 
00163 #include /**/ "ace/post.h"
00164 
00165 #endif /* TAO_VAR_SIZE_SARGUMENT_T_H */

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