Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-07-18 08:32:57


Hi Rob,

You are right, something is missing there. The example needs to either
create an object like this:

first_vertex_name_t first_vertex_name;

or create it on the fly:

get(first_vertex_name_t(), G)

Cheers,
Jeremy

On Wed, 18 Jul 2001, Rob Smallshire wrote:

> I having some trouble getting to grips with custom vertex properties
> as described on the following page of the documentation:
>
> http://www.boost.org/libs/graph/doc/using_adjacency_list.html
>
> In the example presented under the title 'Custom Vertex Properties' a
> new vertex property is defined as :
>
> struct first_vertex_name_t {
> enum { num = 201 };
> typedef vertex_property_tag kind;
> };
>
> Later in the code we find the line:
>
> property_map<MyGraphType, first_vertex_name_t>::type
> name = get(first_vertex_name, G);
>
> How is the identifier 'first_vertex_name' (without the _t)
> obtained ? I can not see it referred to elsewhere in the example!
>
> The complete source code for the example in interior_property_map.cpp
> uses the enum and the BOOST_INSTALL_PROPERTY macro, and so is
> actually a slightly different example to that shown in the HTML
> documentation.
>
> Regards,
>
> Rob Smallshire
>
>
>
>
>
> Info: http://www.boost.org Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
 Summer Manager, AT&T Research phone: (973) 360-8185
----------------------------------------------------------------------


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