Update of /cvsroot/boost/boost/tools/quickbook/detail
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30383/tools/quickbook_backend/detail
Modified Files:
Tag: QUICKBOOK_BACKEND
actions.cpp actions.hpp actions_class.cpp actions_class.hpp
Log Message:
Add templates for the doc and doc_info.
Index: actions.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions.cpp,v
retrieving revision 1.49.2.1
retrieving revision 1.49.2.2
diff -u -d -r1.49.2.1 -r1.49.2.2
--- actions.cpp 13 Apr 2007 03:28:16 -0000 1.49.2.1
+++ actions.cpp 14 Apr 2007 00:52:21 -0000 1.49.2.2
@@ -13,6 +13,7 @@
#include <boost/bind.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/assign/list_of.hpp>
#include "./actions.hpp"
#include "./utils.hpp"
#include "./markups.hpp"
@@ -593,12 +594,6 @@
--actions.template_depth;
}
- void do_template_action::operator()(std::string const & name, iterator
first, iterator last) const
- {
- actions.template_info.insert(actions.template_info.begin(),name);
- do_template_action::operator()(first,last);
- }
-
void link_action::operator()(iterator first, iterator last) const
{
iterator save = first;
@@ -1079,16 +1074,16 @@
qbk_version_n = (qbk_major_version * 100) + qbk_minor_version;
}
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- << "<!DOCTYPE library PUBLIC \"-//Boost//DTD BoostBook XML
V1.0//EN\"\n"
- << "
\"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd\">\n"
- << '<' << actions.doc_type << "\n"
- << " id=\"" << actions.doc_id << "\"\n"
- << " name=\"" << actions.doc_title << "\"\n"
- << " dirname=\"" << actions.doc_dirname << "\"\n"
- << " last-revision=\"" << actions.doc_last_revision << "\" \n"
- << " xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n"
- << " <" << actions.doc_type << "info>\n";
+ actions.doc_pre(boost::assign::list_of
+ (actions.doc_type)
+ );
+ actions.doc_info_pre(boost::assign::list_of
+ (actions.doc_type)
+ (actions.doc_id)
+ (actions.doc_title)
+ (actions.doc_dirname)
+ (actions.doc_last_revision)
+ );
for_each(
actions.doc_authors.begin()
@@ -1169,7 +1164,13 @@
// We've finished generating our output. Here's what we'll do
// *after* everything else.
- out << "\n</" << actions.doc_type << ">\n\n";
+ actions.doc_info_post(boost::assign::list_of
+ (actions.doc_type)
+ (actions.doc_id)
+ );
+ actions.doc_post(boost::assign::list_of
+ (actions.doc_type)
+ );
}
void phrase_to_string_action::operator()(iterator first, iterator last)
const
@@ -1179,10 +1180,30 @@
void backend_action::operator()(iterator first, iterator last) const
{
- do_template_action::operator()(
- this->actions.backend_tag+"_"+this->action_name,
- first,
- last
+ actions.template_info.insert(
+ actions.template_info.begin(),
+ this->actions.backend_tag+"_"+this->action_name);
+ do_template_action::operator()(first,last);
+ }
+
+ void backend_action::operator()(std::list<std::string> const & args) const
+ {
+ actions.template_info.insert(
+ actions.template_info.begin(),
+ args.begin(),
+ args.end()
+ );
+ actions.template_info.insert(
+ actions.template_info.begin(),
+ this->actions.backend_tag+"_"+this->action_name
);
+ typedef position_iterator<std::string::const_iterator> iterator_type;
+ std::string nothing;
+ iterator_type first(
+ nothing.begin(), nothing.end(),
+ actions.filename.native_file_string().c_str());
+ iterator_type last(
+ nothing.end(), nothing.end());
+ do_template_action::operator()(first,last);
}
}
Index: actions.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions.hpp,v
retrieving revision 1.36.2.1
retrieving revision 1.36.2.2
diff -u -d -r1.36.2.1 -r1.36.2.2
--- actions.hpp 13 Apr 2007 03:28:16 -0000 1.36.2.1
+++ actions.hpp 14 Apr 2007 00:52:21 -0000 1.36.2.2
@@ -16,6 +16,7 @@
#include <vector>
#include <stack>
#include <algorithm>
+#include <list>
#include <boost/spirit/iterator/position_iterator.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/foreach.hpp>
@@ -497,7 +498,6 @@
: actions(actions) {}
void operator()(iterator first, iterator last) const;
- void operator()(std::string const & name, iterator first, iterator
last) const;
quickbook::actions& actions;
};
@@ -709,6 +709,8 @@
}
void operator()(iterator first, iterator last) const;
+
+ void operator()(std::list<std::string> const & args) const;
std::string action_name;
};
Index: actions_class.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions_class.cpp,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- actions_class.cpp 13 Apr 2007 03:28:16 -0000 1.9.2.1
+++ actions_class.cpp 14 Apr 2007 00:52:21 -0000 1.9.2.2
@@ -67,6 +67,10 @@
, templates()
// actions
+ , doc_pre("doc_pre",*this)
+ , doc_post("doc_post",*this)
+ , doc_info_pre("doc_info_pre",*this)
+ , doc_info_post("doc_info_post",*this)
, error()
, extract_doc_license(doc_license, phrase)
, extract_doc_purpose(doc_purpose, phrase)
Index: actions_class.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions_class.hpp,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -d -r1.9.2.1 -r1.9.2.2
--- actions_class.hpp 13 Apr 2007 03:28:16 -0000 1.9.2.1
+++ actions_class.hpp 14 Apr 2007 00:52:21 -0000 1.9.2.2
@@ -100,6 +100,11 @@
///////////////////////////////////////////////////////////////////////////
// actions
///////////////////////////////////////////////////////////////////////////
+ backend_action doc_pre;
+ backend_action doc_post;
+ backend_action doc_info_pre;
+ backend_action doc_info_post;
+
error_action error;
phrase_to_string_action extract_doc_license;
phrase_to_string_action extract_doc_purpose;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/boost-cvs