|
Boost Users : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2003-08-09 20:30:09
Hi,
First, to address why what you're doing doesn't work, then on to an
alternative.
The add_edge function is expecting arguments of type
graph_traits<Graph>::vertex_descriptor. Another words, you
get a compiler error because there is no add_edge function
defined for your GraphNode class.
As for an alternative, do you really need the node to be a base class,
or could you get
by with attaching a property to each node, where the property is a base
class.
The reason I say this is that the BGL adjacency_list graph lets the
user specify
property types, but not the vertex_descriptor type.
Another option, of course, would be to implement your own graph class.
Cheers,
Jeremy
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net