how should i do that, the thing is that i am working in a network linux home and i have to find a way to be make that change in my own proyect not modificating the boost/multiarray.hpp. You will have to excuse my english i am from cuba.
i have this code but i don't know how to call it inside a class were i already have a serialize methods for other parameters of the class, i also want to make an xml output file.
#ifndef BOOST_MULTI_ARRAY_S11N_HPP
#define BOOST_MULTI_ARRAY_S11N_HPP
//For serialization
#include
#include
#include
#include
#include
#include
#include
#include
//#include
//For multi_array
#include
namespace boost {
namespace serialization {
//-----------------------------------------------------------------------------
template< class Archive, class T >
void save( Archive & ar, const multi_array& t,
const unsigned int /* version */ )
{
unsigned int rows = t.shape()[0];
unsigned int cols = t.shape()[1];
ar & rows & cols;
for ( unsigned int i=0; i for ( unsigned int j=0; j ar & t[i][j];
}
}
}
template< class Archive, class T >
void load( Archive & ar, multi_array& t,
const unsigned int /* version */ )
{
unsigned int rows, cols;
ar & rows & cols;
t.resize( boost::extents[rows][cols] );
for ( unsigned int i=0; i for ( unsigned int j=0; j
ar & t[i][j];
}
}
}
template
inline void serialize( Archive & ar, multi_array& t,
const unsigned int file_version )
{
split_free(ar, t, file_version);
}
_______________________________________________
Boost-users mailing list