[BGL]Customising the Adjacency List Storage
According to the book [BGL p232], in order to customise the EdgeList I need to define a container generator and parallel edge traits class, and over load the push() and erase() functions for the custom container [BGL p234]. My custom container is user::PushBackList<T>... namespace user { template<typename ValueType> struct PushBackList { //... }; struct PushBackListS { }; } ...and I've put the (specialised) container_gen and parallel_edge_traits classes in namespace boost... namespace boost { template<typename ValueType> struct container_genuser::PushBackListS,ValueType { typedef user::PushBackList<ValueType> type; }; template<> struct parallel_edge_traitsuser::PushBackListS { typedef allow_parallel_edge_tag type; }; } ...now all I need do is overload the push() and erase() functions. The problem is they are in nested namespace graph_detail and are called with full qualification (i.e. boost::graph_detail::push(...)) from adjacency_list class. That means I need to put my overloads in boost::graph_detail. Is that right? Thanks, Louis.
On Jul 3, 2006, at 5:06 AM, Louis Lavery wrote:
...now all I need do is overload the push() and erase() functions. The problem is they are in nested namespace graph_detail and are called with full qualification (i.e. boost::graph_detail::push(...)) from adjacency_list class.
That means I need to put my overloads in boost::graph_detail. Is that right?
Ick, yes, they'll need to go into boost::graph_detail. Doug
participants (2)
-
Douglas Gregor
-
Louis Lavery