Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67263 - in sandbox/configurator/boost/configurator: . detail
From: for.dshevchenko_at_[hidden]
Date: 2010-12-16 01:02:01


Author: dshevchenko
Date: 2010-12-16 01:01:54 EST (Thu, 16 Dec 2010)
New Revision: 67263
URL: http://svn.boost.org/trac/boost/changeset/67263

Log:
One line comment sign

Text files modified:
   sandbox/configurator/boost/configurator/configurator.hpp | 1 +
   sandbox/configurator/boost/configurator/configurator_settings.hpp | 5 +++++
   sandbox/configurator/boost/configurator/detail/comments_remover.hpp | 14 +++++---------
   sandbox/configurator/boost/configurator/option.hpp | 1 -
   4 files changed, 11 insertions(+), 10 deletions(-)

Modified: sandbox/configurator/boost/configurator/configurator.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/configurator.hpp (original)
+++ sandbox/configurator/boost/configurator/configurator.hpp 2010-12-16 01:01:54 EST (Thu, 16 Dec 2010)
@@ -45,6 +45,7 @@
     configurator() :
             sections_separator( "::" )
             , settings_of_configurator()
+ , remove_comments_from( settings_of_configurator.one_line_comment_sign )
             , options_obtainer( settings_of_configurator.option_name_value_separator
                                 , sections_separator
                                 , registered_options

Modified: sandbox/configurator/boost/configurator/configurator_settings.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/configurator_settings.hpp (original)
+++ sandbox/configurator/boost/configurator/configurator_settings.hpp 2010-12-16 01:01:54 EST (Thu, 16 Dec 2010)
@@ -33,6 +33,11 @@
     bool case_sensitivity;
     //
 public:
+ configurator_settings& set_one_line_comment_sign( const std::string& sign ) {
+ one_line_comment_sign = sign;
+ return *this;
+ }
+
     configurator_settings& set_case_sensitivity_for_names() {
         case_sensitivity = true;
         return *this;

Modified: sandbox/configurator/boost/configurator/detail/comments_remover.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/detail/comments_remover.hpp (original)
+++ sandbox/configurator/boost/configurator/detail/comments_remover.hpp 2010-12-16 01:01:54 EST (Thu, 16 Dec 2010)
@@ -40,18 +40,14 @@
 class comments_remover {
     typedef boost::spirit::qi::rule< string_const_it > simple_rule;
 public:
- comments_remover() :
- one_line_comment_sign( "//" )
+ explicit comments_remover( const std::string& _one_line_comment_sign ) :
+ one_line_comment_sign( _one_line_comment_sign )
             , multi_line_comment_begin_sign( "/*" )
             , multi_line_comment_end_sign( "*/" ) {}
 private:
- std::string one_line_comment_sign;
- const std::string multi_line_comment_begin_sign;
- const std::string multi_line_comment_end_sign;
-public:
- void set_one_line_comment_sign( const std::string& sign ) {
- one_line_comment_sign = sign;
- }
+ const std::string& one_line_comment_sign;
+ const std::string multi_line_comment_begin_sign;
+ const std::string multi_line_comment_end_sign;
 public:
     void operator()( str_storage& obtained_strings ) const {
         std::string obtained = concatenate( obtained_strings );

Modified: sandbox/configurator/boost/configurator/option.hpp
==============================================================================
--- sandbox/configurator/boost/configurator/option.hpp (original)
+++ sandbox/configurator/boost/configurator/option.hpp 2010-12-16 01:01:54 EST (Thu, 16 Dec 2010)
@@ -21,7 +21,6 @@
 
 ///
 struct option {
- option() {}
     explicit option( const std::string& _type_id, const std::string& _type_name ) :
             type_id( _type_id.begin(), _type_id.end() )
             , type_name( _type_name.begin(), _type_name.end() )


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