Update of /cvsroot/boost/boost/boost/graph
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12490/boost/graph
Modified Files:
adj_list_serialize.hpp
Log Message:
Adjacency list serialization fixes, from David Keller
Index: adj_list_serialize.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/adj_list_serialize.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- adj_list_serialize.hpp 21 Sep 2006 17:02:14 -0000 1.7
+++ adj_list_serialize.hpp 29 Jan 2007 19:54:47 -0000 1.8
@@ -51,15 +51,15 @@
typename graph_traits<Graph>::vertex_iterator vi;
for (vi = vertices(graph).first; vi != vertices(graph).second; ++vi) {
indices[*vi] = num++;
- ar << get(vertex_all_t(), graph, *vi);
+ ar << serialization::make_nvp("vertex_property", get(vertex_all_t(),
graph, *vi) );
}
// write edges
typename graph_traits<Graph>::edge_iterator ei;
for (ei = edges(graph).first; ei != edges(graph).second; ++ei){
- ar << BOOST_SERIALIZATION_NVP(indices[source(*ei,graph)]);
- ar << BOOST_SERIALIZATION_NVP(indices[target(*ei,graph)]);
- ar << get(edge_all_t(), graph, *ei);
+ ar << serialization::make_nvp("u" , indices[source(*ei,graph)]);
+ ar << serialization::make_nvp("v" , indices[target(*ei,graph)]);
+ ar << serialization::make_nvp("edge_property", get(edge_all_t(), graph,
*ei) );
}
}
@@ -85,7 +85,7 @@
while(V-- > 0){
Vertex v = add_vertex(graph);
verts[i++] = v;
- ar >> get(vertex_all_t(), graph, v);
+ ar >> serialization::make_nvp("vertex_property", get(vertex_all_t(),
graph, v) );
}
while(E-- > 0){
int u; int v;
@@ -93,7 +93,7 @@
ar >> BOOST_SERIALIZATION_NVP(v);
Edge e; bool inserted;
tie(e,inserted) = add_edge(verts[u], verts[v], graph);
- ar >> get(edge_all_t(), graph, e);
+ ar >> serialization::make_nvp("edge_property", get(edge_all_t(), graph, e)
);
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs