Hi!
I've tried to include the <boost/graph/adjacency_list.hpp˙> but it hasn't changed anything.
Let's see the code:
1. I have the graph adaptor struct as in my first mail
2. Trait functions in the header (where i tried to include adjacency_list.hpp). I still think it's not neccessary to copy the vertex, and edge iterator implementations (of course i'll do it if you say so):
namspace boost ˙{
struct legacy_graph_traversal_category ˙{...};
namespace detail ˙{
struct traits_base {...};
} // namespace detail
// general adapted graph traits
template <>
struct graph_traits<legacy_graph_adaptor> : public detail::traits_base {
struct out_edge_iterator : public detail::traits_base::edge_iter_base<out_edge_iterator>
{
typedef detail::traits_base::edge_iter_base<out_edge_iterator> Base;
out_edge_iterator(int legacy_vertex = 0, int* base_to = 0,
const legacy_graph* g = 0) : Base(legacy_vertex, base_to, g) { }
private:
void increment() {
advance();
}
friend class iterator_core_access;
};
};
graph_traits<legacy_graph_adaptor>::vertex_descriptor
source(graph_traits<legacy_graph_adaptor>::edge_descriptor e,
const legacy_graph_adaptor& g);
graph_traits<legacy_graph_adaptor>::vertex_descriptor
target(graph_traits<legacy_graph_adaptor>::edge_descriptor e,
const legacy_graph_adaptor& g);
graph_traits<legacy_graph_adaptor>::vertices_size_type
num_vertices(const legacy_graph_adaptor& g);
std::pair<boost::graph_traits<legacy_graph_adaptor>::vertex_iterator,
boost::graph_traits<legacy_graph_adaptor>::vertex_iterator>
vertices(const legacy_graph_adaptor& g);
graph_traits<legacy_graph_adaptor>::degree_size_type
out_degree(graph_traits<legacy_graph_adaptor>::vertex_descriptor v,
const legacy_graph_adaptor& g);
std::pair<graph_traits<legacy_graph_adaptor>::out_edge_iterator,
graph_traits<legacy_graph_adaptor>::out_edge_iterator>
out_edges(graph_traits<legacy_graph_adaptor>::vertex_descriptor v,
const legacy_graph_adaptor& g);
} // namespace boost
All this functions are declareted in the corresponding cpp file.