[program_options]How to save options to storage

HI, BOOST I am sorry if this is a stupid question. I did not found similar question yet. Sometimes we need to read config from a file and change some values then need to save it. So how can I serialize an option_description to stream? Thanks a lot. Regards Ken

clear more, my question is: What is the best way to save variables_map?
On 4/20/06, Ken
HI, BOOST
I am sorry if this is a stupid question. I did not found similar question yet.
Sometimes we need to read config from a file and change some values then need to save it. So how can I serialize an option_description to stream?
Thanks a lot.
Regards Ken

Ken wrote:
clear more, my question is: What is the best way to save variables_map?
Write a function to save it by hand. program_options does not provide any write capabilities. It is exclusively for reading. You could try the property_tree library currently under review. Sebastian Redl

Ken wrote:
HI, BOOST
I am sorry if this is a stupid question. I did not found similar question yet.
Sometimes we need to read config from a file and change some values then need to save it. So how can I serialize an option_description to stream?
This is not supported right now, though I'd like to implement this in a future version. - Volodya

Great! Expect it....
Ken
On 4/24/06, Vladimir Prus
Ken wrote:
HI, BOOST
I am sorry if this is a stupid question. I did not found similar question yet.
Sometimes we need to read config from a file and change some values then need to save it. So how can I serialize an option_description to stream?
This is not supported right now, though I'd like to implement this in a future version.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Ken
-
Sebastian Redl
-
Vladimir Prus