00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Vector_SArgument_T.h 00006 * 00007 * $Id: Vector_SArgument_T.h 90749 2010-06-21 15:21:32Z parsons $ 00008 * 00009 * @author Jeff Parsons 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_VECTOR_SARGUMENT_T_H 00014 #define TAO_VECTOR_SARGUMENT_T_H 00015 00016 #include /**/ "ace/pre.h" 00017 #include "tao/Argument.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00024 00025 namespace TAO 00026 { 00027 /** 00028 * @class In_Vector_SArgument_T 00029 * 00030 * @brief Template class for IN skeleton argument of 00031 * unbounded sequence IDL types. 00032 * 00033 */ 00034 template<typename S, 00035 template <typename> class Insert_Policy> 00036 class In_Vector_SArgument_T : public InArgument 00037 { 00038 public: 00039 virtual CORBA::Boolean demarshal (TAO_InputCDR &); 00040 #if TAO_HAS_INTERCEPTORS == 1 00041 virtual void interceptor_value (CORBA::Any *any) const; 00042 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00043 S const & arg (void) const; 00044 00045 private: 00046 S x_; 00047 }; 00048 00049 /** 00050 * @class Inout_Vector_SArgument_T 00051 * 00052 * @brief Template class for INOUT skeleton arg of 00053 * unbounded sequence IDL types. 00054 * 00055 */ 00056 template<typename S, 00057 template <typename> class Insert_Policy> 00058 class Inout_Vector_SArgument_T : public InoutArgument 00059 { 00060 public: 00061 Inout_Vector_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_Vector_SArgument_T 00076 * 00077 * @brief Template class for OUT skeleton argument of 00078 * unbounded sequence IDL types. 00079 * 00080 */ 00081 template<typename S, 00082 template <typename> class Insert_Policy> 00083 class Out_Vector_SArgument_T : public OutArgument 00084 { 00085 public: 00086 Out_Vector_SArgument_T (void); 00087 00088 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); 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_Vector_SArgument_T 00100 * 00101 * @brief Template class for return skeleton value of 00102 * unbounded sequence IDL types. 00103 * 00104 */ 00105 template<typename S, 00106 template <typename> class Insert_Policy> 00107 class Ret_Vector_SArgument_T : public RetArgument 00108 { 00109 public: 00110 Ret_Vector_SArgument_T (void); 00111 00112 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); 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 00118 private: 00119 S x_; 00120 }; 00121 00122 /** 00123 * @struct Vector_SArg_Traits_T 00124 * 00125 * @brief Template class for skeleton argument traits of 00126 * sequence IDL types, when the STL mapping is used by 00127 * the IDL compiler. The ret_type and out_type typedefs 00128 * are different from Vector_SArg_Traits_T. 00129 * 00130 */ 00131 template<typename T, 00132 template <typename> class Insert_Policy> 00133 struct Vector_SArg_Traits_T 00134 { 00135 typedef T ret_type; 00136 typedef const T & in_type; 00137 typedef T & inout_type; 00138 typedef T & out_type; 00139 00140 typedef In_Vector_SArgument_T<T,Insert_Policy> in_arg_val; 00141 typedef Inout_Vector_SArgument_T<T,Insert_Policy> inout_arg_val; 00142 typedef Out_Vector_SArgument_T<T,Insert_Policy> out_arg_val; 00143 typedef Ret_Vector_SArgument_T<T,Insert_Policy> ret_val; 00144 00145 // Typedefs corresponding to return value of arg() method in both 00146 // the client and server side argument class templates. 00147 typedef in_type in_arg_type; 00148 typedef inout_type inout_arg_type; 00149 typedef ret_type & out_arg_type; 00150 typedef ret_type & ret_arg_type; 00151 }; 00152 } 00153 00154 TAO_END_VERSIONED_NAMESPACE_DECL 00155 00156 #if defined (__ACE_INLINE__) 00157 #include "tao/PortableServer/Vector_SArgument_T.inl" 00158 #endif /* __ACE_INLINE__ */ 00159 00160 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00161 #include "tao/PortableServer/Vector_SArgument_T.cpp" 00162 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00163 00164 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00165 #pragma implementation ("Vector_SArgument_T.cpp") 00166 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00167 00168 #include /**/ "ace/post.h" 00169 00170 #endif /* TAO_VECTOR_SARGUMENT_T_H */