? .project
? bin.v2
? graph_serialization.diff
? stage
? boost/patch
? libs/graph/test/kevin-bacon2.dat
Index: boost/graph/adj_list_serialize.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/adj_list_serialize.hpp,v
retrieving revision 1.7
diff -u -r1.7 adj_list_serialize.hpp
--- boost/graph/adj_list_serialize.hpp	21 Sep 2006 17:02:14 -0000	1.7
+++ boost/graph/adj_list_serialize.hpp	20 Jan 2007 08:55:14 -0000
@@ -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) );
   }
 }
 
Index: boost/pending/property_serialize.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/pending/property_serialize.hpp,v
retrieving revision 1.1
diff -u -r1.1 property_serialize.hpp
--- boost/pending/property_serialize.hpp	10 Jan 2006 13:53:48 -0000	1.1
+++ boost/pending/property_serialize.hpp	20 Jan 2007 08:55:16 -0000
@@ -8,11 +8,8 @@
 
 #include <boost/pending/property.hpp>
 
-// Wierd, I get compilation errors if the following include is
-// removed, but it shouldn't be needed. Some kind of strange
-// include dependency in the serialization library.
-#include <boost/archive/text_iarchive.hpp>
 #include <boost/serialization/base_object.hpp>
+#include <boost/serialization/nvp.hpp>
 
 namespace boost {
   template<class Archive>
@@ -23,8 +20,8 @@
   serialize(Archive& ar, property<Tag, T, Base>& prop, 
             const unsigned int version) 
   {
-    ar & boost::serialization::base_object<Base>(prop);
-    ar & prop.m_value;
+    ar & serialization::make_nvp( "property_base" , boost::serialization::base_object<Base>(prop) );
+    ar & serialization::make_nvp( "property_value" , prop.m_value );
   }
 } // end namespace boost
 
Index: libs/graph/test/serialize.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/graph/test/serialize.cpp,v
retrieving revision 1.2
diff -u -r1.2 serialize.cpp
--- libs/graph/test/serialize.cpp	21 Sep 2006 17:02:14 -0000	1.2
+++ libs/graph/test/serialize.cpp	20 Jan 2007 08:55:23 -0000
@@ -8,15 +8,15 @@
 #include <boost/graph/breadth_first_search.hpp>
 #include <map>
 #include <boost/graph/adj_list_serialize.hpp>
-#include <boost/archive/text_iarchive.hpp>
-#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/xml_iarchive.hpp>
+#include <boost/archive/xml_oarchive.hpp>
 
 struct vertex_properties {
   std::string name;
 
   template<class Archive>
   void serialize(Archive & ar, const unsigned int version) {
-    ar & name;
+    ar & BOOST_SERIALIZATION_NVP(name);
   }  
 };
 
@@ -25,7 +25,7 @@
 
   template<class Archive>
   void serialize(Archive & ar, const unsigned int version) {
-    ar & name;
+    ar & BOOST_SERIALIZATION_NVP(name);
   }  
 };
 
@@ -34,6 +34,8 @@
 typedef adjacency_list<vecS, vecS, undirectedS, 
                vertex_properties, edge_properties> Graph;
 
+typedef graph_traits<Graph>::vertex_descriptor vd_type;
+
 
 typedef adjacency_list<vecS, vecS, undirectedS, 
                vertex_properties> Graph_no_edge_property;
@@ -42,22 +44,34 @@
 {
   {
     std::ofstream ofs("./kevin-bacon2.dat");
-    archive::text_oarchive oa(ofs);
+    archive::xml_oarchive oa(ofs);
     Graph g;
-    oa << g;
+		vertex_properties vp;
+		vp.name = "A";
+		vd_type A = add_vertex( vp, g );
+		vp.name = "B";
+		vd_type B = add_vertex( vp, g );
+
+		edge_properties ep;
+		ep.name = "a";
+		add_edge( A, B, ep, g);
+
+    oa << BOOST_SERIALIZATION_NVP(g);
 
     Graph_no_edge_property g_n;
-    oa << g_n;
+    oa << BOOST_SERIALIZATION_NVP(g_n);
   }
 
   {
     std::ifstream ifs("./kevin-bacon2.dat");
-    archive::text_iarchive ia(ifs);
+    archive::xml_iarchive ia(ifs);
     Graph g;
-    ia >> g;
+    ia >> BOOST_SERIALIZATION_NVP(g);
+
+		if  (!( g[*(vertices( g ).first)].name == "A" )) return -1;
 
     Graph_no_edge_property g_n;
-    ia >> g_n;
+    ia >> BOOST_SERIALIZATION_NVP(g_n);
   }
   return 0;
 }
