00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_BD_STRING_ARGUMENT_T_H
00015 #define TAO_BD_STRING_ARGUMENT_T_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "ace/CDR_Stream.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #include "tao/Argument.h"
00026 #include "tao/Any_Insert_Policy_T.h"
00027
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029
00030 namespace TAO
00031 {
00032
00033
00034
00035
00036
00037
00038 template<typename S_var,
00039 size_t BOUND,
00040 class Insert_Policy>
00041 class In_BD_String_Argument_T : public InArgument
00042 {
00043 public:
00044 In_BD_String_Argument_T (const typename S_var::s_traits::char_type * x);
00045
00046 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00047
00048 #if TAO_HAS_INTERCEPTORS == 1
00049 virtual void interceptor_value (CORBA::Any *any) const;
00050 #endif
00051
00052 typename S_var::s_traits::char_type const * arg (void) const;
00053
00054 protected:
00055 typename S_var::s_traits::char_type const * x_;
00056 };
00057
00058
00059
00060
00061
00062
00063
00064 template<typename S_var,
00065 size_t BOUND,
00066 class Insert_Policy>
00067 class In_BD_String_Clonable_Argument_T :
00068 public In_BD_String_Argument_T<S_var, BOUND, Insert_Policy>
00069 {
00070 public:
00071 In_BD_String_Clonable_Argument_T (const typename S_var::s_traits::char_type * x);
00072 virtual ~In_BD_String_Clonable_Argument_T (void);
00073
00074 virtual Argument* clone (void);
00075 private:
00076 bool is_clone_;
00077 };
00078
00079
00080
00081
00082
00083
00084
00085 template<typename S_var,
00086 size_t BOUND,
00087 class Insert_Policy>
00088 class Inout_BD_String_Argument_T : public InoutArgument
00089 {
00090 public:
00091 Inout_BD_String_Argument_T (typename S_var::s_traits::char_type *& x);
00092
00093 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00094 virtual CORBA::Boolean demarshal (TAO_InputCDR &cdr);
00095 #if TAO_HAS_INTERCEPTORS == 1
00096 virtual void interceptor_value (CORBA::Any *any) const;
00097 #endif
00098 typename S_var::s_traits::char_type *& arg (void);
00099
00100 private:
00101 typename S_var::s_traits::char_type *& x_;
00102 };
00103
00104
00105
00106
00107
00108
00109
00110 template<typename S_var,
00111 size_t BOUND,
00112 class Insert_Policy>
00113 class Out_BD_String_Argument_T : public OutArgument
00114 {
00115 public:
00116 Out_BD_String_Argument_T (typename S_var::s_traits::string_out x);
00117
00118 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00119 #if TAO_HAS_INTERCEPTORS == 1
00120 virtual void interceptor_value (CORBA::Any *any) const;
00121 #endif
00122 typename S_var::s_traits::char_type *& arg (void);
00123
00124 private:
00125 typename S_var::s_traits::char_type *& x_;
00126 };
00127
00128
00129
00130
00131
00132
00133
00134 template<typename S_var,
00135 size_t BOUND,
00136 class Insert_Policy>
00137 class Ret_BD_String_Argument_T : public RetArgument
00138 {
00139 public:
00140 Ret_BD_String_Argument_T (void);
00141
00142 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00143 #if TAO_HAS_INTERCEPTORS == 1
00144 virtual void interceptor_value (CORBA::Any *any) const;
00145 #endif
00146 typename S_var::s_traits::char_type *& arg (void);
00147
00148 typename S_var::s_traits::char_type * excp (void);
00149 typename S_var::s_traits::char_type * retn (void);
00150
00151 private:
00152 S_var x_;
00153 };
00154
00155
00156
00157
00158
00159
00160
00161 template<typename T_var,
00162 size_t BOUND,
00163 class Insert_Policy>
00164 struct BD_String_Arg_Traits_T
00165 {
00166 typedef typename T_var::s_traits::char_type * ret_type;
00167 typedef typename T_var::s_traits::char_type const * in_type;
00168 typedef typename T_var::s_traits::char_type *& inout_type;
00169 typedef typename T_var::s_traits::string_out out_type;
00170
00171 typedef In_BD_String_Argument_T<T_var,
00172 BOUND,
00173 Insert_Policy> in_arg_val;
00174 typedef In_BD_String_Clonable_Argument_T<T_var,
00175 BOUND,
00176 Insert_Policy>
00177 in_clonable_arg_val;
00178 typedef Inout_BD_String_Argument_T<T_var,
00179 BOUND,
00180 Insert_Policy> inout_arg_val;
00181 typedef Out_BD_String_Argument_T<T_var,
00182 BOUND,
00183 Insert_Policy> out_arg_val;
00184 typedef Ret_BD_String_Argument_T<T_var,
00185 BOUND,
00186 Insert_Policy> ret_val;
00187 };
00188 }
00189
00190 TAO_END_VERSIONED_NAMESPACE_DECL
00191
00192 #if defined (__ACE_INLINE__)
00193 #include "tao/BD_String_Argument_T.inl"
00194 #endif
00195
00196 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00197 #include "tao/BD_String_Argument_T.cpp"
00198 #endif
00199
00200 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00201 #pragma implementation ("BD_String_Argument_T.cpp")
00202 #endif
00203
00204 #include "ace/post.h"
00205
00206 #endif