22 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
Vladimir Prus 0f9793e369 Make option_groups.cpp compile. 2015-02-15 21:41:48 +03:00
Jurko 794de34bf9 trim trailing spaces 2014-12-02 01:40:17 +01:00
Vladimir Prus fd7b310993 Improve error reporting.
The name of option is now shown in most cases when it's feasible, and
clarify of the error messages has been improved throughout.

Patch from Leo Goodstadt.


[SVN r77827]
2012-04-08 08:42:39 +00:00
Vladimir Prus ae0ecf6581 Make vector print function in examples be more correct.
Fixes #6677.


[SVN r77826]
2012-04-08 08:17:53 +00:00
Vladimir Prus 9d7afca35c Return 0, not 1, when --help is passed.
Fixes #5329.


[SVN r70079]
2011-03-17 21:25:16 +00:00
Jeremiah Willcock 0a2145c008 Fixed tab and no-newline-at-end-of-file issues from inspection report
[SVN r61435]
2010-04-20 17:54:16 +00: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
Sascha Ochsenknecht 524460caba Enhance example, Fixes #3751, Patch from Alex Bukreev
[SVN r58289]
2009-12-11 13:01:31 +00:00
Sascha Ochsenknecht fbb8f045ee Fix compile warning about unused variable
[SVN r58253]
2009-12-09 18:14:33 +00:00
Sascha Ochsenknecht 69bb59d15f Adapt examples regarding to exception class cleanup
[SVN r58218]
2009-12-07 13:35:01 +00:00
Sascha Ochsenknecht 98b0f14f5a correct usage of tokenizer, memory bug, Fixes #3525
[SVN r57808]
2009-11-20 10:03:08 +00:00
Vladimir Prus 6aaee3bbef Qualify usage of 'exeception', now that boost also has such name
[SVN r53442]
2009-05-30 10:38:11 +00:00
Vladimir Prus 73cf706164 Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
Vladimir Prus e51a3ae742 Support for 'implicit' options.
Patch from Bryan Green.
Fixes #1131.


[SVN r38514]
2007-08-08 18:40:48 +00:00
Vladimir Prus a0a661e4ec Fix examples Jamfile
[SVN r38507]
2007-08-08 17:15:09 +00:00
Vladimir Prus eca947a1ab Add a new option to response_file.cpp to illustrate that options in
response files are overriden by options on the command line.


[SVN r26678]
2005-01-12 10:56:29 +00:00
Vladimir Prus 71d09ce7c9 Fix spelling.
[SVN r24728]
2004-08-25 08:10:06 +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 d8ad42dc7e Expand "How To" section and add more examples.
[SVN r24188]
2004-07-30 13:20:27 +00:00
Vladimir Prus 196f6c0b5b Import revision 295 of the program_options library.
[SVN r22823]
2004-05-14 13:40:31 +00:00