Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2007-10-18 15:11:49


Hi David,

On Oct 15, 2007, at 9:22 AM, David Angelo wrote:
> I am using the BGL and now I want to serialize the graph.
> Serialization of the vertices and edges works fine, but how do I
> serialize the vertex|edge properties?
> [snip]
> typedef property<vertex_cId_t, std::string> CVertexId;
> typedef property<vertex_cShape_t, std::string, CVertexId>
> CVertexShape;
> typedef property<vertex_cType_t, int, CVertexShape> CVertexAttribute;
>
> typedef property<edge_cColor_t, string> CEdgeColor;
> typedef property<edge_cType_t, int, CEdgeColor> CEdgeAttribute;
>
> typedef adjacency_list<vecS, vecS, undirectedS, CVertexAttribute,
> CEdgeAttribute> Graph;
> </code>
>
> How must the serialize functions for CVertexAttribute and
> CEdgeAttribute look like?

The serialization code for property<...> types is in boost/pending/
property_serialize.hpp, which is already included by the BGL
serialization code for adjacency lists. Are you running into some
kind of compilation error?

        - Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net