Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59322 - branches/quickbook-1.5-spirit2
From: daniel_james_at_[hidden]
Date: 2010-01-27 17:07:00


Author: danieljames
Date: 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
New Revision: 59322
URL: http://svn.boost.org/trac/boost/changeset/59322

Log:
Move doc_info into its own header.
Added:
   branches/quickbook-1.5-spirit2/doc_info.hpp (contents, props changed)
Text files modified:
   branches/quickbook-1.5-spirit2/actions.cpp | 2 +-
   branches/quickbook-1.5-spirit2/doc_info.cpp | 6 +-----
   branches/quickbook-1.5-spirit2/fwd.hpp | 1 +
   branches/quickbook-1.5-spirit2/grammars.hpp | 23 -----------------------
   branches/quickbook-1.5-spirit2/quickbook.cpp | 21 +++++++++++----------
   5 files changed, 14 insertions(+), 39 deletions(-)

Modified: branches/quickbook-1.5-spirit2/actions.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/actions.cpp (original)
+++ branches/quickbook-1.5-spirit2/actions.cpp 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
@@ -12,7 +12,7 @@
 #include <boost/spirit/include/support_unused.hpp>
 #include "actions.hpp"
 #include "actions_class.hpp"
-#include "grammars.hpp" // TODO: Needed for doc_info
+#include "doc_info.hpp"
 #include "quickbook.hpp" // TODO: Quickbook version number
 #include "utils.hpp"
 

Modified: branches/quickbook-1.5-spirit2/doc_info.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/doc_info.cpp (original)
+++ branches/quickbook-1.5-spirit2/doc_info.cpp 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
@@ -7,9 +7,8 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#if !defined(BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP)
-#define BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP
 
+#include "doc_info.hpp"
 #include "grammars.hpp"
 #include "quickbook.hpp"
 #include "actions_class.hpp"
@@ -202,6 +201,3 @@
             ;
     }
 }
-
-#endif // BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP
-

Added: branches/quickbook-1.5-spirit2/doc_info.hpp
==============================================================================
--- (empty file)
+++ branches/quickbook-1.5-spirit2/doc_info.hpp 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2002 2004 2006 Joel de Guzman
+ Copyright (c) 2004 Eric Niebler
+ Copyright (c) 2010 Daniel James
+
+ Use, modification and distribution is subject to 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)
+=============================================================================*/
+#if !defined(BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP)
+#define BOOST_SPIRIT_QUICKBOOK_DOC_INFO_HPP
+
+#include <vector>
+#include <string>
+
+namespace quickbook
+{
+ struct doc_info
+ {
+ typedef std::vector<std::string> string_list;
+ typedef std::vector<std::pair<std::string, std::string> > author_list;
+ typedef std::vector<std::pair<string_list, std::string> > copyright_list;
+
+ std::string doc_type;
+ std::string doc_title;
+ std::string doc_version;
+ std::string doc_id;
+ std::string doc_dirname;
+ copyright_list doc_copyrights;
+ std::string doc_purpose;
+ std::string doc_category;
+ author_list doc_authors;
+ std::string doc_license;
+ std::string doc_last_revision;
+ };
+}
+
+#endif // BOOST_SPIRIT_QUICKBOOK_GRAMMARS_HPP

Modified: branches/quickbook-1.5-spirit2/fwd.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/fwd.hpp (original)
+++ branches/quickbook-1.5-spirit2/fwd.hpp 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
@@ -15,6 +15,7 @@
 namespace quickbook
 {
     struct macro;
+ struct doc_info;
 
     struct actions;
     struct code_snippet_actions;

Modified: branches/quickbook-1.5-spirit2/grammars.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/grammars.hpp (original)
+++ branches/quickbook-1.5-spirit2/grammars.hpp 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
@@ -57,25 +57,6 @@
         block_grammar& operator=(block_grammar const&);
     };
 
- struct doc_info
- {
- typedef std::vector<std::string> string_list;
- typedef std::vector<std::pair<std::string, std::string> > author_list;
- typedef std::vector<std::pair<string_list, std::string> > copyright_list;
-
- std::string doc_type;
- std::string doc_title;
- std::string doc_version;
- std::string doc_id;
- std::string doc_dirname;
- copyright_list doc_copyrights;
- std::string doc_purpose;
- std::string doc_category;
- author_list doc_authors;
- std::string doc_license;
- std::string doc_last_revision;
- };
-
     struct doc_info_grammar : qi::grammar<iterator, doc_info()>
     {
         doc_info_grammar(quickbook::actions& actions);
@@ -89,10 +70,6 @@
         doc_info_grammar& operator=(doc_info_grammar const&);
     };
 
- // TODO: Duplicate declaration:
-
- struct code_snippet_actions;
-
     struct python_code_snippet_grammar
         : qi::grammar<iterator>
     {

Modified: branches/quickbook-1.5-spirit2/quickbook.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/quickbook.cpp (original)
+++ branches/quickbook-1.5-spirit2/quickbook.cpp 2010-01-27 17:06:58 EST (Wed, 27 Jan 2010)
@@ -7,21 +7,22 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
-#include "actions_class.hpp"
-#include "grammars.hpp"
-#include "post_process.hpp"
-#include "utils.hpp"
-#include "input_path.hpp"
-#include <boost/spirit/include/classic_iterator.hpp>
-#include <boost/program_options.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/ref.hpp>
 
 #include <stdexcept>
 #include <fstream>
 #include <iostream>
 #include <vector>
+#include <boost/program_options.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/ref.hpp>
+#include "fwd.hpp"
+#include "actions_class.hpp"
+#include "grammars.hpp"
+#include "post_process.hpp"
+#include "utils.hpp"
+#include "input_path.hpp"
+#include "doc_info.hpp"
 
 #if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
 #pragma warning(disable:4355)


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