Boost logo

Boost Users :

From: Braddock Gaskill (braddock_at_[hidden])
Date: 2007-03-16 16:01:00


On Tue, 30 Jan 2007 12:02:23 -0500, Ronald Garcia wrote:
> It IS possible to prevent exception throws, but it will require a
> little work on your part. dynamic_properties has a constructor of
> the form:
> dynamic_properties(
> const boost::function<
> std::auto_ptr<dynamic_property_map> (
> const std::string&, const boost::any&, const boost::any&)
> >& fn)
>
> If an attempt is made to put() a value for a non-existent key, then
> this function is used as a factory to create a new
> dynamic_property_map for those values. You can use this mechanism to

Does anyone have a code example of a reasonable implementation of this
dynamic_property_map functor technique to read graphviz dot files with
arbitrary properties?

I've been trying to extract and adapt the bgl python library's nice
read_graphviz function, which implements this dynamic_property_map functor
technique, but it is still not functional after several hours of template
struggles.

I have been using a (long) hard-coded property list for read_graphviz in my
code for the past year, but there are so many obscure dot file properties that
it is still very hit-or-miss.

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