|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67156 - in sandbox/configurator: boost/configurator/detail libs/configurator libs/configurator/doc
From: for.dshevchenko_at_[hidden]
Date: 2010-12-11 00:05:34
Author: dshevchenko
Date: 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
New Revision: 67156
URL: http://svn.boost.org/trac/boost/changeset/67156
Log:
1.0pre documentation continue.
Added:
sandbox/configurator/libs/configurator/doc/advanced_usage.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/appendix.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/boost.png (contents, props changed)
sandbox/configurator/libs/configurator/doc/common_usage.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/config_file_customizing.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/config_file_format.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/examples.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/index.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/own.css (contents, props changed)
sandbox/configurator/libs/configurator/doc/reference.html (contents, props changed)
sandbox/configurator/libs/configurator/doc/requirements.html (contents, props changed)
Text files modified:
sandbox/configurator/boost/configurator/detail/semantics_checker.hpp | 29 +
sandbox/configurator/libs/configurator/doc/acknowledgments.html | 106 ++---
sandbox/configurator/libs/configurator/doc/overview.html | 739 ++++-----------------------------------
sandbox/configurator/libs/configurator/index.html | 35 +
4 files changed, 188 insertions(+), 721 deletions(-)
Modified: sandbox/configurator/boost/configurator/detail/semantics_checker.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/detail/semantics_checker.hpp (original)
+++ sandbox/configurator/boost/configurator/detail/semantics_checker.hpp 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -89,18 +89,27 @@
#endif
public:
void operator()() {
- #ifdef WITH_SEMANTIC_CHECK
- BOOST_FOREACH ( option& registered_option, registered_options ) {
- if ( !registered_options.empty()
- && registered_option.semantic_defined() ) {
- const std::string& value = registered_option.value;
- const std::string name = prepare_full_name_for_log( registered_option.location
- , sections_separator );
- semantic_checkers[ registered_option.semantic ]( value, name );
- } else {}
- }
+ #ifdef WITH_SEMANTIC_CHECK
+ std::for_each( registered_options.begin()
+ , registered_options.end()
+ , boost::bind( &semantics_checker::check, this, _1 ) );
#endif
}
+#ifdef WITH_SEMANTIC_CHECK
+private:
+ void check( const option& registered_option ) {
+ if ( semantics_check_needed( registered_option ) ) {
+ const std::string& value = registered_option.value;
+ const std::string location = prepare_full_name_for_log( registered_option.location
+ , sections_separator );
+ semantic_checkers[ registered_option.semantic ]( value, location );
+ } else {}
+ }
+
+ bool semantics_check_needed( const option& registered_option ) const {
+ return !registered_option.empty() && registered_option.semantic_defined();
+ }
+#endif
};
} // namespace detail
Modified: sandbox/configurator/libs/configurator/doc/acknowledgments.html
==============================================================================
--- sandbox/configurator/libs/configurator/doc/acknowledgments.html (original)
+++ sandbox/configurator/libs/configurator/doc/acknowledgments.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -1,68 +1,50 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
-<head>
- <meta http-equiv="Content-Language" content="en-us">
- <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
- <link rel="stylesheet" type="text/css" href="../../../boost.css">
-
- <title>Configurator - Acknowledgments</title>
-<link rel="icon" href="/favicon.ico" type="image/ico"><link rel="stylesheet" type="text/css" href="/style-v2/section-basic.css"></head>
-
-<body link="#0000FF" vlink="#800080"> <div id="boost-common-heading-doc">
- <div class="heading-inner">
- <div class="heading-placard"></div>
-
- <h1 class="heading-title">
- <a href="/">
- <img src="/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
- <span class="heading-boost">Boost</span>
- <span class="heading-cpplibraries">C++ Libraries</span>
- </a></h1>
-
- <p class="heading-quote">
- <q>...one of the most highly
- regarded and expertly designed C++ library projects in the
- world.</q> <span class="heading-attribution">— <a href=
- "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
- "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
- Alexandrescu</a>, <a href=
- "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
- Coding Standards</a></span></p>
-
- <div class="heading-sections">
- <ul>
- <li class="welcome-section-tab">Welcome</li>
- <li class="boost-section-tab">Introduction</li>
- <li class="community-section-tab">Community</li>
- <li class="development-section-tab">Development</li>
- <li class="support-section-tab">Support</li>
- <li class="doc-section-tab">Documentation</li>
- </ul>
- </div>
-</div>
- </div>
-
- <div id="boost-common-heading-doc-spacer"></div>
-
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
- <h1 align="center">Configurator</h1>
-
- <h2 align="center">Acknowledgments</h2>
- I'm very grateful to <b>Bjarne Stroustrup</b>, who invented so beautiful, so powerful and so dangerous language!
-<br/>
-Also I grateful to all authors of <b>Boost C++ libraries</b>. Thank you for your work!
- <hr>
-
- <p>Revised
- <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->30
- November, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" --></p>
-
- <p><i>Copyright © 2010 Denis Shevchenko</i></p>
+ <h2>Acknowledgments</h2>
- <p><i>Distributed under the Boost Software License, Version 1.0. (See
- accompanying file LICENSE_1_0.txt or
- copy at <a href=
- "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</i></p>
-</body>
+ I would first like to thank <strong>Bjarne Stroustrup</strong> who invented so beautiful, so powerful and so dangerous language!
+ <br/><br/>
+ Also I would like to express my special acknowledgement to:
+ <br/><br/>
+ <strong>Pierre Morcello</strong> who took time to analyze my code, and gave a lot of valuable comments. Without his help I probably would not have been able to create this library.
+
+ <br/><br/>
+ <strong>Hartmut Kaiser</strong> who inspired me to start learning Spirit.
+
+ <br/><br/>
+ <strong>Michael Caisse</strong> for his excellent slide presentation about Spirit usage.
+
+ <br/><br/>
+ <strong>Rob Stewart</strong> who gave me some useful comments about the library.
+
+ <br/><br/>
+ Finally, I would like to thank all developers of <strong>Boost</strong>. Thank you for your work!
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
</html>
Added: sandbox/configurator/libs/configurator/doc/advanced_usage.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/advanced_usage.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,449 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Advanced usage</h2>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h2><a name="topic2" id="topic2"></a>Advanced usage</h2>
+
+ <p>
+ <a name="options_necessity"><h3>How to set option's necessity</h3></a>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ conf.in( "Server" ).add_here( "Host" ).necessary();
+ // ...
+}
+</pre>
+After this user must inputs "Host" option in configuration file. If not, exception will thrown:
+<br/>
+<strong>[Configurator] Option 'Server > Host' is defined as necessary, but it missed!</strong>
+<br/>
+<a name="options_default_value"><h3>How to set option's default value</h3></a>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ conf.in( "Server" ).add_here( "Host" ).default_value( "127.0.0.1" );
+ // ...
+}
+</pre>
+After this user can skip "Host" option in configuration file.
+<br/>
+<a name="options_semantics_check"><h3>How to set option's semantics check</h3></a>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ conf.in( "Server" ).add_here( "Host" ).check_semantic( boost::cf::ip );
+ // ...
+}
+</pre>
+After this value of "Host" option must be valid IP address (IPv4 or IPv6). If not, exception will be thrown:
+<br/>
+<strong>[Configurator] Semantic error: option 'Server > Host' has invalid value 'asdfasdfasd' (not IPv4, not IPv6)!</strong>
+<br/>
+<br/>
+<strong>IMPORTANT!</strong>
+<br/>
+If you use semantics check, you must compile your program with flag WITH_SEMANTIC_CHECK, for example:
+<br/>
+<strong>g++ -DWITH_SEMANTIC_CHECK -o test main.cpp -lboost_system -lboost_filesystem -lboost_regex</strong>
+<br/>
+Note that in this case you must link <strong>boost_system</strong> and <strong>boost_regex</strong> libraries. You only pay for what you use.
+
+<a name="combine_options_settings"><h3>Combine settings</h3></a>
+Of course, you can combine settings for option:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ conf.in( "Server" ).add_here( "Host" )
+ .check_semantic( boost::cf::ip )
+ .default_value( "34.67.56.89" )
+ ;
+ // ...
+}
+</pre>
+But you can not use contradictory settings, for example:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ conf.in( "Server" ).add_here( "Host" )
+ .necessary()
+ .default_value( "34.67.56.89" ) // Default value for necessary option? Hm...
+ ;
+ // ...
+}
+</pre>
+In this case exception will be thrown:
+<br/>
+<strong>[Configurator] Option 'Server > Host' registered as necessary, so it cannot have default_value!</strong>
+
+<a name="advanced_options_values_obtaining"><h3>Advanced obtaining option's value</h3></a>
+You can obtain option's value different ways.
+<br>
+<br>
+Simplest way is pure string obtaining:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ std::string host = conf.from( "Server" ).get_from_here( "Host" );
+ // ...
+}
+</pre>
+
+You can obtain value by passing:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ std::string host;
+ conf.from( "Server" ).get_from_here( "Host", host );
+ // ...
+}
+</pre>
+It is useful when you want obtain many values from one section:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ std::string user;
+ std::string password;
+ conf.from( "Server" ).from( "Security" ).get_from_here( "User", user )
+ .get_from_here( "Password", password )
+ ;
+ // ...
+}
+</pre>
+Of course, you can obtain not only string values:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ std::string host;
+ unsigned int port = 0;
+ conf.from( "Server" ).get_from_here( "Host", host )
+ .get_from_here( "Port", port )
+ ;
+ // ...
+}
+</pre>
+In this case value oh "Port" must be correspond to <strong>unsigned int</strong> type. If not, exception will be thrown:
+<br/>
+<strong>[Configurator] Value 'asdfasdfasd' of option 'Server > Port' cannot be cast to <unsigned int>!</strong>
+<br/>
+<br/>
+You can obtain values with explicitly defining type:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ // ...
+ unsigned int port = conf.from( "Server" ).get_from_here< unsigned int >( "Port" );
+ // ...
+}
+</pre>
+<a name="advanced_options_values_semantics"><h3>Advanced obtaining option's semantics</h3></a>
+If you use semantics <strong>'size'</strong> and <strong>'time_period'</strong>, you can obtain such values
+in minimal units (bytes and seconds respectively).
+<br/>
+Configuration file:
+<br/>
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+some_period = 10h
+some_file_size = 10Mb
+</pre></div>
+<br/>
+Code:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.add( "some_period" ).check_semantic( boost::cf::time_period );
+ conf.add( "some_file_size" ).check_semantic( boost::cf::size );
+ // ...
+ unsigned long int period_in_sec = 0;
+ unsigned long int size_in_bytes = 0;
+ conf.get( "some_period", period_in_sec )
+ .get( "some_file_size", size_in_bytes )
+ ;
+
+ std::cout << "period in sec: " << period_in_sec << std::endl;
+ std::cout << "size in bytes: " << size_in_bytes << std::endl;
+
+ // ...
+}
+</pre>
+You will see:
+<pre><strong>
+period in sec: 36000
+size in bytes: 10485760
+</strong> </pre>
+Supported time periods:
+<ul>
+ <li><strong>10</strong> (seconds)</li>
+ <li><strong>10s</strong> (seconds)</li>
+ <li><strong>10m</strong> (minutes)</li>
+ <li><strong>10h</strong> (hours)</li>
+ <li><strong>10d</strong> (days)</li>
+</ul>
+Supported sizes (size literals are case-insensitive):
+<ul>
+ <li><strong>10</strong> (bytes)</li>
+ <li><strong>10b</strong> (bytes)</li>
+ <li><strong>10K</strong> (Kbytes)</li>
+ <li><strong>10Kb</strong> (Kbytes)</li>
+ <li><strong>10M</strong> (Mbytes)</li>
+ <li><strong>10Mb</strong> (Mbytes)</li>
+ <li><strong>10G</strong> (Gbytes)</li>
+ <li><strong>10Gb</strong> (Gbytes)</li>
+</ul>
+Between numbers and literals can be space(s), so "10MB" equal to "10 MB".
+
+<a name="options_with_multi_values"><h3>Options with multi-values</h3></a>
+By default option can't repeat in configuration file, so if you write:
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+DatabaseName = my_db
+DatabaseName = my_db_2
+</pre></div>
+<br/>
+exception will be thrown:
+<br/>
+<strong>[Configurator] Option 'Database' has multiple values, but it not allowed to have multiply values!</strong>
+<br/>
+<br/>
+But you can use multiply values:
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.add( "DatabaseName" ).allow_multi_values();
+ std::cout << "DatabaseName: " << conf.get( "DatabaseName" ) << std::endl;
+
+ // ...
+}
+</pre>
+In this case values of "DatabaseName" option will be accumulated, and you will see:
+<br/>
+<strong>DatabaseName = my_db my_db_2</strong>
+<br/>
+<br/>
+This may be very useful for example, when you register some plugins:
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+Plugin = plug_a plug_b
+Plugin = plug_c
+Plugin = plug_d
+Plugin = plug_e
+</pre></div>
+<br/>
+In this case value of "Plugin" option will be <strong>plug_a plug_b plug_c plug_d plug_e</strong>.
+
+<a name="case_sensitivity_for_names"><h3>Case sensitivity for names</h3></a>
+You can set case sensitivity for names of options and sections. By default it is case insensitive.
+<br/>
+So if we have:
+<br/>
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+DatabaseNAME = my_db
+<ServEr>
+ hosT = 127.0.0.1
+</SERver>
+</pre></div>
+by default it's okay:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.add( "DatabaseName" );
+ conf.in( "Server" ).add_here( "Host" );
+ // ...
+ std::string db;
+ std::string host;
+ conf.get( "DatabaseName", db );
+ conf.from( "Server" ).get_from_here( "Host", host );
+ // ...
+}
+</pre>
+But if we set case sensitivity:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.set_case_sensitivity_for_names();
+ // ...
+}
+</pre>
+exception will be thrown, because Configurator will differentiate between names "DatabaseName" and "DatabaseNAME".
+
+<a name="name_value_separator"><h3>How to set another name-value separator for options</h3></a>
+
+By default name-value separator is '=' sign, but you can set another:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.set_name_value_separator( ':' );
+ // ...
+}
+</pre>
+In this case you must use this sign:
+<br/>
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+DatabaseName : my_db
+</pre></div>
+<br/>
+You can use space sign:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.set_name_value_separator( ' ' );
+ // ...
+}
+</pre>
+and use it:
+<br/>
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+DatabaseName my_db
+</pre></div>
+
+<a name="canonical_one_line_comments"><h3>How to use "canonical" one-line comments</h3></a>
+By default Configurator use C++-style comments:
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+/*
+ * My config.
+ */
+DatabaseName : my_db // this is comment for db
+</pre></div>
+<br/>
+But you can use "canonical" one-line comment with sign '#':
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::configurator conf;
+ conf.use_canonical_one_line_comments();
+ // ...
+}
+</pre>
+In this case "//" will be just two slashes.
+<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
+<pre>
+/*
+ * My config.
+ */
+DatabaseName : my_db # this is comment for db
+Host = http://www.mysite.com # "//" after "http:" is NOT comments...
+</pre></div>
+
+<a name="singleton_configurator"><h3>Singleton-variant of boost::cf::configurator class</h3></a>
+If you have many objects that need access to configurator, you can use it Singleton-variant:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ boost::cf::single_configurator::inst().use_canonical_one_line_comments();
+ // ...
+}
+</pre>
+I use it. :-)
+<br/>
+<br/>
+<strong>IMPORTANT!</strong>
+<br/>
+If you use Singleton-variant, you must compile your program with flag WITH_SINGLETON, for example:
+<br/>
+<strong>g++ -DWITH_SINGLETON -o test main.cpp -lboost_filesystem -lboost_thread</strong>
+<br/>
+Note that in this case you must link <strong>boost_thread</strong> libraries. You only pay for what you use.
+
+<a name="reparsing"><h3>Reparsing</h3></a>
+You can reparse configuration file during program execution:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ //
+ boost::cf::single_configurator::inst().reparse();
+ // ...
+}
+</pre>
+In this case "old" configuration file will be reparsed.
+<br/>
+<br/>
+But you can use some "new" file:
+<br/>
+<pre>
+int main( int argc, char* argv[] ) {
+ //
+ boost::cf::single_configurator::inst().reparse( "/some/path/to/new/config" );
+ // ...
+}
+</pre>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/appendix.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/appendix.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Appendix</h2>
+
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/boost.png
==============================================================================
Binary file. No diff available.
Added: sandbox/configurator/libs/configurator/doc/common_usage.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/common_usage.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,203 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Common usage</h2>
+
+ <dl class="index">
+ <dt>Defining concepts</dt>
+ <dt>Options adding</dt>
+ <dt>Loading</dt>
+ <dt>Values obtaining</dt>
+ <dt>Concepts vs location</dt>
+ </dl>
+
+ <h3><a name="concepts"></a>Defining concepts</h3>
+
+ In <strong>Boost.Configurator</strong> every option considered from two points of view: concept and location.
+ <br/><br/>
+ <strong>Concept</strong> - for what this option intended in you program.
+ <br/>
+ <strong>Location</strong> - where it is located in the configuration file.
+ <br/><br/>
+ You must define concept with macro <strong>BOOST_CONFIGURATOR_OPTION</strong>:
+<pre class="cpp">
+BOOST_CONFIGURATOR_OPTION( UdpHost )
+
+int main( int argc, char* argv[] ) {
+ // ...
+
+ return 0;
+}
+</pre>
+We created concept <strong>UdpHost</strong>. And we'll work with this concept, without worrying about it's location in configuration file.
+
+ <br/><br/>
+ <h3><a name="options_adding"></a>Options adding</h3>
+
+ After concept creation we must add (or register) it:
+<pre class="cpp">
+BOOST_CONFIGURATOR_OPTION( UdpHost )
+
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.add< UdpHost >();
+ // ...
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+</pre>
+Now <strong>conf</strong> object knows about <strong>UdpHost</strong>.
+<br/><br/>
+if we have not specify location of this option, assumed that option placed in global scope of configuration file with same name:
+<pre class="config">
+UdpHost = 12.34.56.78
+</pre>
+
+ <br/>
+ <h3><a name="loading"></a>Loading</h3>
+
+ After this we can load configuration file, parse it and obtain options values:
+<pre class="cpp">
+BOOST_CONFIGURATOR_OPTION( UdpHost )
+
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.add< UdpHost >();
+ conf.load( "/some/path/to/config" );
+ // ...
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+</pre>
+Of course, path to configuration file must be valid in your file system, and it must by exactly <em>file</em>. However, if you make a mistake and specify invalid path, library will display the corresponding error message.
+
+ <br/><br/>
+ <h3><a name="values_obtaining"></a>Values obtaining</h3>
+
+ After loading we can obtain value of option:
+<pre class="cpp">
+BOOST_CONFIGURATOR_OPTION( UdpHost )
+
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.add< UdpHost >();
+ conf.load( "/some/path/to/config" );
+ std::string udp_host = conf.get_value_of< UdpHost >();
+ std::cout << "Udp host: " << udp_host << std::endl;
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+</pre>
+Console output in our example:
+<pre class="terminal">
+Udp host: 12.34.56.78
+</pre>
+
+ <br/>
+ <h3><a name="concepts_vs_location"></a>Concepts vs location</h3>
+
+ As mentioned above, every option considered from two points of view: concept and location. And, strictly speaking, these points of view is not related to each other. So you specify (as you remember, this is not necessarily) location only in one place (during option adding), and in all other places of the program you will not think about it.
+ <br/><br/>
+ Why is it important? Suppose we have configuration file:
+<pre class="config">
+<Server>
+ // ...
+ <Reserve>
+ // ...
+ <System>
+ // ...
+ Log = /var/log/system
+ </System>
+ // ...
+ </Reserve>
+ // ...
+</Server>
+</pre>
+And code:
+<pre class="cpp">
+BOOST_CONFIGURATOR_OPTION( ReserveLogForSystem )
+
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.add< ReserveLogForSystem >().set_location( "Server::Reserve::System::Log" );
+ conf.load( "/some/path/to/config" );
+ // ...
+ std::string path_to_log = conf.get_value_of< ReserveLogForSystem >();
+ // ...
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+
+// some_second_file.cpp
+ void logger() {
+ // ...
+ std::string path_to_log = conf.get_value_of< ReserveLogForSystem >();
+ // ...
+ }
+
+// some_third_file.cpp
+ void size_checker() {
+ // ...
+ std::string path_to_log = conf.get_value_of< ReserveLogForSystem >();
+ // ...
+ }
+</pre>
+But what if we want to change loaction of this option? It may be renaming or re-nesting, for example:
+<pre class="config">
+<ReserveServer>
+ // ...
+ <System>
+ // ...
+ Log = /var/log/system
+ </System>
+ // ...
+</ReserveServer>
+</pre>
+ In this case we must rewrite path <strong>"ReserveServer::System::Log"</strong> only in one place, and other parts of the program will not even know about this change, because concept <strong>ReserveLogForSystem</strong> not changed.
+ <br/><br/>
+ In addition we use type instead string identifier, so any spelling error will be checked on compile-time, not on runtime.
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/config_file_customizing.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/config_file_customizing.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,145 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Configuration file customizing</h2>
+<p align="right"><strong><em>It is impossible to please everyone...</em></strong>
+<br/>
+Old wisdom</p>
+
+ <dl class="index">
+ <dt>Name-value separator for options</dt>
+ <dt>Comments</dt>
+ <dt>Section names edging</dt>
+ </dl>
+
+ <h3><a name="separator"></a>Name-value separator for options</h3>
+
+ You can set custom separator for options. For example:
+<pre class="config">
+DatabaseName = my_db
+DatabaseHost = localhost
+DatabasePort = 0
+DatabaseUser = denis
+DatabasePassword = my_password
+</pre>
+This is simple INI-like file, so <strong>=</strong> symbol may seem redundant.
+<br/><br/>
+Let's change it:
+<pre class="cpp">
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.settings().set_name_value_separator( ' ' );
+ // ...
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+</pre>
+Now we can write like this:
+<pre class="config">
+DatabaseName my_db
+DatabaseHost localhost
+DatabasePort 0
+DatabaseUser denis
+DatabasePassword my_password
+</pre>
+<strong>Warning</strong>
+<br/><br/>
+If you want to use space symbol as name-value separator, you <strong>cannot</strong> use spaces in option's name or in option's value! And it is quite logical:
+<pre class="config">
+Database Name my_db
+// ^
+// |
+// this is continue of name or begin of value?..
+</pre>
+
+ <br/>
+ <h3><a name="comments"></a>Comments</h3>
+
+ You can set custom one-line comment sign. It may be useful for some cases, for example:
+<pre class="config">
+Host = http://some.address.com/
+// ^
+// |
+// begin of default one-line comment...
+</pre>
+Hm... In this case default comment sign is not suitable.
+<br/><br/>
+Let's change it:
+<pre class="cpp">
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.settings().set_one_line_comment_sign( '#' );
+ // ...
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+</pre>
+Now we can write:
+<pre class="config">
+Host = http://some.address.com/
+# ^
+# |
+# now it's just two slashes...
+</pre>
+ <br/>
+ <h3><a name="section_names_edging"></a>Section names edging</h3>
+
+ You can change default edging of section's names. Not everyone likes classic XML-format...
+<pre class="cpp">
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.settings().set_open_section_edging( "[[", "]]" );
+ conf.settings().set_close_section_edging( "[[-", "]]" );
+ // ...
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
+}
+</pre>
+Now we can write:
+<pre class="config">
+[[Server]]
+ Host = 127.0.0.1
+ Port = 80
+[[-Server]]
+</pre>
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/config_file_format.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/config_file_format.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,109 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Configuration file format</h2>
+
+ <dl class="index">
+ <dt>Option</dt>
+ <dt>Section</dt>
+ <dt>Comments</dt>
+ </dl>
+
+ <h3><a name="option"></a>Option</h3>
+
+ In fact, configuration file contains a set of data. Minimal unit of data is <strong>option</strong>. Every option consists of name and value. For example:
+<pre class="config">
+Host = 127.0.0.1
+</pre>
+There is one option, with name <strong>Host</strong> and value <strong>127.0.0.1</strong>.
+<br/><br/>
+Name and value separated by a some separator, default is <strong>=</strong>. You can set custom separator (for details, see Configuration file customizing).
+
+ <br/><br/>
+ <h3><a name="section"></a>Section</h3>
+
+ Set of options is often corresponds to some conceptual entity, so it often combined in the section. For example:
+<pre class="config">
+<Server>
+ Host = 127.0.0.1
+ Port = 80
+</Server>
+</pre>
+Section <strong>Server</strong> corresponds to some server. Of course, you can use arbitrary nesting sections:
+<pre class="config">
+<Server>
+ Host = 127.0.0.1
+ Port = 80
+
+ <Security>
+ Admin login = admin
+ Password = verystrongpassword
+ </Security>
+
+ <Reserve>
+ <System>
+ Log = /var/log/system
+ </System>
+ </Reserve>
+
+ <Plugins>
+ extended_plugin = sync check browser
+ </Plugins>
+</Server>
+</pre>
+As you see, section's name enclosed in XML-like angle brackets (<strong><</strong>---<strong>></strong> for section opening, <strong></</strong>---<strong>></strong> for section closing). You can change enclosing format (for details, see Configuration file customizing).
+<br/><br/>
+The careful reader may notice that option's name (for example, <strong>Admin login</strong>) and option's value (for example, <strong>sync check browser</strong>) can contains spaces, except when space/tab using as separator (for details, see Configuration file customizing).
+ <br/><br/>
+ <h3><a name="comments"></a>Comments</h3>
+
+ Comments are very useful almost in any configuration file. You can use one-line or multi-line comments, in C++-style:
+<pre class="config">
+//
+// Common info about this config
+//
+<Server> // Server section
+ Host = 127.0.0.1
+ Port = 80
+
+ /*
+ * Security is very important!
+ */
+
+ <Security>
+ Admin lo/*sometextsometext
+sometextsometextsometextsometextsometextsometextsometext
+sometextsometextsomet*/gin = admin
+ Password = verystrongpassword
+ </Security>
+</Server>
+</pre>
+You can change sign for one-line comment (for details, see Configuration file customizing).
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/examples.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/examples.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Examples</h2>
+
+ <h3>Hello, world!</h3>
+
+ Simplest configuration file:
+
+
+
+ <h3>Medium</h3>
+
+
+
+ <h3>Advanced</h3>
+
+
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/index.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/index.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h1>Boost.Configurator</h1>
+
+ <p><i>Copyright © 2010 Denis Shevchenko</i></p>
+ <p><i>Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or
+ copy at http://www.boost.org/LICENSE_1_0.txt)</i></p>
+
+ <br/>
+
+ <div class="table_of_contents">
+ <h2>Table of contents</h2>
+ <ul>
+ <li><dt>Introduction</dt>
+ <li><dt>Overview</dt>
+ <ul>
+ <li><dt>Motivation</dt></li>
+ <li><dt>Hello, world!</dt></li>
+ <li><dt>Features</dt></li>
+ </ul>
+
+ <li><dt>Requirements</dt>
+ <ul>
+ <li><dt>Necessary Boost libraries</dt></li>
+ <li><dt>Compiling programs with Boost.Configurator</dt></li>
+ </ul>
+
+ <li><dt>Configuration file format</dt>
+ <ul>
+ <li><dt>Option</dt></li>
+ <li><dt>Section</dt></li>
+ <li><dt>Comments</dt></li>
+ </ul>
+
+ <li><dt>Common usage</dt>
+ <ul>
+ <li><dt>Defining concepts</dt></li>
+ <li><dt>Options adding</dt></li>
+ <li><dt>Loading</dt></li>
+ <li><dt>Values obtaining</dt></li>
+ <li><dt>Concepts vs location</dt></li>
+ </ul>
+
+ <li><dt>Advanced usage</dt>
+ <ul>
+ <li><dt>Option's default value</dt></li>
+ <li><dt>Option's necessity</dt></li>
+ <li><dt>Semantic of option's value</dt></li>
+ <li><dt>Multi values for option</dt></li>
+ <li><dt>Case sensitivity for names</dt></li>
+ <li><dt>Non-string values obtating</dt></li>
+ </ul>
+
+ <li><dt>Configuration file customizing</dt>
+ <ul>
+ <li><dt>Name-value separator for options</dt></li>
+ <li><dt>Comments</dt></li>
+ <li><dt>Section names edging</dt></li>
+ </ul>
+
+ <li><dt>Reference</dt>
+ <ul>
+ <li><dt>Header <boost/configurator/configurator.hpp></dt></li>
+ <li><dt>Header <boost/configurator/option.hpp></dt></li>
+ </ul>
+
+ <li><dt>Examples</dt>
+ <ul>
+ <li><dt>Hello, world!</dt></li>
+ <li><dt>Medium</dt></li>
+ <li><dt>Advanced</dt></li>
+ </ul>
+
+ <li><dt>Appendix</dt>
+ <ul>
+ <li><dt>Error messages</dt></li>
+ </ul>
+
+ <li><dt>Acknowledgments</dt>
+ </ul>
+ </div>
+
+ <h2><a name="introduction">Introduction</a></h2>
+
+ <strong>Boost.Configurator</strong> is flexible and easy-to-use library for work with configuration files.
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Modified: sandbox/configurator/libs/configurator/doc/overview.html
==============================================================================
--- sandbox/configurator/libs/configurator/doc/overview.html (original)
+++ sandbox/configurator/libs/configurator/doc/overview.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -1,667 +1,108 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
-<head>
- <meta http-equiv="Content-Language" content="en-us">
- <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
- <link rel="stylesheet" type="text/css" href="../../../boost.css">
-
- <title>Configurator - Overview</title>
-<link rel="icon" href="/favicon.ico" type="image/ico"><link rel="stylesheet" type="text/css" href="/style-v2/section-basic.css"></head>
-
-<body link="#0000FF" vlink="#800080"> <div id="boost-common-heading-doc">
- <div class="heading-inner">
- <div class="heading-placard"></div>
-
- <h1 class="heading-title">
- <a href="/">
- <img src="/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
- <span class="heading-boost">Boost</span>
- <span class="heading-cpplibraries">C++ Libraries</span>
- </a></h1>
-
- <p class="heading-quote">
- <q>...one of the most highly
- regarded and expertly designed C++ library projects in the
- world.</q> <span class="heading-attribution">— <a href=
- "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
- "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
- Alexandrescu</a>, <a href=
- "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
- Coding Standards</a></span></p>
-
- <div class="heading-sections">
- <ul>
- <li class="welcome-section-tab">Welcome</li>
- <li class="boost-section-tab">Introduction</li>
- <li class="community-section-tab">Community</li>
- <li class="development-section-tab">Development</li>
- <li class="support-section-tab">Support</li>
- <li class="doc-section-tab">Documentation</li>
- </ul>
- </div>
-</div>
- </div>
-
- <div id="boost-common-heading-doc-spacer"></div>
-
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
- <h1 align="center">Configurator</h1>
+ <h2>Overview</h2>
+
+ <dl class="index">
+ <dt>Motivation</dt>
+ <dt>Hello, world!</dt>
+ <dt>Features</dt>
+ </dl>
+
+ <h3><a name="motivation"></a>Motivation</h3>
+
+ Many programs (especially servers, daemons, etc.) requires configuration file for work, so it handling is very common task. Actually, this handling add up to four tasks:
+ <ol>
+ <li>obtaining options from configuration file,</li>
+ <li>check correctness (in all senses of this word) of obtained options,</li>
+ <li>storing options,</li>
+ <li>issuance of the options values on demand.</li>
+ </ol>
+
+ Boost.Configurator provides general solution for this tasks.
+ <br/><br/>
+ <h3><a name="hello"></a>Hello, world!</h3>
- <h2 align="center">Overview</h2>
- <dl class="index">
- <dt>Introduction</dt>
- <dt>Common usage</dt>
- <dt>Advanced usage</dt>
- </dl>
-
- <h2><a name="introduction" id="introduction"></a>Introduction</h2>
-
- <p>
-<a name="simplest_config_format"><h3>Simplest configuration file format</h3></a>
-In fact, configuration file contains a set of data. This set presented by options stored in global scope or in section(s). Option has <strong>name</strong> and <strong>value</strong> separated by a some separator.
-
-Simplest configuration file looks like this:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-Host = 127.0.0.1
-</pre>
-</div>
-<br/>
-There is one option, with name <strong>Host</strong> and value <strong>127.0.0.1</strong>. Default name-value separator is "<strong>=</strong>".
-<br/>
-<a name="necessity"><h3>Option's necessity</h3></a>
-Option can be necessary or optionally.
-
-In examples above option <strong>Host</strong> may be optional, so user can skip it. But in some cases this option may be necessary, so user must input it in configuration file.
-<br/>
-<a name="default_value"><h3>Option's default value</h3></a>
-Option can have default value, in this case not required input it.
-This option can be useful for options with predefined default values.
-
-In example above option <strong>Host</strong> may have some default value of address, so user can skip it.
-<br/>
-<a name="value_semantic"><h3>Semantic of option's value</h3></a>
-It is often necessary to check the semantic of concrete option's value. For example, user must inputs valid IP:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
+ Simplest configuration file:
+<pre class="config">
Host = 127.0.0.1
</pre>
-</div>
-<br/>
-But what if the user inputs an incorrect value, for example:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-Host = 127.678.988.1
-</pre>
-</div>
-<br/>
-Configurator allows to define semantic check for each option.
-<br/>
-Supported semantics:
-<ul>
- <li><strong>path</strong> (Path semantics check)</li>
- <li><strong>optional_path</strong> (Optional path semantics check)</li>
- <li><strong>ipv4</strong> (IPv4 semantics check)</li>
- <li><strong>ipv6</strong> (IPv6 semantics check)</li>
- <li><strong>ip</strong> (IP semantics check)</li>
- <li><strong>email</strong> (E-mail semantics check)</li>
- <li><strong>size</strong> (Size semantics check)</li>
- <li><strong>time_period</strong> (Time period semantics check)</li>
- <li><strong>exp_record</strong> (Exponential record semantics check)</li>
-</ul>
-Note that 'optional_path' semantic check path correctness and in case of failure NOT throw exception,
-but print warning message in std::cout. It may be useful for programs that must create missing files/folders.
-
-
- </p>
-
- <h2><a name="topic1" id="topic1"></a>Common usage</h2>
-
- <p>
- <a name="config_file_format"><h3>Configuration file format</h3></a>
-Configuration file is a set of options placed in global scope and/or in section(s).
-
-Global options example:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-Host = 127.0.0.1
-Port = 80
-User = user
-Password = password
-</pre></div>
-<br/>
-Section is similar to XML: open tag enclosed in '<' and '>', close tag - in '</' and '>'.
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-<Server>
- Host = 127.0.0.1
- Port = 80
-</Server>
-</pre></div>
-<br/>
-You can use nested sections:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-<Server>
- Host = 127.0.0.1
- Port = 80
-
- <Security>
- User = user
- Password = password
- </Security>
-</Server>
-</pre></div>
-
-<br/>
-<a name="preparing"><h3>Preparing</h3></a>
-Copy 'configurator' folder in some place where your compiler is looking for header files and add:
-<pre>
-#include <boost/configurator/configurator.hpp>
-</pre>in your program.
-
-<a name="options_registering"><h3>Options registering</h3></a>
-Registration of new option included three tasks:
-<ol>
- <li>define section where this option will be placed <em>(optionally)</em>,</li>
- <li>define option's name,</li>
- <li>define required checks and additional settings <em>(optionally)</em>.</li>
-</ol>
-<br/>
-Register option in global scope of configuration file:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.add_option( "Host" );
- // ...
-}
-</pre>
-or in short variant:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.add( "Host" );
- // ...
-}
-</pre>
-<br/>
-Register option in section:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.in_section( "Server" ).add_option_here( "Host" );
- // ...
-}
-</pre>
-or in short variant:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.in( "Server" ).add_here( "Host" );
- // ...
-}
-</pre>
-<a name="parsing"><h3>Parsing</h3></a>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- conf.parse( "/some/path/to/config_file" );
- // ...
-}
-</pre>After that you can obtain values of options. Of course, <strong>/some/path/to/config_file</strong> must be valid in your filesystem.
-<br/>
-<a name="options_values_obtaining"><h3>Obtaining of option's values</h3></a>
-
-Configuration file:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-DatabaseName = my_db
-<Server>
- Host = 127.0.0.1
-
- <Security>
- User = user
- </Security>
-</Server>
-</pre></div>
-<br/>
-Obtaining values of options example:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- std::string db = conf.get_value( "DatabaseName" );
- std::string host = conf.from_section( "Server" )
- .get_value_from_here( "Host" )
- ;
- std::string user = conf.from_section( "Server" )
- .from_section( "Security" )
- .get_value_from_here( "User" )
- ;
- // ...
-}
-</pre>
-or in short variant:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- std::string db = conf.get( "DatabaseName" );
- std::string host = conf.from( "Server" ).get_from_here( "Host" );
- std::string user = conf.from( "Server" ).from( "Security" ).get_from_here( "User" );
- // ...
-}
-</pre>
+Code for work with it:
- </p>
+<pre class="cpp">
+#include <boost/configurator/configurator.hpp>
- <h2><a name="topic2" id="topic2"></a>Advanced usage</h2>
+#include <iostream>
- <p>
- <a name="options_necessity"><h3>How to set option's necessity</h3></a>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- conf.in( "Server" ).add_here( "Host" ).necessary();
- // ...
-}
-</pre>
-After this user must inputs "Host" option in configuration file. If not, exception will thrown:
-<br/>
-<strong>[Configurator] Option 'Server > Host' is defined as necessary, but it missed!</strong>
-<br/>
-<a name="options_default_value"><h3>How to set option's default value</h3></a>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- conf.in( "Server" ).add_here( "Host" ).default_value( "127.0.0.1" );
- // ...
-}
-</pre>
-After this user can skip "Host" option in configuration file.
-<br/>
-<a name="options_semantics_check"><h3>How to set option's semantics check</h3></a>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- conf.in( "Server" ).add_here( "Host" ).check_semantic( boost::cf::ip );
- // ...
-}
-</pre>
-After this value of "Host" option must be valid IP address (IPv4 or IPv6). If not, exception will be thrown:
-<br/>
-<strong>[Configurator] Semantic error: option 'Server > Host' has invalid value 'asdfasdfasd' (not IPv4, not IPv6)!</strong>
-<br/>
-<br/>
-<strong>IMPORTANT!</strong>
-<br/>
-If you use semantics check, you must compile your program with flag WITH_SEMANTIC_CHECK, for example:
-<br/>
-<strong>g++ -DWITH_SEMANTIC_CHECK -o test main.cpp -lboost_system -lboost_filesystem -lboost_regex</strong>
-<br/>
-Note that in this case you must link <strong>boost_system</strong> and <strong>boost_regex</strong> libraries. You only pay for what you use.
-
-<a name="combine_options_settings"><h3>Combine settings</h3></a>
-Of course, you can combine settings for option:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- conf.in( "Server" ).add_here( "Host" )
- .check_semantic( boost::cf::ip )
- .default_value( "34.67.56.89" )
- ;
- // ...
-}
-</pre>
-But you can not use contradictory settings, for example:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- conf.in( "Server" ).add_here( "Host" )
- .necessary()
- .default_value( "34.67.56.89" ) // Default value for necessary option? Hm...
- ;
- // ...
-}
-</pre>
-In this case exception will be thrown:
-<br/>
-<strong>[Configurator] Option 'Server > Host' registered as necessary, so it cannot have default_value!</strong>
-
-<a name="advanced_options_values_obtaining"><h3>Advanced obtaining option's value</h3></a>
-You can obtain option's value different ways.
-<br>
-<br>
-Simplest way is pure string obtaining:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- std::string host = conf.from( "Server" ).get_from_here( "Host" );
- // ...
-}
-</pre>
+BOOST_CONFIGURATOR_OPTION( Host )
-You can obtain value by passing:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- std::string host;
- conf.from( "Server" ).get_from_here( "Host", host );
- // ...
-}
-</pre>
-It is useful when you want obtain many values from one section:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- std::string user;
- std::string password;
- conf.from( "Server" ).from( "Security" ).get_from_here( "User", user )
- .get_from_here( "Password", password )
- ;
- // ...
-}
-</pre>
-Of course, you can obtain not only string values:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- std::string host;
- unsigned int port = 0;
- conf.from( "Server" ).get_from_here( "Host", host )
- .get_from_here( "Port", port )
- ;
- // ...
-}
-</pre>
-In this case value oh "Port" must be correspond to <strong>unsigned int</strong> type. If not, exception will be thrown:
-<br/>
-<strong>[Configurator] Value 'asdfasdfasd' of option 'Server > Port' cannot be cast to <unsigned int>!</strong>
-<br/>
-<br/>
-You can obtain values with explicitly defining type:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- // ...
- unsigned int port = conf.from( "Server" ).get_from_here< unsigned int >( "Port" );
- // ...
-}
-</pre>
-<a name="advanced_options_values_semantics"><h3>Advanced obtaining option's semantics</h3></a>
-If you use semantics <strong>'size'</strong> and <strong>'time_period'</strong>, you can obtain such values
-in minimal units (bytes and seconds respectively).
-<br/>
-Configuration file:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-some_period = 10h
-some_file_size = 10Mb
-</pre></div>
-<br/>
-Code:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.add( "some_period" ).check_semantic( boost::cf::time_period );
- conf.add( "some_file_size" ).check_semantic( boost::cf::size );
- // ...
- unsigned long int period_in_sec = 0;
- unsigned long int size_in_bytes = 0;
- conf.get( "some_period", period_in_sec )
- .get( "some_file_size", size_in_bytes )
- ;
+int main( int argc, char* argv[] ) {
+ try {
+ boost::cf::configurator conf;
+ conf.add< Host >();
- std::cout << "period in sec: " << period_in_sec << std::endl;
- std::cout << "size in bytes: " << size_in_bytes << std::endl;
-
- // ...
-}
-</pre>
-You will see:
-<pre><strong>
-period in sec: 36000
-size in bytes: 10485760
-</strong> </pre>
-Supported time periods:
-<ul>
- <li><strong>10</strong> (seconds)</li>
- <li><strong>10s</strong> (seconds)</li>
- <li><strong>10m</strong> (minutes)</li>
- <li><strong>10h</strong> (hours)</li>
- <li><strong>10d</strong> (days)</li>
-</ul>
-Supported sizes (size literals are case-insensitive):
-<ul>
- <li><strong>10</strong> (bytes)</li>
- <li><strong>10b</strong> (bytes)</li>
- <li><strong>10K</strong> (Kbytes)</li>
- <li><strong>10Kb</strong> (Kbytes)</li>
- <li><strong>10M</strong> (Mbytes)</li>
- <li><strong>10Mb</strong> (Mbytes)</li>
- <li><strong>10G</strong> (Gbytes)</li>
- <li><strong>10Gb</strong> (Gbytes)</li>
-</ul>
-Between numbers and literals can be space(s), so "10MB" equal to "10 MB".
-
-<a name="options_with_multi_values"><h3>Options with multi-values</h3></a>
-By default option can't repeat in configuration file, so if you write:
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-DatabaseName = my_db
-DatabaseName = my_db_2
-</pre></div>
-<br/>
-exception will be thrown:
-<br/>
-<strong>[Configurator] Option 'Database' has multiple values, but it not allowed to have multiply values!</strong>
-<br/>
-<br/>
-But you can use multiply values:
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.add( "DatabaseName" ).allow_multi_values();
- std::cout << "DatabaseName: " << conf.get( "DatabaseName" ) << std::endl;
-
- // ...
-}
-</pre>
-In this case values of "DatabaseName" option will be accumulated, and you will see:
-<br/>
-<strong>DatabaseName = my_db my_db_2</strong>
-<br/>
-<br/>
-This may be very useful for example, when you register some plugins:
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-Plugin = plug_a plug_b
-Plugin = plug_c
-Plugin = plug_d
-Plugin = plug_e
-</pre></div>
-<br/>
-In this case value of "Plugin" option will be <strong>plug_a plug_b plug_c plug_d plug_e</strong>.
-
-<a name="case_sensitivity_for_names"><h3>Case sensitivity for names</h3></a>
-You can set case sensitivity for names of options and sections. By default it is case insensitive.
-<br/>
-So if we have:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-DatabaseNAME = my_db
-<ServEr>
- hosT = 127.0.0.1
-</SERver>
-</pre></div>
-by default it's okay:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.add( "DatabaseName" );
- conf.in( "Server" ).add_here( "Host" );
- // ...
- std::string db;
- std::string host;
- conf.get( "DatabaseName", db );
- conf.from( "Server" ).get_from_here( "Host", host );
- // ...
-}
-</pre>
-But if we set case sensitivity:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.set_case_sensitivity_for_names();
- // ...
-}
-</pre>
-exception will be thrown, because Configurator will differentiate between names "DatabaseName" and "DatabaseNAME".
+ conf.load( "/some/path/to/hello_world.conf" );
-<a name="name_value_separator"><h3>How to set another name-value separator for options</h3></a>
-
-By default name-value separator is '=' sign, but you can set another:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.set_name_value_separator( ':' );
- // ...
-}
-</pre>
-In this case you must use this sign:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-DatabaseName : my_db
-</pre></div>
-<br/>
-You can use space sign:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.set_name_value_separator( ' ' );
- // ...
-}
-</pre>
-and use it:
-<br/>
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-DatabaseName my_db
-</pre></div>
-
-<a name="canonical_one_line_comments"><h3>How to use "canonical" one-line comments</h3></a>
-By default Configurator use C++-style comments:
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-/*
- * My config.
- */
-DatabaseName : my_db // this is comment for db
-</pre></div>
-<br/>
-But you can use "canonical" one-line comment with sign '#':
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::configurator conf;
- conf.use_canonical_one_line_comments();
- // ...
-}
-</pre>
-In this case "//" will be just two slashes.
-<div style="margin-left: 6px; margin-right: 6px; padding-left: 6px; padding-right: 6px; background: #F5F5DC; border: 1px solid #DEB887; font-family: monospace; font-size: 13px">
-<pre>
-/*
- * My config.
- */
-DatabaseName : my_db # this is comment for db
-Host = http://www.mysite.com # "//" after "http:" is NOT comments...
-</pre></div>
-
-<a name="singleton_configurator"><h3>Singleton-variant of boost::cf::configurator class</h3></a>
-If you have many objects that need access to configurator, you can use it Singleton-variant:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- boost::cf::single_configurator::inst().use_canonical_one_line_comments();
- // ...
-}
-</pre>
-I use it. :-)
-<br/>
-<br/>
-<strong>IMPORTANT!</strong>
-<br/>
-If you use Singleton-variant, you must compile your program with flag WITH_SINGLETON, for example:
-<br/>
-<strong>g++ -DWITH_SINGLETON -o test main.cpp -lboost_filesystem -lboost_thread</strong>
-<br/>
-Note that in this case you must link <strong>boost_thread</strong> libraries. You only pay for what you use.
-
-<a name="reparsing"><h3>Reparsing</h3></a>
-You can reparse configuration file during program execution:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- //
- boost::cf::single_configurator::inst().reparse();
- // ...
-}
-</pre>
-In this case "old" configuration file will be reparsed.
-<br/>
-<br/>
-But you can use some "new" file:
-<br/>
-<pre>
-int main( int argc, char* argv[] ) {
- //
- boost::cf::single_configurator::inst().reparse( "/some/path/to/new/config" );
- // ...
+ std::string host = conf.get_value_of< Host >();
+ std::cout << "Value of host: " << host << std::endl;
+ } catch ( const std::exception& exc ) {
+ std::cerr << exc.what() << std::endl;
+ }
+
+ return 0;
}
</pre>
- <hr>
- <p>Revised
- <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->30
- November, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" --></p>
-
- <p><i>Copyright © 2010 Denis Shevchenko</i></p>
-
- <p><i>Distributed under the Boost Software License, Version 1.0. (See
- accompanying file LICENSE_1_0.txt or
- copy at <a href=
- "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</i></p>
-</body>
+Console output:
+
+<pre class="terminal">
+Value of host: 127.0.0.1
+</pre>
+ <br/>
+ <h3><a name="features"></a>Features</h3>
+
+ <ul>
+ <li>Header-only.</li>
+ <li>Portable (there is only ISO C++ code and Boost C++ libraries).</li>
+ <li>Type-based work with options, without string-identifiers.</li>
+ <li>Option's necessity.</li>
+ <li>Option's default value.</li>
+ <li>Arbitrary nesting of sections.</li>
+ <li>Checks of value's semantics, like correct path, valid IP, etc.</li>
+ <li>Common checks of options and sections, like duplication, incorrection, etc.</li>
+ <li>Single-line and multi-line comments (in C++ style).</li>
+ <li>Options with multi-values.</li>
+ <li>Singleton-variant of core class.</li>
+ <li>Case (in)sensitivity for names of options and sections.</li>
+ <li>Customizing configuration file format.</li>
+ </ul>
+
+ <br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
</html>
Added: sandbox/configurator/libs/configurator/doc/own.css
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/own.css 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,128 @@
+
+body {
+ padding: 0px 20px;
+}
+
+div.table_of_contents {
+ border: 1px solid gray;
+ padding: 0px 10px;
+ margin-left: 50px;
+ margin-right: 50px;
+}
+
+pre.cpp {
+ border: 1px solid gray;
+ background: #FFFAFA;
+ padding: 8px;
+ margin-left: 30px;
+ margin-right: 30px;
+ font-family: Courier, monospace;
+ font-size: 120%;
+}
+
+pre.config {
+ border: 1px solid gray;
+ background: #E8E8E8;
+ padding: 8px;
+ margin-left: 30px;
+ margin-right: 30px;
+ font-family: monospace;
+ font-size: 110%;
+}
+
+pre.terminal {
+ border: 1px solid #4F4F4F;
+ background: #4F4F4F;
+ padding: 8px;
+ margin-left: 30px;
+ margin-right: 30px;
+ font-family: monospace;
+ font-size: 110%;
+ font-weight: bold;
+ color: white;
+}
+
+h1.first_title {
+ margin-left: 50px;
+}
+
+h1 {
+ font-size: 170%;
+ COLOR: #00008B;
+}
+
+h2 {
+ font-size: 150%;
+}
+
+h3 {
+ font-size: 125%;
+}
+
+h4 {
+ font-size: 108%;
+}
+
+
+/*
+H1
+{
+ FONT-SIZE: 200%;
+ COLOR: #00008B;
+}
+H2
+{
+ FONT-SIZE: 150%;
+}
+H3
+{
+ FONT-SIZE: 125%;
+}
+H4
+{
+ FONT-SIZE: 108%;
+}
+BODY
+{
+ FONT-SIZE: 100%;
+ BACKGROUND-COLOR: #ffffff;
+ COLOR: #000000;
+}
+PRE
+{
+ MARGIN-LEFT: 2em;
+ FONT-FAMILY: Courier,
+ monospace;
+}
+CODE
+{
+ FONT-FAMILY: Courier,
+ monospace;
+}
+CODE.as_pre
+{
+ white-space: pre;
+}
+.index
+{
+ TEXT-ALIGN: left;
+}
+.page-index
+{
+ TEXT-ALIGN: left;
+}
+.definition
+{
+ TEXT-ALIGN: left;
+}
+.footnote
+{
+ FONT-SIZE: 66%;
+ VERTICAL-ALIGN: super;
+ TEXT-DECORATION: none;
+}
+.function-semantics
+{
+ CLEAR: left;
+}
+*/
Added: sandbox/configurator/libs/configurator/doc/reference.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/reference.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Boost.Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Reference</h2>
+
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Added: sandbox/configurator/libs/configurator/doc/requirements.html
==============================================================================
--- (empty file)
+++ sandbox/configurator/libs/configurator/doc/requirements.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <link rel="stylesheet" type="text/css" href="own.css">
+ <title>Configurator</title>
+ </head>
+
+ <body>
+ <table cellpadding="2" width="100%">
+ <tr>
+ <td valign="top"><a href="http://www.boost.org">
+ <img style="border: 0pt none;" alt="Boost C++ Libraries" width="277" height="86" src="boost.png"></a></td>
+ <td align="center">Home</td>
+ <td align="center">Libraries</td>
+ <td align="center">People</td>
+ <td align="center">FAQ</td>
+ </tr>
+ </table>
+
+ <hr/>
+
+ <h2>Requirements</h2>
+
+
+ <br/><br/>
+ <hr/>
+ Last revised
+ <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->10
+ December, 2010<!--webbot bot="Timestamp" endspan i-checksum="38514" -->
+ </body>
+</html>
Modified: sandbox/configurator/libs/configurator/index.html
==============================================================================
--- sandbox/configurator/libs/configurator/index.html (original)
+++ sandbox/configurator/libs/configurator/index.html 2010-12-11 00:05:32 EST (Sat, 11 Dec 2010)
@@ -1,4 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>Boost.Configurator</title>
+ <meta http-equiv="refresh" content="0; URL=doc/index.html"/>
+ </head>
+ <body>
+ <p>
+ Automatic redirection failed, please go to
+ doc/index.html
+ </p>
+ <hr/>
+ <p>
+ Copyright (c) 2008 Denis Shevchenko
+ </p>
+ <p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at
+ www.boost.org/LICENSE_1_0.txt)
+ </p>
+ </body>
+</html>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<html>
<head>
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