|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67145 - sandbox/configurator/boost/configurator/detail
From: for.dshevchenko_at_[hidden]
Date: 2010-12-10 02:22:28
Author: dshevchenko
Date: 2010-12-10 02:22:25 EST (Fri, 10 Dec 2010)
New Revision: 67145
URL: http://svn.boost.org/trac/boost/changeset/67145
Log:
1.opre continue
Text files modified:
sandbox/configurator/boost/configurator/detail/pure_options_obtainer.hpp | 36 +++++++++++++-----------------------
sandbox/configurator/boost/configurator/detail/validators.hpp | 3 +++
2 files changed, 16 insertions(+), 23 deletions(-)
Modified: sandbox/configurator/boost/configurator/detail/pure_options_obtainer.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/detail/pure_options_obtainer.hpp (original)
+++ sandbox/configurator/boost/configurator/detail/pure_options_obtainer.hpp 2010-12-10 02:22:25 EST (Fri, 10 Dec 2010)
@@ -27,6 +27,11 @@
/// \brief Details of realization.
namespace detail {
+using boost::spirit::qi::char_;
+using boost::spirit::qi::string;
+using boost::spirit::qi::parse;
+using boost::phoenix::ref;
+
class pure_options_obtainer {
typedef boost::function< bool ( std::string& /* analized string */
, pure_options& /* factual obtained options */ ) >
@@ -88,12 +93,7 @@
}
private:
bool handle_section_opening( std::string& s, pure_options& /* factual_obtained_options */ ) {
- using boost::spirit::qi::char_;
- using boost::spirit::qi::string;
- using boost::spirit::qi::lit;
- using boost::spirit::qi::parse;
using boost::spirit::qi::_1;
- using boost::phoenix::ref;
using boost::phoenix::push_back;
std::string name_of_opening_section;
@@ -119,7 +119,7 @@
current_section_path += name_of_opening_section + sections_separator;
}
- void check_duplication_of( const std::string& opening_section_name ) {
+ void check_duplication_of( const std::string& opening_section_name ) const {
const std::string name_of_last_opening_section = retrieve_name_of_last_opening_section();
if ( opening_section_name == name_of_last_opening_section ) {
notify( "Duplication of open tag for section '"
@@ -144,12 +144,7 @@
}
private:
bool handle_section_closing( std::string& s, pure_options& /* factual_obtained_options */ ) {
- using boost::spirit::qi::char_;
- using boost::spirit::qi::string;
- using boost::spirit::qi::lit;
- using boost::spirit::qi::parse;
using boost::spirit::qi::_1;
- using boost::phoenix::ref;
using boost::phoenix::push_back;
std::string name_of_closing_section;
@@ -195,12 +190,7 @@
}
private:
bool handle_option( std::string& s, pure_options& factual_obtained_options ) {
- using boost::spirit::qi::char_;
- using boost::spirit::qi::string;
- using boost::spirit::qi::lit;
- using boost::spirit::qi::parse;
using boost::spirit::qi::_1;
- using boost::phoenix::ref;
using boost::phoenix::push_back;
std::string option_name;
@@ -237,9 +227,9 @@
std::string what_happened = "in global scope";
if ( !current_section_path.empty() ) {
what_happened = "in section '"
- + prepare_full_name_for_log( current_section_path, sections_separator )
- + "'"
- ;
+ + prepare_full_name_for_log( current_section_path, sections_separator )
+ + "'"
+ ;
} else {}
what_happened = "Meaningless string '" + s + "' detected " + what_happened + "!";
notify( what_happened );
@@ -247,10 +237,10 @@
}
private:
void check_last_section_closing() {
- // if ( !current_section_path.empty() ) {
- // boost::erase_last( current_section_path, sections_separator );
- // notify( "Section '" + current_section_path + "' unclosed!" );
- // } else {}
+ if ( !current_section_path.empty() ) {
+ boost::erase_last( current_section_path, sections_separator );
+ notify( "Section '" + current_section_path + "' unclosed!" );
+ } else {}
}
void convert_name_depending_on_case_sensitivity( std::string& section_name ) const {
Modified: sandbox/configurator/boost/configurator/detail/validators.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/detail/validators.hpp (original)
+++ sandbox/configurator/boost/configurator/detail/validators.hpp 2010-12-10 02:22:25 EST (Fri, 10 Dec 2010)
@@ -20,6 +20,9 @@
#include <boost/function.hpp>
#include <boost/foreach.hpp>
#include <boost/spirit/include/qi.hpp>
+#include <boost/spirit/include/phoenix_core.hpp>
+#include <boost/spirit/include/phoenix_operator.hpp>
+#include <boost/spirit/include/phoenix_stl.hpp>
#include <cmath>
#endif
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