Hi all,
#define PARAMETERS_HPP
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp>
#include <iostream>
class rss_feeds_to_parse
{
public:
bool all;
template<class Archive> void serialize(Archive & ar, const unsigned int file_version)
{
ar & BOOST_SERIALIZATION_NVP(all);
}
};
class parameters
{
public:
rss_feeds_to_parse feeds;
template<class Archive> void serialize(Archive & ar, const unsigned int file_version)
{
ar & BOOST_SERIALIZATION_NVP(feeds);
}
};
#endif // PARAMETERS_HPP
parameters p;
p.feeds.all = true;
std::ofstream ofs("test_parameters.xml");
assert(ofs.good());
boost::archive::xml_oarchive oa(ofs);
oa << BOOST_SERIALIZATION_NVP(p);