
Hi Chris,
Un-customized ptree uses (string, string) pairs to hold data. If you are
using sandbox-cvs version (i.e. the latest one), it is easy to customize
data type to be boost::any. There's even a working example on how to do that
in libs/property_tree/examples/custom_data_type.cpp. Once you do that, you
can then manually associate types with values.
As for associating types with a values read from a file, I don't see any
easy way to do it. How would the parser determine the type of the value that
it reads in?
Best regards,
Marcin
Uzytkownik "Chris Weed"
Marcin, I have looked at the documentation a little bit, and I have a few questions. It is not clear in the documentation if the implementation uses (std::string,boost::any) pairs, but I recall reading something about that being the case. With that set up it seems values inserted in the tree, programmatically, could have type information, but values read from a file could only be string types. I am interested in typing properties read in from a file. Is there a way to associate types with values read from a file. If not that is fine, I can always check if the type is a string and use lexical_cast. Chris
On 9/27/06, Marcin Kalicinski
wrote: Hi Chris,
The latest version is always in boost-sandbox CVS. You can access that anonymously - see instructions at http://boost.org/more/mailing_lists.htm#sandbox. Sandbox version is much improved over what is in boost vault (which is the version used for review), but the documentation is yet lagging behind, so you might encounter a couple of surprises. The good news is that the basic interface and usage have not changed.
Marcin
----- Original Message ----- From: "Chris Weed"
Newsgroups: gmane.comp.lib.boost.user Sent: Wednesday, September 27, 2006 4:47 PM Subject: [Property Tree] Latest version and CVS Hi, I am interested in using the new Property Tree library, and I was wondering where I can get the latest version. Chris
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users