00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_VAR_ARRAY_ARGUMENT_T_H
00014 #define TAO_VAR_ARRAY_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_forany,
00035 class Insert_Policy>
00036 class In_Var_Array_Argument_T : public InArgument
00037 {
00038 public:
00039 In_Var_Array_Argument_T (const typename S_forany::_slice_type * 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 typename S_forany::_slice_type const * arg (void) const;
00046
00047 protected:
00048 S_forany x_;
00049 };
00050
00051
00052
00053
00054
00055
00056
00057 template<typename S_forany,
00058 class Insert_Policy>
00059 class In_Var_Array_Clonable_Argument_T :
00060 public In_Var_Array_Argument_T<S_forany, Insert_Policy>
00061 {
00062 public:
00063 In_Var_Array_Clonable_Argument_T (const typename S_forany::_slice_type * x);
00064 virtual ~In_Var_Array_Clonable_Argument_T (void);
00065
00066 virtual Argument* clone (void);
00067
00068 private:
00069 bool is_clone_;
00070 };
00071
00072
00073
00074
00075
00076
00077
00078 template<typename S_forany,
00079 class Insert_Policy>
00080 class Inout_Var_Array_Argument_T : public InoutArgument
00081 {
00082 public:
00083 Inout_Var_Array_Argument_T (typename S_forany::_slice_type *&x);
00084
00085 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
00086 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00087 #if TAO_HAS_INTERCEPTORS == 1
00088 virtual void interceptor_value (CORBA::Any *any) const;
00089 #endif
00090 typename S_forany::_slice_type * arg (void);
00091
00092 private:
00093 S_forany x_;
00094 };
00095
00096
00097
00098
00099
00100
00101
00102 template<typename S_out,
00103 typename S_forany,
00104 class Insert_Policy>
00105 class Out_Var_Array_Argument_T : public OutArgument
00106 {
00107 public:
00108 Out_Var_Array_Argument_T (S_out x);
00109
00110 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00111 #if TAO_HAS_INTERCEPTORS == 1
00112 virtual void interceptor_value (CORBA::Any *any) const;
00113 #endif
00114 typename S_forany::_slice_type *& arg (void);
00115
00116 private:
00117 typename S_forany::_slice_type *& x_;
00118 };
00119
00120
00121
00122
00123
00124
00125
00126 template<typename S_var,
00127 typename S_forany,
00128 class Insert_Policy>
00129 class Ret_Var_Array_Argument_T : public RetArgument
00130 {
00131 public:
00132 Ret_Var_Array_Argument_T (void);
00133
00134 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
00135 #if TAO_HAS_INTERCEPTORS == 1
00136 virtual void interceptor_value (CORBA::Any *any) const;
00137 #endif
00138 typename S_forany::_slice_type *& arg (void);
00139
00140 typename S_forany::_slice_type * excp (void);
00141 typename S_forany::_slice_type * retn (void);
00142
00143 private:
00144 S_var x_;
00145 };
00146
00147
00148
00149
00150
00151
00152
00153 template<typename T_out,
00154 typename T_forany,
00155 class Insert_Policy>
00156 struct Var_Array_Arg_Traits_T
00157 {
00158 typedef typename T_forany::_slice_type * ret_type;
00159 typedef const typename T_forany::_array_type in_type;
00160 typedef typename T_forany::_array_type inout_type;
00161 typedef T_out out_type;
00162
00163 typedef In_Var_Array_Argument_T<T_forany,
00164 Insert_Policy> in_arg_val;
00165 typedef In_Var_Array_Clonable_Argument_T<T_forany,
00166 Insert_Policy>
00167 in_clonable_arg_val;
00168 typedef Inout_Var_Array_Argument_T<T_forany,
00169 Insert_Policy> inout_arg_val;
00170 typedef Out_Var_Array_Argument_T<T_out,
00171 T_forany,
00172 Insert_Policy> out_arg_val;
00173 typedef Ret_Var_Array_Argument_T<typename T_out::_var_type,
00174 T_forany,
00175 Insert_Policy> ret_val;
00176 };
00177 }
00178
00179 TAO_END_VERSIONED_NAMESPACE_DECL
00180
00181 #if defined (__ACE_INLINE__)
00182 #include "tao/Var_Array_Argument_T.inl"
00183 #endif
00184
00185 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00186 #include "tao/Var_Array_Argument_T.cpp"
00187 #endif
00188
00189 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00190 #pragma implementation ("Var_Array_Argument_T.cpp")
00191 #endif
00192
00193 #include "ace/post.h"
00194
00195 #endif