Boost logo

Boost Users :

Subject: [Boost-users] [BGL] graph serialization
From: Damien Maupu (damien.maupu_at_[hidden])
Date: 2010-04-19 14:35:05


Dear all,

I have a graph with edge property is a smart pointer to myEdge class.
I want to save my graph and choose the serialization option.
Saving the graph seems to work (if exporter to a text file I can see
that information is there).
Unfortunately, loading the graph fails as no edges are loaded.
In facts, the edge data is loaded (if I stop the debugger to the edge
serialization info seems to come) but not added to the graph.

In file adj_list_serialize.hpp
Ln 95: tie(e,inserted) = add_edge(verts[u], verts[v], graph);
Boolean "inserted" is true but still no edge is added to my graph
m_edges array (size keep to be 0).

I was wandering if it's because I am using smart pointer as my edge
property and that while saving doesn't require memory allocation for the
edge smart pointer, loading will. Would it be possible that this step is
skip? How could I fixed it?
Did anyone faced the same problem

My graph is a adjacency list and I did add the definition
BOOST_SERIALIZATION_SHARED_PTR for myEdge class.

Thank you very much

Damien


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