Commit Graph

13 Commits

Author SHA1 Message Date
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
Vladimir Prus
b9e8acef7b Add missing 'userinput'. Add spaces after shell prompt
[SVN r59944]
2010-02-26 07:40:11 +00:00
Vladimir Prus
ac6de20f85 Clarify special handling of vectors.
[SVN r33780]
2006-04-24 08:51:38 +00:00
Vladimir Prus
1e12dd69ff Markup user input in screens
[SVN r26281]
2004-11-24 14:56:28 +00:00
Vladimir Prus
718e376531 Doc tweak
[SVN r25372]
2004-09-23 10:54:19 +00:00
Vladimir Prus
903eef69e9 More edits
[SVN r24739]
2004-08-26 09:00:53 +00:00
Vladimir Prus
b4192e34b9 Another set of doc/comment edits from Charles.
[SVN r24657]
2004-08-23 10:18:09 +00:00
Vladimir Prus
24691b0584 More edits. Also, merge options_descriptons.xml into overview.xml.
[SVN r24186]
2004-07-30 08:41:12 +00:00
Vladimir Prus
03b0829de9 Even more edits from Charles.
[SVN r24157]
2004-07-29 14:00:01 +00:00
Vladimir Prus
03909f42c8 Apply numerous editorial corrections from Charles Brockman.
[SVN r23880]
2004-07-21 07:12:45 +00:00
Vladimir Prus
f084eeac4b Applied numerious suggestions from Pavel Vozenilek.
[SVN r23496]
2004-07-13 15:12:26 +00:00
Vladimir Prus
07f98fc711 Correct URLS in DOCTYPE element.
[SVN r23362]
2004-07-06 06:10:54 +00:00
Vladimir Prus
196f6c0b5b Import revision 295 of the program_options library.
[SVN r22823]
2004-05-14 13:40:31 +00:00