2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-01 20:42:11 +00:00

Added graph property to serialization, and made default graph property no_property to allow serialization; fixes #5310

[SVN r77615]
This commit is contained in:
Jeremiah Willcock
2012-03-28 20:56:44 +00:00
parent 9092da0b8f
commit 7fccfd1f42
2 changed files with 6 additions and 3 deletions

View File

@@ -61,6 +61,8 @@ inline void save(
ar << serialization::make_nvp("v" , indices[target(e,graph)]);
ar << serialization::make_nvp("edge_property", get(edge_all_t(), graph, e) );
}
ar << serialization::make_nvp("graph_property", get_property(graph, graph_all_t()) );
}
@@ -95,6 +97,7 @@ inline void load(
boost::tie(e,inserted) = add_edge(verts[u], verts[v], graph);
ar >> serialization::make_nvp("edge_property", get(edge_all_t(), graph, e) );
}
ar >> serialization::make_nvp("graph_property", get_property(graph, graph_all_t()) );
}
template<class Archive, class OEL, class VL, class D, class VP, class EP, class GP, class EL>

View File

@@ -235,17 +235,17 @@ namespace boost {
struct graph_property_type
: boost::mpl::eval_if<detail::has_graph_property_type<G>,
detail::get_graph_property_type<G>,
boost::mpl::void_> {};
no_property> {};
template <typename G>
struct edge_property_type
: boost::mpl::eval_if<detail::has_edge_property_type<G>,
detail::get_edge_property_type<G>,
boost::mpl::void_> {};
no_property> {};
template <typename G>
struct vertex_property_type
: boost::mpl::eval_if<detail::has_vertex_property_type<G>,
detail::get_vertex_property_type<G>,
boost::mpl::void_> {};
no_property> {};
template<typename G>
struct graph_bundle_type {