8 #ifndef OPENFPM_DATA_SRC_GRID_GRID_COMMON_HPP_ 
    9 #define OPENFPM_DATA_SRC_GRID_GRID_COMMON_HPP_ 
   27 template<
unsigned int dim, 
typename S, 
typename Memory>
 
   40     typedef typename S::value_type::type 
ov_seq;
 
   55     :key(key),grid_dst(grid_dst),obj(obj){};
 
   66     :key(key),grid_dst(grid_dst),
obj(
obj)
 
   67     {std::cerr << 
"Error: " <<__FILE__ << 
":" << __LINE__ << 
" Passing a temporal object";};
 
   75         typedef typename boost::remove_reference<decltype(
grid_dst.template get<T::value>(
key))>::type copy_rtype;
 
grid_key_dx is the key to access any element in the grid 
 
S::value_type obj_type
type of the object we have to set 
 
const encapc< 1, obj_type, Memory > & obj
object we have to store 
 
void operator()(T &t) const 
It call the copy function for each property. 
 
this class is a functor for "for_each" algorithm 
 
Metafunction take T and return a reference. 
 
copy_cpu_encap(grid_key_dx< dim > &key, S &grid_dst, const encapc< 1, obj_type, Memory > &obj)
constructor 
 
This class is a trick to indicate the compiler a specific specialization pattern. ...
 
grid_key_dx< dim > & key
size to allocate 
 
S & grid_dst
grid where we have to store the data 
 
S::value_type::type ov_seq
type of the object boost::sequence