Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2007-08-07 09:55:42


Author: vladimir_prus
Date: 2007-08-07 09:55:41 EDT (Tue, 07 Aug 2007)
New Revision: 38495
URL: http://svn.boost.org/trac/boost/changeset/38495

Log:
Document config file support in more detail. Fixes #808. Fixes #1125.
Text files modified:
   trunk/libs/program_options/doc/overview.xml | 40 +++++++++++++++++++++++++++++++++++++++-
   1 files changed, 39 insertions(+), 1 deletions(-)

Modified: trunk/libs/program_options/doc/overview.xml
==============================================================================
--- trunk/libs/program_options/doc/overview.xml (original)
+++ trunk/libs/program_options/doc/overview.xml 2007-08-07 09:55:41 EDT (Tue, 07 Aug 2007)
@@ -478,7 +478,45 @@
     <title>Specific parsers</title>
 
     <section>
- <title>Environment variables</title>
+ <title>Configuration file parser</title>
+
+ <para>The &parse_config_file; function implements parsing
+ of simple INI-like configuration files. Configuration file
+ syntax is line based:
+ </para>
+ <itemizedlist>
+ <listitem><para>A line in the form:</para>
+ <screen>
+<replaceable>name</replaceable>=<replaceable>value</replaceable>
+ </screen>
+ <para>gives a value to an option.</para>
+ </listitem>
+ <listitem><para>A line in the form:</para>
+ <screen>
+[<replaceable>section name</replaceable>]
+ </screen>
+ <para>introduces a new section in the configuration file.</para>
+ </listitem>
+ <listitem><para>The <literal>#</literal> character introduces a
+ comment that spans until the end of the line.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The option names are relative to the section names, so
+ the following configuration file part:</para>
+ <screen>
+[gui.accessibility]
+visual_bell=yes
+ </screen>
+ <para>is equivalent to</para>
+ <screen>
+gui.accessibility.visual_bell=yes
+ </screen>
+
+ </section>
+
+ <section>
+ <title>Environment variables parser</title>
 
       <para><firstterm>Environment variables</firstterm> are string variables
       which are available to all programs via the <code>getenv</code> function


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk