Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72058 - in trunk/libs/geometry/doc: . src/docutils/tools/doxygen_xml2qbk
From: barend.gehrels_at_[hidden]
Date: 2011-05-21 07:17:33


Author: barendgehrels
Date: 2011-05-21 07:17:31 EDT (Sat, 21 May 2011)
New Revision: 72058
URL: http://svn.boost.org/trac/boost/changeset/72058

Log:
Bugfix in synopsis generation, added () for empty functions
Added index terms (learned during auto-index review), this basically consisted of only adding three lines (now in function calls and namespaces splitted, and enumeration values added)
Added alphabetical index
Text files modified:
   trunk/libs/geometry/doc/geometry.qbk | 9 +++++++++
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/quickbook_output.hpp | 32 ++++++++++++++++++++++++++++++++
   2 files changed, 41 insertions(+), 0 deletions(-)

Modified: trunk/libs/geometry/doc/geometry.qbk
==============================================================================
--- trunk/libs/geometry/doc/geometry.qbk (original)
+++ trunk/libs/geometry/doc/geometry.qbk 2011-05-21 07:17:31 EDT (Sat, 21 May 2011)
@@ -93,7 +93,16 @@
 
 [include design_rationale.qbk]
 [include compiling.qbk]
+
+[section Indexes]
 [include matrix.qbk]
+[section Alphabetical Index]
+'''<index><title/></index>'''
+[endsect]
+[endsect]
+
 [include reference.qbk]
+
+
 [include about_documentation.qbk]
 [include acknowledgments.qbk]

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/quickbook_output.hpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/quickbook_output.hpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/quickbook_output.hpp 2011-05-21 07:17:31 EDT (Sat, 21 May 2011)
@@ -118,6 +118,10 @@
         {
             out << ")";
         }
+ else if (f.type != function_define)
+ {
+ out << "()";
+ }
     }
 
     out << "``"
@@ -285,6 +289,24 @@
         ;
 }
 
+inline void quickbook_output_indexterm(std::string const& term, std::ostream& out)
+{
+ if (boost::contains(term, "::"))
+ {
+ // "Unnamespace" it and add all terms (also the namespaces)
+ std::vector<std::string> splitted;
+ boost::split(splitted, boost::replace_all_copy(term, "::", ":")
+ , boost::is_any_of(":"), boost::token_compress_on);
+ BOOST_FOREACH(std::string const& part, splitted)
+ {
+ out << "'''<indexterm><primary>" << part << "</primary></indexterm>'''" << std::endl;
+ }
+ }
+ else
+ {
+ out << "'''<indexterm><primary>" << term << "</primary></indexterm>'''" << std::endl;
+ }
+}
 
 void quickbook_output(function const& f, configuration const& config, std::ostream& out)
 {
@@ -315,6 +337,8 @@
         << "]" << std::endl
         << std::endl;
 
+ quickbook_output_indexterm(f.name, out);
+
     out << qbk_escaped(f.brief_description) << std::endl;
     out << std::endl;
 
@@ -393,6 +417,12 @@
         << "]" << std::endl
         << std::endl;
 
+ quickbook_output_indexterm(e.name, out);
+ BOOST_FOREACH(enumeration_value const& value, e.enumeration_values)
+ {
+ quickbook_output_indexterm(value.name, out);
+ }
+
     out << e.brief_description << std::endl;
     out << std::endl;
 
@@ -465,6 +495,8 @@
     out << "[section:" << to_section_name(short_name) << " " << short_name << "]" << std::endl
         << std::endl;
 
+ quickbook_output_indexterm(short_name, out);
+
     out << cos.brief_description << std::endl;
     out << std::endl;
 


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