|
Boost Users : |
Subject: Re: [Boost-users] [graph] Extending bgl_named_params
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-10-22 12:49:30
On Mon, 22 Oct 2012, Philipp Moeller wrote:
> Hi,
>
> I maintain a library that introduces its own graph properties for domain
> specific algorithms and provides it's own implementation of
> bgl_named_parameters by essentially mimicking bgl_named_parameters
> one-to-one. With the refactoring in 1.51 that implementation broke and I
> had to add another implementation of named parameters which essentially
> looks like this:
(snip)
>> From the documentation it is not really obvious to me if other libraries
> are even supposed to provide their own properties and how/if they
> actually should be able to extend the named parameters API.
>
> Is that simply not an intended feature of the BGL or can that be done
> differently?
Nothing about the named parameter mechanism is documented, and it should
be replaced by Boost.Parameter sometime in the future. You should be able
to add your own parameters by just replicating the (multiple) definitions
of BOOST_BGL_ONE_PARAM_CREF from <boost/graph/named_function_params.hpp>
and applying them to your parameter keys. The last couple of those
definitions are only needed if you want to use Boost.Parameter as your
parameter handling mechanism with BGL named parameters provided for
compatibility (see <boost/graph/depth_first_search.hpp> for an example of
that).
-- 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