00001
00002
00003 #ifndef TAO_VAR_ARRAY_ARGUMENT_T_CPP
00004 #define TAO_VAR_ARRAY_ARGUMENT_T_CPP
00005
00006 #include "tao/Var_Array_Argument_T.h"
00007
00008 #if !defined (__ACE_INLINE__)
00009 #include "tao/Var_Array_Argument_T.inl"
00010 #endif
00011
00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00013
00014 template<typename S_forany,
00015 class Insert_Policy>
00016 CORBA::Boolean
00017 TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::marshal (
00018 TAO_OutputCDR & cdr
00019 )
00020 {
00021 return cdr << this->x_;
00022 }
00023
00024 #if TAO_HAS_INTERCEPTORS == 1
00025
00026 template<typename S_forany,
00027 class Insert_Policy>
00028 void
00029 TAO::In_Var_Array_Argument_T<S_forany,Insert_Policy>::interceptor_value (
00030 CORBA::Any *any) const
00031 {
00032 Insert_Policy::any_insert (any, this->x_);
00033 }
00034
00035 #endif
00036
00037
00038
00039 template<typename S_forany,
00040 class Insert_Policy>
00041 CORBA::Boolean
00042 TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::marshal (
00043 TAO_OutputCDR & cdr
00044 )
00045 {
00046 return cdr << this->x_;
00047 }
00048
00049 template<typename S_forany,
00050 class Insert_Policy>
00051 CORBA::Boolean
00052 TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::demarshal (
00053 TAO_InputCDR & cdr
00054 )
00055 {
00056 return cdr >> this->x_;
00057 }
00058
00059 #if TAO_HAS_INTERCEPTORS == 1
00060
00061 template<typename S_forany,
00062 class Insert_Policy>
00063 void
00064 TAO::Inout_Var_Array_Argument_T<S_forany,Insert_Policy>::interceptor_value (
00065 CORBA::Any *any) const
00066 {
00067 Insert_Policy::any_insert (any, this->x_);
00068 }
00069
00070 #endif
00071
00072
00073
00074 template<typename S_out,
00075 typename S_forany,
00076 class Insert_Policy>
00077 CORBA::Boolean
00078 TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>::demarshal (
00079 TAO_InputCDR & cdr
00080 )
00081 {
00082 typedef TAO::Array_Traits<S_forany> ARRAY_TRAITS;
00083 ACE_ALLOCATOR_RETURN (this->x_,
00084 ARRAY_TRAITS::alloc (),
00085 0);
00086 S_forany tmp (this->x_);
00087 return cdr >> tmp;
00088 }
00089
00090 #if TAO_HAS_INTERCEPTORS == 1
00091
00092 template<typename S_out,
00093 typename S_forany,
00094 class Insert_Policy>
00095 void
00096 TAO::Out_Var_Array_Argument_T<S_out,S_forany,Insert_Policy>::
00097 interceptor_value (CORBA::Any *any) const
00098 {
00099 S_forany tmp (this->x_);
00100 Insert_Policy::any_insert (any, tmp);
00101 }
00102
00103 #endif
00104
00105
00106
00107 template<typename S_var,
00108 typename S_forany,
00109 class Insert_Policy>
00110 CORBA::Boolean
00111 TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::demarshal (
00112 TAO_InputCDR & cdr
00113 )
00114 {
00115 typedef TAO::Array_Traits<S_forany> ARRAY_TRAITS;
00116 typename S_forany::_slice_type * tmp_ptr = 0;
00117 ACE_ALLOCATOR_RETURN (tmp_ptr,
00118 ARRAY_TRAITS::alloc (),
00119 0);
00120 this->x_ = tmp_ptr;
00121 S_forany tmp (this->x_.ptr ());
00122 return cdr >> tmp;
00123 }
00124
00125 #if TAO_HAS_INTERCEPTORS == 1
00126
00127 template<typename S_var,
00128 typename S_forany,
00129 class Insert_Policy>
00130 void
00131 TAO::Ret_Var_Array_Argument_T<S_var,S_forany,Insert_Policy>::
00132 interceptor_value (CORBA::Any *any) const
00133 {
00134 Insert_Policy::any_insert (any, S_forany (this->x_.ptr ()));
00135 }
00136
00137 #endif
00138
00139 TAO_END_VERSIONED_NAMESPACE_DECL
00140
00141 #endif