Update of /cvsroot/boost/boost/boost/graph
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27723/boost/graph

Modified Files:
      Tag: RC_1_34_0
        adj_list_serialize.hpp 
Log Message:
Fix adjacency list and property map serialization

Index: adj_list_serialize.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/adj_list_serialize.hpp,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -u -d -r1.5.2.2 -r1.5.2.3
--- adj_list_serialize.hpp      21 Sep 2006 17:01:37 -0000      1.5.2.2
+++ adj_list_serialize.hpp      5 Feb 2007 22:16:57 -0000       1.5.2.3
@@ -19,6 +19,7 @@
 #include <boost/serialization/split_free.hpp>
 
 namespace boost { 
+
 namespace serialization {
 
 // Turn off tracking for adjacency_list. It's not polymorphic, and we
@@ -51,15 +52,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 +86,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 +94,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) 
);
   }
 }
 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to