Hi, I have made an addition to dynamic_property_map in the current CVS so that you can construct the dynamic properties object with the "ignore_other_properties" generator as follows: boost::dynamic_properties dp2(boost::ignore_other_properties); and read_graphviz will not throw an exception if you are not prepared for a particular property. HTH, ron On Mar 16, 2007, at 4:01 PM, Braddock Gaskill wrote:
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
( 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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users