Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_VAR_SIZE_ARGUMENT_T_H
00014 #define TAO_VAR_SIZE_ARGUMENT_T_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "tao/Argument.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025
00026 namespace TAO
00027 {
00028
00029
00030
00031
00032
00033
00034 template<typename S,
00035 template <typename> class Insert_Policy>
00036 class In_Var_Size_Argument_T : public InArgument
00037 {
00038 public:
00039 In_Var_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
00045 S const & arg (void) const;
00046
00047 protected:
00048 const S * x_;
00049 #if TAO_HAS_INTERCEPTORS == 1
00050 Insert_Policy <S> insert_policy_;
00051 #endif
00052 };
00053
00054
00055
00056
00057
00058
00059
00060 template<typename S,
00061 template <typename> class Insert_Policy>
00062 class In_Var_Size_Clonable_Argument_T :
00063 public In_Var_Size_Argument_T<S, Insert_Policy>
00064 {
00065 public:
00066 In_Var_Size_Clonable_Argument_T (S const & x);
00067 virtual ~In_Var_Size_Clonable_Argument_T (void);
00068
00069 virtual Argument* clone (void);
00070
00071 private:
00072 bool is_clone_;
00073 };
00074
00075
00076
00077
00078
00079
00080
00081 template<typename S,
00082 template <typename> class Insert_Policy>
00083 class Inout_Var_Size_Argument_T : public InoutArgument
00084 {
00085 public:
00086 Inout_Var_Size_Argument_T (S & x);
00087
00088 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00089 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00090 #if TAO_HAS_INTERCEPTORS == 1
00091 virtual void interceptor_value (CORBA::Any *any) const;
00092 #endif
00093 S & arg (void);
00094
00095 private:
00096 S * x_;
00097 };
00098
00099
00100
00101
00102
00103
00104
00105 template<typename S,
00106 template <typename> class Insert_Policy>
00107 class Out_Var_Size_Argument_T : public OutArgument
00108 {
00109 public:
00110 Out_Var_Size_Argument_T (typename S::_out_type x);
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
00116 S *& arg (void);
00117
00118 private:
00119 S *& x_;
00120 };
00121
00122
00123
00124
00125
00126
00127
00128 template<typename S,
00129 template <typename> class Insert_Policy>
00130 class Ret_Var_Size_Argument_T : public RetArgument
00131 {
00132 public:
00133 Ret_Var_Size_Argument_T (void);
00134
00135 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00136 #if TAO_HAS_INTERCEPTORS == 1
00137 virtual void interceptor_value (CORBA::Any *any) const;
00138 #endif
00139 S *& arg (void);
00140
00141 S * excp (void);
00142 S * retn (void);
00143
00144 protected:
00145 typename S::_var_type x_;
00146 };
00147
00148
00149
00150
00151
00152
00153
00154
00155 template<typename T,
00156 template <typename> class Insert_Policy>
00157 struct Var_Size_Arg_Traits_T
00158 {
00159 typedef T * ret_type;
00160 typedef T const & in_type;
00161 typedef T & inout_type;
00162 typedef typename T::_out_type out_type;
00163
00164 typedef In_Var_Size_Argument_T<T, Insert_Policy> in_arg_val;
00165 typedef In_Var_Size_Clonable_Argument_T<T, Insert_Policy>
00166 in_clonable_arg_val;
00167 typedef Inout_Var_Size_Argument_T<T, Insert_Policy> inout_arg_val;
00168 typedef Out_Var_Size_Argument_T<T, Insert_Policy> out_arg_val;
00169 typedef Ret_Var_Size_Argument_T<T, Insert_Policy> ret_val;
00170 };
00171 }
00172
00173 TAO_END_VERSIONED_NAMESPACE_DECL
00174
00175 #if defined (__ACE_INLINE__)
00176 #include "tao/Var_Size_Argument_T.inl"
00177 #endif
00178
00179 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00180 #include "tao/Var_Size_Argument_T.cpp"
00181 #endif
00182
00183 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00184 #pragma implementation ("Var_Size_Argument_T.cpp")
00185 #endif
00186
00187 #include "ace/post.h"
00188
00189 #endif