00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Basic_SArgument_T.h 00006 * 00007 * $Id: Basic_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_BASIC_SARGUMENT_T_H 00015 #define TAO_BASIC_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 namespace TAO 00028 { 00029 /** 00030 * @class In_Basic_SArgument_T 00031 * 00032 * @brief Template class for IN skeleton argument of basic IDL types. 00033 * 00034 */ 00035 template<typename S, class Insert_Policy> 00036 class In_Basic_SArgument_T : public InArgument 00037 { 00038 public: 00039 In_Basic_SArgument_T (void); 00040 00041 virtual CORBA::Boolean demarshal (TAO_InputCDR &); 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 x_; 00049 }; 00050 00051 /** 00052 * @class Inout_Basic_SArgument_T 00053 * 00054 * @brief Template class for INOUT skeleton argument of basic IDL types. 00055 * 00056 */ 00057 template<typename S, class Insert_Policy> 00058 class Inout_Basic_SArgument_T : public InoutArgument 00059 { 00060 public: 00061 Inout_Basic_SArgument_T (void); 00062 00063 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); 00064 virtual CORBA::Boolean demarshal (TAO_InputCDR &); 00065 #if TAO_HAS_INTERCEPTORS == 1 00066 virtual void interceptor_value (CORBA::Any *any) const; 00067 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00068 S & arg (void); 00069 00070 private: 00071 S x_; 00072 }; 00073 00074 /** 00075 * @class Out_Basic_SArgument_T 00076 * 00077 * @brief Template class for OUT skeleton argument of basic IDL types. 00078 * 00079 */ 00080 template<typename S, class Insert_Policy> 00081 class Out_Basic_SArgument_T : public OutArgument 00082 { 00083 public: 00084 Out_Basic_SArgument_T (void); 00085 00086 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); 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 Ret_Basic_SArgument_T 00098 * 00099 * @brief Template class for return skeleton value of basic IDL types. 00100 * 00101 */ 00102 template<typename S, class Insert_Policy> 00103 class Ret_Basic_SArgument_T : public RetArgument 00104 { 00105 public: 00106 Ret_Basic_SArgument_T (void); 00107 00108 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); 00109 #if TAO_HAS_INTERCEPTORS == 1 00110 virtual void interceptor_value (CORBA::Any *any) const; 00111 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00112 S & arg (void); 00113 00114 private: 00115 S x_; 00116 }; 00117 00118 /** 00119 * @struct Basic_SArg_Traits_T 00120 * 00121 * @brief Template class for skeleton argument traits of basic IDL types. 00122 * 00123 */ 00124 template<typename T, class Insert_Policy> 00125 struct Basic_SArg_Traits_T 00126 { 00127 typedef T ret_type; 00128 typedef T in_type; 00129 typedef T & inout_type; 00130 typedef T & out_type; 00131 00132 typedef In_Basic_SArgument_T<T, Insert_Policy> in_arg_val; 00133 typedef Inout_Basic_SArgument_T<T, Insert_Policy> inout_arg_val; 00134 typedef Out_Basic_SArgument_T<T, Insert_Policy> out_arg_val; 00135 typedef Ret_Basic_SArgument_T<T, Insert_Policy> ret_val; 00136 00137 // Typedefs corresponding to return value of arg() method in both 00138 // the client and server side argument class templates. 00139 typedef in_type in_arg_type; 00140 typedef inout_type inout_arg_type; 00141 typedef out_type out_arg_type; 00142 typedef out_type ret_arg_type; 00143 00144 }; 00145 } 00146 00147 TAO_END_VERSIONED_NAMESPACE_DECL 00148 00149 #if defined (__ACE_INLINE__) 00150 #include "tao/PortableServer/Basic_SArgument_T.inl" 00151 #endif /* __ACE_INLINE__ */ 00152 00153 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00154 #include "tao/PortableServer/Basic_SArgument_T.cpp" 00155 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00156 00157 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00158 #pragma implementation ("Basic_SArgument_T.cpp") 00159 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00160 00161 #include /**/ "ace/post.h" 00162 00163 #endif /* TAO_BASIC_SARGUMENT_T_H */