Boost logo

Boost Users :

Subject: Re: [Boost-users] How to access a GRAPH property? - simple
From: Cedric Laczny (cedric.laczny_at_[hidden])
Date: 2010-08-14 04:49:02


Hi Mike,

please see Table 1 the last part on PropertyGraph on
http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/graph_concepts.html

You need first to get the property_map, which is the central concept to
graph-/vertex-/edge-properties.

You might try something like:
(get(graph_properties, g))[g].bobo

Hope that helps.

Best,

Cedric

On Saturday, 14. August 2010 02:59:23 Mike Douglass wrote:
> I have
>
> struct vertex_properties
> {
> blah blah
> }
>
> struct edge_properties
> {
> blah blah
> }
>
> struct graph_properties
> {
>
> int bobo;
>
> }
>
>
> typedef adjacency_list < vecS, vecS, bidirectionalS,
> property< vertex_predecessor_t, vertex_t, vertex_properties >,
> property< edge_reverse_t, edge_t, edge_properties >,
> graph_properties
>
> > graph_t;
>
> graph_t g;
>
> But how can I access bobo?
>
> g.bobo; does not compile (otherwise compiles OK).
>
> thanks


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