Boost logo

Boost :

Subject: [boost] Serializing a Graph Structure Using Boost
From: Nouf M. (noufmks_at_[hidden])
Date: 2013-12-23 08:36:21


Hi,

I would like to use boost to serialize my graph (it's in the boost
adjacency list format)... I couldn't do it...

I managed to serialize an array and some other structures as follows:

int I[5] = {0,1,2,3,4};

boost::archive::text_iarchive ia(file),

ia << I;
but that doesn't work with graph data in the boost adjacency list format...

when I write:

ia << g //g is my graph

I get the following compilation error:

'serialize' is not member of 'VertexProperties'

'VertexProperties' is a structure that I wrote as follows:

struct VertexProperties
{
int id;
int weight;
};

I don't know how to add 'serialize' as a member function...

I also tried "SavingArchieve" template but couldn't do it... Any idea's
please? or references?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk