On Mon, 2004-11-08 at 11:32, Doug Gregor wrote:
A property writer is passed the output stream and the descriptor, so you want to write Component_Writer like so:
class Component_Writer { public: typedef boost::graph_traits
::vertex_descriptor Vertex_Type; Component_Writer(const Graph_Type& g) : g(g) {}
void operator()(std::ostream& out, Vertex_Type v) { boost::shared_ptr<Component> obj_ptr = get(vertex_name, g, v); // code from before... } };
Doug
So if I store the Component in the Vertex by value instead of within a
boost::shared_ptr then I would write the Component_Writer as:
class Component_Writer {
public:
typedef boost::graph_traits