Object_SArgument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Object_SArgument_T.h
00006  *
00007  *  $Id: Object_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_OBJECT_SARGUMENT_T_H
00015 #define TAO_OBJECT_SARGUMENT_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 // This set of classes is also used by valuetype arguments. If the
00028 // specialization is done using S * for the parameter, the semantics
00029 // are the same as for interfaces, so there's no need for another
00030 // set of classes.
00031 
00032 namespace TAO
00033 {
00034   /**
00035    * @class In_Object_SArgument_T
00036    *
00037    * @brief Template class for IN skeleton object argument.
00038    *
00039    */
00040   template<typename S_ptr,
00041            typename S_var,
00042            class Insert_Policy>
00043   class In_Object_SArgument_T : public InArgument
00044   {
00045   public:
00046 
00047     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00048 #if TAO_HAS_INTERCEPTORS == 1
00049     virtual void interceptor_value (CORBA::Any *any) const;
00050 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00051     S_ptr arg (void) const;
00052 
00053   private:
00054     S_var x_;
00055   };
00056 
00057   /**
00058    * @class Inout_Object_SArgument_T
00059    *
00060    * @brief Template class for INOUT skeleton object argument.
00061    *
00062    */
00063   template<typename S_ptr,
00064            typename S_var,
00065            class Insert_Policy>
00066   class Inout_Object_SArgument_T : public InoutArgument
00067   {
00068   public:
00069     Inout_Object_SArgument_T (void);
00070 
00071     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00072     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00073 #if TAO_HAS_INTERCEPTORS == 1
00074     virtual void interceptor_value (CORBA::Any *any) const;
00075 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00076     S_ptr & arg (void);
00077 
00078   private:
00079     S_var x_;
00080   };
00081 
00082   /**
00083    * @class Out_Object_SArgument_T
00084    *
00085    * @brief Template class for INOUT skeleton object argument.
00086    *
00087    */
00088   template<typename S_ptr,
00089            typename S_var,
00090            typename S_out,
00091            class Insert_Policy>
00092   class Out_Object_SArgument_T : public OutArgument
00093   {
00094   public:
00095     Out_Object_SArgument_T (void);
00096 
00097     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00098 #if TAO_HAS_INTERCEPTORS == 1
00099     virtual void interceptor_value (CORBA::Any *any) const;
00100 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00101     S_out arg (void);
00102 
00103   private:
00104     S_var x_;
00105   };
00106 
00107   /**
00108    * @class Ret_Object_SArgument_T
00109    *
00110    * @brief Template class for return skeleton value of object.
00111    *
00112    */
00113   template<typename S_ptr,
00114            typename S_var,
00115            class Insert_Policy>
00116   class Ret_Object_SArgument_T : public RetArgument
00117   {
00118   public:
00119     Ret_Object_SArgument_T (void);
00120 
00121     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00122 #if TAO_HAS_INTERCEPTORS == 1
00123     virtual void interceptor_value (CORBA::Any *any) const;
00124 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00125     S_ptr & arg (void);
00126 
00127   private:
00128     S_var x_;
00129   };
00130 
00131   /**
00132    * @struct Object_SArg_Traits_T
00133    *
00134    * @brief Template class for skeleton argument traits of objects.
00135    *
00136    */
00137   template<typename T_ptr,
00138            typename T_var,
00139            typename T_out,
00140            class Insert_Policy>
00141   struct Object_SArg_Traits_T
00142   {
00143     typedef T_ptr                                         ret_type;
00144     typedef T_ptr                                         in_type;
00145     typedef T_ptr &                                       inout_type;
00146     typedef T_out                                         out_type;
00147 
00148     typedef In_Object_SArgument_T<T_ptr,
00149                                   T_var,
00150                                   Insert_Policy>          in_arg_val;
00151     typedef Inout_Object_SArgument_T<T_ptr,
00152                                      T_var,
00153                                      Insert_Policy>       inout_arg_val;
00154     typedef Out_Object_SArgument_T<T_ptr,
00155                                    T_var,
00156                                    T_out,
00157                                    Insert_Policy>         out_arg_val;
00158     typedef Ret_Object_SArgument_T<T_ptr,
00159                                    T_var,
00160                                    Insert_Policy>         ret_val;
00161 
00162     // Typedefs corresponding to return value of arg() method in both
00163     // the client and server side argument class templates.
00164     typedef in_type                                       in_arg_type;
00165     typedef inout_type                                    inout_arg_type;
00166     typedef out_type                                      out_arg_type;
00167     typedef inout_type                                    ret_arg_type;
00168   };
00169 }
00170 
00171 TAO_END_VERSIONED_NAMESPACE_DECL
00172 
00173 #if defined (__ACE_INLINE__)
00174 #include "tao/PortableServer/Object_SArgument_T.inl"
00175 #endif /* __ACE_INLINE__ */
00176 
00177 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00178 #include "tao/PortableServer/Object_SArgument_T.cpp"
00179 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00180 
00181 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00182 #pragma implementation ("Object_SArgument_T.cpp")
00183 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00184 
00185 #include /**/ "ace/post.h"
00186 
00187 #endif /* TAO_OBJECT_SARGUMENT_T_H */

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