Boost logo

Boost Users :

Subject: Re: [Boost-users] read_graphviz with a simple graph
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-06-23 16:30:09


On Thu, 23 Jun 2011, David Doria wrote:

> On Thu, Jun 23, 2011 at 4:06 PM, Jeremiah Willcock <jewillco_at_[hidden]> wrote:
>> On Thu, 23 Jun 2011, Jeremiah Willcock wrote:
>>
>>> On Wed, 22 Jun 2011, David Doria wrote:
>>>
>>>>> I think you will need some kind of property to store the vertex names
>>>>> from
>>>>> Graphviz; you might be able to use null_property_map for that (from
>>>>> <boost/graph/property_maps/null_property_map.hpp>) though.
>>>>>
>>>>> -- Jeremiah Willcock
>
> Hm, I tried:
>
> #include <boost/graph/property_maps/null_property_map.hpp>
> ...
>
> typedef boost::adjacency_list < boost::vecS, boost::vecS,
> boost::directedS, VertexProperty> Graph;
> boost::dynamic_properties dp;
> dp.property("node_id",
> boost::make_null_property<Graph::vertex_descriptor, std::string>() );
>
> but I get a compiler error on that last line (i.e. if I comment it the
> error goes away) that says:
>
> "error: no matching function for call to
> 'get(boost::null_property_map<unsigned int, std::basic_string<char> >
> &, unsigned int)"
>
> I don't know what that means ?

Apparently null_property_map is write-only, so it doesn't have a get()
function; I hadn't realized that. Please try dummy_property_map (from
boost/property_map/property_map.hpp) instead, or if that doesn't work,
static_property_map or ref_property_map from the same file.

-- Jeremiah Willcock


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