• Advertisement
Sign in to follow this  

Boost serialization

This topic is 4257 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I've came to another problem and not quite sure how to resolve it. By the looks of it, it might be coming from the file format I'm trying to use, I'm not sure. Anyway, here's the problem: When I try to run the code where I declare serialization like this
template<class Archive> void serialize(Archive &tArchive, const unsigned int uiVersion)
	{
		tArchive & BOOST_SERIALIZATION_BASE_OBJECT_NVP(IRenderable);
		tArchive & BOOST_SERIALIZATION_BASE_OBJECT_NVP(CTree<CGUIElement *>);
		tArchive & boost::serialization::make_nvp("Name", m_strName);
		tArchive & boost::serialization::make_nvp("Rect", m_Rect);

// ...
};

When I come to the second line, it throws an unhandled exception. Now, I'm not sure what is caused it, but I guess its the XML archive I'm trying to save it to. As you all know, XML uses '<' and '>' as opening and closing tags, and me using specialized template as a base member emits the error because of the parser. So, which way do I serialize the base member for my class if its a template? Thanks and hope to hear from you soon.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement