Basic_Argument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Basic_Argument_T.h
00006  *
00007  *  Basic_Argument_T.h,v 1.11 2006/06/27 06:22:13 jwillemsen Exp
00008  *
00009  *  @authors Jeff Parsons and Carlos O'Ryan
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_BASIC_ARGUMENT_T_H
00015 #define TAO_BASIC_ARGUMENT_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 namespace TAO
00028 {
00029   /**
00030    * @class In_Basic_Argument_T
00031    *
00032    * @brief Template class for IN stub argument of basic IDL types.
00033    */
00034   template<typename S,
00035            class Insert_Policy>
00036   class In_Basic_Argument_T : public InArgument
00037   {
00038   public:
00039     In_Basic_Argument_T (S const & x);
00040 
00041     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00042 #if TAO_HAS_INTERCEPTORS == 1
00043     virtual void interceptor_value (CORBA::Any *any) const;
00044 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00045     S arg (void) const;
00046 
00047   private:
00048     S const & x_;
00049   };
00050 
00051   /**
00052    * @class Inout_Basic_Argument_T
00053    *
00054    * @brief Template class for INOUT stub argument of basic IDL types.
00055    *
00056    */
00057   template<typename S,
00058            class Insert_Policy>
00059   class Inout_Basic_Argument_T : public InoutArgument
00060   {
00061   public:
00062     Inout_Basic_Argument_T (S & x);
00063 
00064     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00065     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00066 #if TAO_HAS_INTERCEPTORS == 1
00067     virtual void interceptor_value (CORBA::Any *any) const;
00068 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00069     S & arg (void);
00070 
00071   private:
00072     S & x_;
00073   };
00074 
00075   /**
00076    * @class Out_Basic_Argument_T
00077    *
00078    * @brief Template class for OUT stub argument of basic IDL types.
00079    *
00080    */
00081   template<typename S,
00082            class Insert_Policy>
00083   class Out_Basic_Argument_T : public OutArgument
00084   {
00085   public:
00086     Out_Basic_Argument_T (S & x);
00087 
00088     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00089 #if TAO_HAS_INTERCEPTORS == 1
00090     virtual void interceptor_value (CORBA::Any *any) const;
00091 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00092     S & arg (void);
00093 
00094   private:
00095     S & x_;
00096   };
00097 
00098   /**
00099    * @class Ret_Basic_Argument_T
00100    *
00101    * @brief Template class for return stub value of basic IDL types.
00102    *
00103    */
00104   template<typename S,
00105            class Insert_Policy>
00106   class Ret_Basic_Argument_T : public RetArgument
00107   {
00108   public:
00109     Ret_Basic_Argument_T (void);
00110 
00111     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00112 #if TAO_HAS_INTERCEPTORS == 1
00113     virtual void interceptor_value (CORBA::Any *any) const;
00114 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00115     S & arg (void);
00116 
00117     S excp (void);
00118     S retn (void);
00119 
00120   private:
00121     S x_;
00122   };
00123 
00124 
00125   /**
00126    * @struct Basic_Arg_Traits_T
00127    *
00128    * @brief Template class for stub argument traits of basic IDL types.
00129    *
00130    */
00131   template<typename T, class Insert_Policy>
00132   struct Basic_Arg_Traits_T
00133   {
00134     typedef T                                          ret_type;
00135     typedef T                                          in_type;
00136     typedef T &                                        inout_type;
00137     typedef T &                                        out_type;
00138 
00139     typedef In_Basic_Argument_T<T, Insert_Policy>      in_arg_val;
00140     typedef Inout_Basic_Argument_T<T, Insert_Policy>   inout_arg_val;
00141     typedef Out_Basic_Argument_T<T, Insert_Policy>     out_arg_val;
00142     typedef Ret_Basic_Argument_T<T, Insert_Policy>     ret_val;
00143   };
00144 }
00145 
00146 TAO_END_VERSIONED_NAMESPACE_DECL
00147 
00148 #if defined (__ACE_INLINE__)
00149 #include "tao/Basic_Argument_T.inl"
00150 #endif /* __ACE_INLINE__ */
00151 
00152 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00153 #include "tao/Basic_Argument_T.cpp"
00154 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00155 
00156 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00157 #pragma implementation ("Basic_Argument_T.cpp")
00158 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00159 
00160 #include /**/ "ace/post.h"
00161 
00162 #endif /* TAO_BASIC_ARGUMENT_T_H */

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