
Marco Meoni - Sbaush wrote:
Hi all. I understood how to serialize correctly nested structures, defining serialize method inside all.
I've a problem with an attribute of a struct. The attribute is border of OpenCV CvSeq type.
Here is my code... what can i do to solve this?
struct Element{ unsigned int id; double area; double perimeter; CvRect bounding_box; CvSeq* border; ... ... };
namespace boost { namespace serialization {
template<class Archive> void serialize(Archive & ar, Element & g, const unsigned int version) { ar & g.id http://g.id; ar & g.area ; ar & g.perimeter ; ar & g.bounding_box.width ; ar & g.bounding_box.height ; ar & g.bounding_box.x ; ar & g.bounding_box.y ; // ar & g.border; I CAN'T DO THIS...
You need to do the same for CvSeq that you did for Element: template<class Archive> void serialize(Archive& ar, CvSeq& aCvSeq , const unsigned int) { ... Jeff