Update of /cvsroot/boost/boost/boost/program_options/detail
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13215/boost/program_options/detail
Modified Files:
config_file.hpp
Log Message:
Implement support for unregistered options in config files. Closes #687.
Index: config_file.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/program_options/detail/config_file.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- config_file.hpp 16 Jun 2005 13:23:17 -0000 1.12
+++ config_file.hpp 11 Jul 2007 19:39:06 -0000 1.13
@@ -70,7 +70,8 @@
public:
common_config_file_iterator() { found_eof(); }
common_config_file_iterator(
- const std::set<std::string>& allowed_options);
+ const std::set<std::string>& allowed_options,
+ bool allow_unregistered = false);
virtual ~common_config_file_iterator() {}
@@ -103,6 +104,7 @@
// Invariant: no element is prefix of other element.
std::set<std::string> allowed_prefixes;
std::string m_prefix;
+ bool m_allow_unregistered;
};
template<class charT>
@@ -116,7 +118,8 @@
/** Creates a config file parser for the specified stream.
*/
basic_config_file_iterator(std::basic_istream<charT>& is,
- const std::set<std::string>&
allowed_options);
+ const std::set<std::string>&
allowed_options,
+ bool allow_unregistered = false);
private: // base overrides
@@ -139,8 +142,9 @@
template<class charT>
basic_config_file_iterator<charT>::
basic_config_file_iterator(std::basic_istream<charT>& is,
- const std::set<std::string>& allowed_options)
- : common_config_file_iterator(allowed_options)
+ const std::set<std::string>& allowed_options,
+ bool allow_unregistered)
+ : common_config_file_iterator(allowed_options, allow_unregistered)
{
this->is.reset(&is, null_deleter());
get();
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs