Var_Array_SArgument_T.h

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

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