Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65035 - trunk/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2010-08-26 17:00:04


Author: danieljames
Date: 2010-08-26 17:00:03 EDT (Thu, 26 Aug 2010)
New Revision: 65035
URL: http://svn.boost.org/trac/boost/changeset/65035

Log:
Less 'using namespace' in quickbook.
Text files modified:
   trunk/tools/quickbook/src/actions.hpp | 8 ++++----
   trunk/tools/quickbook/src/actions_class.hpp | 2 +-
   trunk/tools/quickbook/src/code_snippet.hpp | 2 ++
   trunk/tools/quickbook/src/grammar.hpp | 16 ++++++++--------
   trunk/tools/quickbook/src/phrase_grammar.hpp | 7 ++++---
   5 files changed, 19 insertions(+), 16 deletions(-)

Modified: trunk/tools/quickbook/src/actions.hpp
==============================================================================
--- trunk/tools/quickbook/src/actions.hpp (original)
+++ trunk/tools/quickbook/src/actions.hpp 2010-08-26 17:00:03 EDT (Thu, 26 Aug 2010)
@@ -32,11 +32,11 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
-
+ namespace cl = boost::spirit::classic;
     namespace fs = boost::filesystem;
- typedef position_iterator<std::string::const_iterator> iterator;
- typedef symbols<std::string> string_symbols;
+
+ typedef cl::position_iterator<std::string::const_iterator> iterator;
+ typedef cl::symbols<std::string> string_symbols;
     typedef std::map<std::string, std::string> attribute_map;
 
     struct actions;

Modified: trunk/tools/quickbook/src/actions_class.hpp
==============================================================================
--- trunk/tools/quickbook/src/actions_class.hpp (original)
+++ trunk/tools/quickbook/src/actions_class.hpp 2010-08-26 17:00:03 EDT (Thu, 26 Aug 2010)
@@ -15,7 +15,7 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ namespace cl = boost::spirit::classic;
     namespace fs = boost::filesystem;
 
     struct actions

Modified: trunk/tools/quickbook/src/code_snippet.hpp
==============================================================================
--- trunk/tools/quickbook/src/code_snippet.hpp (original)
+++ trunk/tools/quickbook/src/code_snippet.hpp 2010-08-26 17:00:03 EDT (Thu, 26 Aug 2010)
@@ -17,6 +17,8 @@
 
 namespace quickbook
 {
+ using namespace boost::spirit::classic;
+
     struct code_snippet_actions
     {
         code_snippet_actions(std::vector<template_symbol>& storage,

Modified: trunk/tools/quickbook/src/grammar.hpp
==============================================================================
--- trunk/tools/quickbook/src/grammar.hpp (original)
+++ trunk/tools/quickbook/src/grammar.hpp 2010-08-26 17:00:03 EDT (Thu, 26 Aug 2010)
@@ -15,10 +15,10 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ namespace cl = boost::spirit::classic;
 
     struct doc_info_grammar
- : public grammar<doc_info_grammar>
+ : public cl::grammar<doc_info_grammar>
     {
         doc_info_grammar(quickbook::actions& actions)
             : actions(actions) {}
@@ -29,7 +29,7 @@
         quickbook::actions& actions;
     };
 
- struct block_grammar : grammar<block_grammar>
+ struct block_grammar : cl::grammar<block_grammar>
     {
         block_grammar(quickbook::actions& actions_, bool skip_initial_spaces = false)
             : actions(actions_), skip_initial_spaces(skip_initial_spaces) { }
@@ -41,7 +41,7 @@
         bool const skip_initial_spaces;
     };
 
- struct phrase_grammar : grammar<phrase_grammar>
+ struct phrase_grammar : cl::grammar<phrase_grammar>
     {
         phrase_grammar(quickbook::actions& actions, bool& no_eols)
             : no_eols(no_eols), actions(actions) {}
@@ -53,7 +53,7 @@
         quickbook::actions& actions;
     };
 
- struct simple_phrase_grammar : public grammar<simple_phrase_grammar >
+ struct simple_phrase_grammar : public cl::grammar<simple_phrase_grammar >
     {
         simple_phrase_grammar(quickbook::actions& actions)
             : actions(actions) {}
@@ -65,7 +65,7 @@
     };
 
     struct command_line_grammar
- : public grammar<command_line_grammar>
+ : public cl::grammar<command_line_grammar>
     {
         command_line_grammar(quickbook::actions& actions)
             : actions(actions) {}
@@ -77,7 +77,7 @@
     };
 
     template <typename Iterator, typename Grammar>
- parse_info<Iterator> parse(Iterator&, Iterator, Grammar&);
+ cl::parse_info<Iterator> parse(Iterator&, Iterator, Grammar&);
 }
 
-#endif
\ No newline at end of file
+#endif

Modified: trunk/tools/quickbook/src/phrase_grammar.hpp
==============================================================================
--- trunk/tools/quickbook/src/phrase_grammar.hpp (original)
+++ trunk/tools/quickbook/src/phrase_grammar.hpp 2010-08-26 17:00:03 EDT (Thu, 26 Aug 2010)
@@ -14,14 +14,15 @@
 
 namespace quickbook
 {
- using namespace boost::spirit::classic;
+ namespace cl = boost::spirit::classic;
 
     template <typename Scanner>
     struct phrase_grammar::definition
     {
         definition(phrase_grammar const& self);
 
- rule<Scanner> space, blank, comment, phrase, phrase_markup, image,
+ cl::rule<Scanner>
+ space, blank, comment, phrase, phrase_markup, image,
                         simple_phrase_end, phrase_end, bold, italic, underline, teletype,
                         strikethrough, escape, url, common, funcref, classref,
                         memberref, enumref, macroref, headerref, conceptref, globalref,
@@ -36,7 +37,7 @@
                         template_inner_arg_1_5, brackets_1_5
                         ;
 
- rule<Scanner> const&
+ cl::rule<Scanner> const&
         start() const { return common; }
     };
 }


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