00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Fixed_Size_Argument_T.h 00006 * 00007 * Fixed_Size_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_FIXED_SIZE_ARGUMENT_T_H 00015 #define TAO_FIXED_SIZE_ARGUMENT_T_H 00016 00017 #include /**/ "ace/pre.h" 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_Fixed_Size_Argument_T 00030 * 00031 * @brief Template class for IN stub argument of fixed size IDL types. 00032 * 00033 */ 00034 template<typename S, 00035 class Insert_Policy> 00036 class In_Fixed_Size_Argument_T : public InArgument 00037 { 00038 public: 00039 In_Fixed_Size_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 const & arg (void) const; 00046 00047 private: 00048 S const * x_; 00049 }; 00050 00051 /** 00052 * @class Inout_Fixed_Size_Argument_T 00053 * 00054 * @brief Template class for INOUT stub argument of fixed size IDL types. 00055 * 00056 */ 00057 template<typename S, 00058 class Insert_Policy> 00059 class Inout_Fixed_Size_Argument_T : public InoutArgument 00060 { 00061 public: 00062 Inout_Fixed_Size_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_Fixed_Size_Argument_T 00077 * 00078 * @brief Template class for OUT stub argument of fixed size IDL types. 00079 * 00080 */ 00081 template<typename S, 00082 class Insert_Policy> 00083 class Out_Fixed_Size_Argument_T : public OutArgument 00084 { 00085 public: 00086 Out_Fixed_Size_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 00096 S & x_; 00097 }; 00098 00099 /** 00100 * @class Ret_Fixed_Size_Argument_T 00101 * 00102 * @brief Template class for return stub value of fixed size IDL types. 00103 * 00104 */ 00105 template<typename S, 00106 class Insert_Policy> 00107 class Ret_Fixed_Size_Argument_T : public RetArgument 00108 { 00109 public: 00110 Ret_Fixed_Size_Argument_T (void); 00111 00112 virtual CORBA::Boolean demarshal (TAO_InputCDR &); 00113 #if TAO_HAS_INTERCEPTORS == 1 00114 virtual void interceptor_value (CORBA::Any *any) const; 00115 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00116 S & arg (void); 00117 S excp (void); 00118 S retn (void); 00119 00120 protected: 00121 S x_; 00122 }; 00123 00124 /** 00125 * @struct Fixed_Size_Arg_Traits_T 00126 * 00127 * @brief Template class for argument traits of fixed size IDL types. 00128 * 00129 */ 00130 template<typename T, 00131 class Insert_Policy> 00132 struct Fixed_Size_Arg_Traits_T 00133 { 00134 typedef T ret_type; 00135 typedef T const & in_type; 00136 typedef T & inout_type; 00137 typedef T & out_type; 00138 00139 typedef In_Fixed_Size_Argument_T<T,Insert_Policy> in_arg_val; 00140 typedef Inout_Fixed_Size_Argument_T<T,Insert_Policy> inout_arg_val; 00141 typedef Out_Fixed_Size_Argument_T<T,Insert_Policy> out_arg_val; 00142 typedef Ret_Fixed_Size_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/Fixed_Size_Argument_T.inl" 00150 #endif /* __ACE_INLINE__ */ 00151 00152 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00153 #include "tao/Fixed_Size_Argument_T.cpp" 00154 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00155 00156 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00157 #pragma implementation ("Fixed_Size_Argument_T.cpp") 00158 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00159 00160 #include /**/ "ace/post.h" 00161 00162 #endif /* TAO_FIXED_SIZE_ARGUMENT_T_H */