8 #ifndef OBJECT_WRITE_HPP_
9 #define OBJECT_WRITE_HPP_
12 #include "for_each_ref.hpp"
13 #include "util/variadic_to_vmpl.hpp"
14 #include "util/copy_compare/meta_copy.hpp"
15 #include <boost/mpl/range_c.hpp>
16 #include <boost/fusion/include/size.hpp>
18 template <
typename>
struct Debug;
32 template<
typename v_src,
typename v_dst,
int... prp>
64 {std::cerr <<
"Error: " <<__FILE__ <<
":" << __LINE__ <<
" Passing a temporal object\n";};
72 typedef typename boost::remove_reference<decltype(
dst.template
get<boost::mpl::at<
v_prp,boost::mpl::int_<T::value>>::type::value>())>::type copy_dtype;
73 typedef typename std::remove_reference<decltype(
src.template get<T::value>())>::type copy_stype;
95 template<
template<
typename,
typename>
class op,
typename v_src,
typename v_dst,
int... prp>
127 {std::cerr <<
"Error: " <<__FILE__ <<
":" << __LINE__ <<
" Passing a temporal object\n";};
135 typedef typename boost::remove_reference<decltype(
dst.template
get<boost::mpl::at<
v_prp,boost::mpl::int_<T::value>>::type::value>())>::type copy_dtype;
136 typedef typename std::remove_reference<decltype(
src.template get<T::value>())>::type copy_stype;
153 template<
typename v_src,
typename v_dst,
int... prp>
185 {std::cerr <<
"Error: " <<__FILE__ <<
":" << __LINE__ <<
" Passing a temporal object\n";};
192 typedef typename boost::mpl::at<typename v_dst::type,typename boost::mpl::int_<boost::mpl::at<v_prp,boost::mpl::int_<T::value>>::type::value>>::type ctype;
211 template<
template<
typename,
typename>
class op,
typename v_src,
typename v_dst,
int... prp>
243 {std::cerr <<
"Error: " <<__FILE__ <<
":" << __LINE__ <<
" Passing a temporal object\n";};
250 typedef typename boost::mpl::at<typename v_dst::type,typename boost::mpl::int_<boost::mpl::at<v_prp,boost::mpl::int_<T::value>>::type::value>>::type ctype;
267 template<
typename v_src,
typename v_dst,
int type_copy,
int... prp>
278 std::cerr <<
"Error object_copy: " << __FILE__ <<
" " << __LINE__ <<
"\n";
289 template<
typename v_src,
typename v_dst,
int... prp>
301 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
313 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
331 template<
typename v_src,
typename v_dst,
int... prp>
343 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
355 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
369 template<
template<
typename,
typename>
class op,
typename v_src,
typename v_dst,
int type_copy,
int... prp>
380 std::cerr <<
"Error object_copy: " << __FILE__ <<
" " << __LINE__ <<
"\n";
392 template<
template<
typename,
typename>
class op,
typename v_src,
typename v_dst,
int... prp>
404 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
416 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
435 template<
template<
typename,
typename>
class op,
typename v_src,
typename v_dst,
int... prp>
447 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
459 boost::mpl::for_each_ref< boost::mpl::range_c<int,0,
sizeof...(prp)> >(obj);
to_boost_vmpl< prp...>::type v_prp
Convert the packed properties into an MPL vector.
It copy the properties from one object to another.
object_s_di(const v_src &&vs, v_dst &&vd)
Implementation of the copy.
void operator()(T &t)
It call the functor for each member.
object_s_di(const v_src &vs, v_dst &vd)
Implementation of the copy.
to_boost_vmpl< prp...>::type v_prp
Convert the packed properties into an MPL vector.
to_boost_vmpl< prp...>::type v_prp
Convert the packed properties into an MPL vector.
const v_src & src
Source object.
object_s_di_e_op(const v_src &src, v_dst &dst)
Constructor.
object_s_di_op(const v_src &vs, v_dst &vd)
Implementation of the copy with operation.
this class is a functor for "for_each" algorithm
object_s_di_f_op(const v_src &src, v_dst &dst)
Constructor.
object_s_di_f(const v_src &src, v_dst &dst)
Constructor.
v_dst & dst
Destination object.
this class is a functor for "for_each" algorithm
void operator()(T &t)
It call the functor for each member.
object_s_di_op(const v_src &&vs, v_dst &&vd)
Implementation of the copy with operation.
object_s_di_e(const v_src &src, v_dst &dst)
Constructor.
object_s_di(const v_src &vs, v_dst &&vd)
Implementation of the copy.
v_dst & dst
Destination object.
object_s_di(const v_src &vs, v_dst &vd)
Stub method.
object_s_di(const v_src &vs, v_dst &vd)
Implementation of the copy.
to_boost_vmpl< prp...>::type v_prp
Convert the packed properties into an MPL vector.
It copy the properties from one object to another applying an operation.
this class is a functor for "for_each" algorithm
object_s_di_op(const v_src &vs, v_dst &vd)
Stub method.
object_s_di_op(const v_src &vs, v_dst &&vd)
Implementation of the copy with operation.
void operator()(T &t)
It call the functor for each member.
void operator()(T &t)
It call the functor for each member.
const v_src & src
Source object.
v_dst & dst
Destination object.
const v_src & src
Source object.
v_dst & dst
Destination object.
const v_src & src
Source object.
object_s_di_op(const v_src &vs, v_dst &vd)
Implementation of the copy with operation.
this class is a functor for "for_each" algorithm