Commit Graph

5 Commits

Author SHA1 Message Date
Vladimir Prus
bacc983235 Disable examples that use C++11 features. 2018-06-14 13:57:17 +03:00
Tom Kent
9bf97405dc Additional examples (#21)
* Added multiple inputs to example

In the section after the introduction of using value<vector<...>> to store
multiple values, I updated the example to show multiple input values and their
results.

* Make it clear how to enable sections for ini files

It was unclear how the user should support sections, should they have nested options_description's (no), nested variables_map's (no), it is just a dotted string that is input! This adds a snippet showing that.

* Added an example for environment options

This example shows how to use program_options to pull environmental options
into a program. This instance uses a function to map env options to config
options.

* Added an example showing different types in a config file

I went through a lot of the common types that a user may want to include in
a config file (especially the boolean options) and showed an example with
them all.

With some minor modifications, this could also be added to the tests directory
as there are several cases in here that I didn't see checked anywhere else in
the code.

* Added explanation comments to new examples

* Added an example with a heirarchy of inputs

This file shows an example program that can get inputs from the command line,
environmental variables, multiple config files specified on the command line,
and a default config file. There are multiple usage examples at the bottom in
the comments.

* Reference to example showing environment options

* Added section detailing type conversion.

Added explicity acknowledging that hex/oct/bin formatted strings aren't allowed.
Detailed the bool_switch value and what strings evaluate true/false.

* Added a global to the config file example

* Semicolon typo

* Split components into seperate functions

* Added unregistered entry and flag to prevent error

* Added logic to capture unregistered value

* Build new examples

* Backslashes need escaping on unix

* match permissions
2018-03-22 18:29:58 +03:00
Daniel James
9691bb1b62 Report error count at the actual end, rather than just the end of each file.
[SVN r60982]
2010-03-31 21:41:45 +00:00
Vladimir Prus
a0a661e4ec Fix examples Jamfile
[SVN r38507]
2007-08-08 17:15:09 +00:00
Vladimir Prus
196f6c0b5b Import revision 295 of the program_options library.
[SVN r22823]
2004-05-14 13:40:31 +00:00