Basic_Argument_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Basic_Argument_T.h
00006  *
00007  *  $Id: Basic_Argument_T.h 74007 2006-08-14 12:50:21Z elliott_c $
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   protected:
00048     S const & x_;
00049   };
00050 
00051   /**
00052    * @class In_Basic_Clonable_Argument_T
00053    *
00054    * @brief Template class for IN stub argument of basic IDL types.
00055    *
00056    */
00057   template<typename S,
00058            class Insert_Policy>
00059   class In_Basic_Clonable_Argument_T :
00060                       public In_Basic_Argument_T<S, Insert_Policy>
00061   {
00062   public:
00063     In_Basic_Clonable_Argument_T (S const & x);
00064     virtual ~In_Basic_Clonable_Argument_T (void);
00065 
00066     virtual Argument* clone (void);
00067 
00068   private:
00069     bool is_clone_;
00070   };
00071 
00072   /**
00073    * @class Inout_Basic_Argument_T
00074    *
00075    * @brief Template class for INOUT stub argument of basic IDL types.
00076    *
00077    */
00078   template<typename S,
00079            class Insert_Policy>
00080   class Inout_Basic_Argument_T : public InoutArgument
00081   {
00082   public:
00083     Inout_Basic_Argument_T (S & x);
00084 
00085     virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00086     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
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     S & x_;
00094   };
00095 
00096   /**
00097    * @class Out_Basic_Argument_T
00098    *
00099    * @brief Template class for OUT stub argument of basic IDL types.
00100    *
00101    */
00102   template<typename S,
00103            class Insert_Policy>
00104   class Out_Basic_Argument_T : public OutArgument
00105   {
00106   public:
00107     Out_Basic_Argument_T (S & x);
00108 
00109     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
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     S & x_;
00117   };
00118 
00119   /**
00120    * @class Ret_Basic_Argument_T
00121    *
00122    * @brief Template class for return stub value of basic IDL types.
00123    *
00124    */
00125   template<typename S,
00126            class Insert_Policy>
00127   class Ret_Basic_Argument_T : public RetArgument
00128   {
00129   public:
00130     Ret_Basic_Argument_T (void);
00131 
00132     virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00133 #if TAO_HAS_INTERCEPTORS == 1
00134     virtual void interceptor_value (CORBA::Any *any) const;
00135 #endif /* TAO_HAS_INTERCEPTORS == 1 */
00136     S & arg (void);
00137 
00138     S excp (void);
00139     S retn (void);
00140 
00141   private:
00142     S x_;
00143   };
00144 
00145 
00146   /**
00147    * @struct Basic_Arg_Traits_T
00148    *
00149    * @brief Template class for stub argument traits of basic IDL types.
00150    *
00151    */
00152   template<typename T, class Insert_Policy>
00153   struct Basic_Arg_Traits_T
00154   {
00155     typedef T                                          ret_type;
00156     typedef T                                          in_type;
00157     typedef T &                                        inout_type;
00158     typedef T &                                        out_type;
00159 
00160     typedef In_Basic_Argument_T<T, Insert_Policy>      in_arg_val;
00161     typedef In_Basic_Clonable_Argument_T<T, Insert_Policy>
00162                                                        in_clonable_arg_val;
00163     typedef Inout_Basic_Argument_T<T, Insert_Policy>   inout_arg_val;
00164     typedef Out_Basic_Argument_T<T, Insert_Policy>     out_arg_val;
00165     typedef Ret_Basic_Argument_T<T, Insert_Policy>     ret_val;
00166   };
00167 }
00168 
00169 TAO_END_VERSIONED_NAMESPACE_DECL
00170 
00171 #if defined (__ACE_INLINE__)
00172 #include "tao/Basic_Argument_T.inl"
00173 #endif /* __ACE_INLINE__ */
00174 
00175 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00176 #include "tao/Basic_Argument_T.cpp"
00177 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00178 
00179 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00180 #pragma implementation ("Basic_Argument_T.cpp")
00181 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00182 
00183 #include /**/ "ace/post.h"
00184 
00185 #endif /* TAO_BASIC_ARGUMENT_T_H */

Generated on Tue Feb 2 17:37:51 2010 for TAO by  doxygen 1.4.7