Go to the documentation of this file.00001
00002
00003 #ifndef TAO_FIXED_ARRAY_ARGUMENT_T_CPP
00004 #define TAO_FIXED_ARRAY_ARGUMENT_T_CPP
00005
00006 #include "tao/Fixed_Array_Argument_T.h"
00007
00008 #if !defined (__ACE_INLINE__)
00009 #include "tao/Fixed_Array_Argument_T.inl"
00010 #endif
00011
00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00013
00014 template<typename S_forany,
00015 template <typename> class Insert_Policy>
00016 CORBA::Boolean
00017 TAO::In_Fixed_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 template <typename> class Insert_Policy>
00028 void
00029 TAO::In_Fixed_Array_Argument_T<S_forany,Insert_Policy>::
00030 interceptor_value (CORBA::Any *any) const
00031 {
00032 Insert_Policy<S_forany>::any_insert (any, this->x_);
00033 }
00034
00035 #endif
00036
00037 template<typename S_forany,
00038 template <typename> class Insert_Policy>
00039 TAO::In_Fixed_Array_Clonable_Argument_T<S_forany,Insert_Policy>::~In_Fixed_Array_Clonable_Argument_T (void)
00040 {
00041 if (this->is_clone_)
00042 {
00043 typedef TAO::details::array_traits<S_forany> ARRAY_TRAITS;
00044 typename ARRAY_TRAITS::slice_type * tmp =
00045 const_cast<typename ARRAY_TRAITS::slice_type *>(this->x_.in ());
00046 ARRAY_TRAITS::free (tmp);
00047 }
00048 }
00049
00050 template<typename S_forany,
00051 template <typename> class Insert_Policy>
00052 TAO::Argument*
00053 TAO::In_Fixed_Array_Clonable_Argument_T<S_forany,Insert_Policy>::clone (void)
00054 {
00055 typedef TAO::details::array_traits<S_forany> ARRAY_TRAITS;
00056 typename ARRAY_TRAITS::slice_type * tmp_ptr = 0;
00057 ACE_ALLOCATOR_RETURN (tmp_ptr,
00058 ARRAY_TRAITS::alloc (),
00059 0);
00060 ARRAY_TRAITS::copy (tmp_ptr, this->x_.in ());
00061
00062 In_Fixed_Array_Clonable_Argument_T<S_forany,Insert_Policy>* clone_arg
00063 = new In_Fixed_Array_Clonable_Argument_T<S_forany,Insert_Policy> (tmp_ptr);
00064 clone_arg->is_clone_ = true;
00065 return clone_arg;
00066 }
00067
00068
00069
00070 template<typename S_forany,
00071 template <typename> class Insert_Policy>
00072 CORBA::Boolean
00073 TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::marshal (
00074 TAO_OutputCDR & cdr)
00075 {
00076 return cdr << this->x_;
00077 }
00078
00079 template<typename S_forany,
00080 template <typename> class Insert_Policy>
00081 CORBA::Boolean
00082 TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::demarshal (
00083 TAO_InputCDR & cdr)
00084 {
00085 return cdr >> this->x_;
00086 }
00087
00088 #if TAO_HAS_INTERCEPTORS == 1
00089
00090 template<typename S_forany,
00091 template <typename> class Insert_Policy>
00092 void
00093 TAO::Inout_Fixed_Array_Argument_T<S_forany,Insert_Policy>::
00094 interceptor_value (CORBA::Any *any) const
00095 {
00096 Insert_Policy<S_forany>::any_insert (any, this->x_);
00097 }
00098
00099 #endif
00100
00101
00102
00103 template<typename S_forany,
00104 template <typename> class Insert_Policy>
00105 CORBA::Boolean
00106 TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>::demarshal (
00107 TAO_InputCDR & cdr)
00108 {
00109 return cdr >> this->x_;
00110 }
00111
00112 #if TAO_HAS_INTERCEPTORS == 1
00113
00114 template<typename S_forany,
00115 template <typename> class Insert_Policy>
00116 void
00117 TAO::Out_Fixed_Array_Argument_T<S_forany,Insert_Policy>::
00118 interceptor_value (CORBA::Any *any) const
00119 {
00120 Insert_Policy<S_forany>::any_insert (any, this->x_);
00121 }
00122
00123 #endif
00124
00125
00126
00127 template<typename S_var,
00128 typename S_forany,
00129 template <typename> class Insert_Policy>
00130 CORBA::Boolean
00131 TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::
00132 demarshal (TAO_InputCDR & cdr)
00133 {
00134 typedef TAO::Array_Traits<S_forany> ARRAY_TRAITS;
00135 typename S_forany::_slice_type * tmp_ptr = 0;
00136 ACE_ALLOCATOR_RETURN (tmp_ptr,
00137 ARRAY_TRAITS::alloc (),
00138 false);
00139 this->x_ = tmp_ptr;
00140 S_forany tmp (this->x_.ptr ());
00141 return cdr >> tmp;
00142 }
00143
00144 #if TAO_HAS_INTERCEPTORS == 1
00145
00146 template<typename S_var,
00147 typename S_forany,
00148 template <typename> class Insert_Policy>
00149 void
00150 TAO::Ret_Fixed_Array_Argument_T<S_var,S_forany,Insert_Policy>::
00151 interceptor_value (CORBA::Any *any) const
00152 {
00153 Insert_Policy<S_forany>::any_insert (any, S_forany (this->x_.ptr ()));
00154 }
00155
00156 #endif
00157
00158 TAO_END_VERSIONED_NAMESPACE_DECL
00159
00160 #endif