Property tree example debug_settings.cpp
Hi, In http://www.boost.org/doc/libs/1_42_0/libs/property_tree/examples/debug_setti... FOREACH lines are commented out. <debug> <filename>debug.log</filename> <modules> <module>Finance</module> <module>Admin</module> <module>HR</module> </modules> <level>2</level> </debug> Then I compiled and tested the program and noticed it wrote only one value for the <modules> tag above. Here it is the output: <?xml version="1.0" encoding="utf-8" ?> - <#> <debug> <filename>debug.log</filename> <level>2</level> - <#> <modules> <module>HR</module> </modules>
Il 26/02/2010 03:33, Mauricio Gomes ha scritto:
Hi,
[...]
What is the status of this library ? Is this a known bug or it is just the example that is not uptodate ? If the latter, can anyone provide a functional version of debug_settings.cpp ?
Thanks !
I dear, problem is that property tree documentation is outdated. I
looked at the source code to understand how this library works. It's not
so difficult, really.
Follows an example from my project, hope it can help you. It writes out
a collection of values on a property tree. It is a workaround for the
bugged FOREACH into the documentation.
If you have some questions, please ask.
void ir_builder::add_item(
char id,
std::string name,
double value,
bool symbolic,
std::vector<unsigned int> nodes,
std::map
participants (2)
-
Mauricio Gomes
-
Michele Caini