Hi/re But what if i don't want to use dedicated variables, and want to store all configuration in one place? For example, i need to load configuration from file, but set some variables from the command-line, that will override values from file. Option processing will done in dedicated thread, and i want to pass only one argument - program_options object Paul Giaccone wrote:
Daniel Weiss wrote:
Hi
Is there any possibility to posteriorily change the values stored in the options map read from the config file? I.e.:
I have assigned the following option: ( "AutomZoneDetect", po::valuestd::string() ->default_value( "off" ), "To detect zones automatically" );
Now I would like to e.g. set this option to "on" at some point in my code...
Greets, Dan!
Just store it in a string variable so you can set it later.
std::string my_option;
( "AutomZoneDetect", po::valuestd::string(&my_option) ->default_value( "off" ), "To detect zones automatically" );
my_option = "on";
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- With best wishes, Alex Ott Jet Infosystems, Head of software development group, MBA +7 (095) 411 76 01 http://www.jetsoft.ru/