Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-04-15 07:40:11


> I've just made an attempt to use the named parameters library (currently
in
> review queue, and available at
> http://groups.yahoo.com/group/boost/files/named_params.zip) to simply
> properties in BGL.
>
> Currently, to initialize all properties one has to do:
>
> edge_descriptor e = add_edge(....);
> put(e, g, vertex_color, 10);
> put(e, g, vertex_name, "foo");
>
> I hope that with the named parameters library it will be possible to do:
>
> add_edge(v1, v2, (vertex_color = 10, vertex_name = "foo"), g);

FWIW, I could try and see if it will be possible to use the assign lib to
write something like

assign::add_egde( v1, v2, g )(vertex_color,10)(vertex_name, "foo" );

or maybe

assign::inserter<X> edge_adder( g );
edge_adder( v1,v2 )(vertex_color,10)(vertex_name, "foo" );
edge_adder( v1,v3 )(vertex_color,10)(vertex_name, "bar" );

when I add the new functionality.

br

Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk