Object_Argument_T.h

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

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