|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83735 - trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk
From: barend.gehrels_at_[hidden]
Date: 2013-04-03 07:30:16
Author: barendgehrels
Date: 2013-04-03 07:30:15 EDT (Wed, 03 Apr 2013)
New Revision: 83735
URL: http://svn.boost.org/trac/boost/changeset/83735
Log:
[geometry] fixes duplicate == for enumerations (caused by Doxygen 1.8); fixed warning; added version information
Text files modified:
trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml2qbk.cpp | 31 ++++++++++++++++++++++++++++---
trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/quickbook_output.hpp | 8 +++++---
2 files changed, 33 insertions(+), 6 deletions(-)
Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml2qbk.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml2qbk.cpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml2qbk.cpp 2013-04-03 07:30:15 EDT (Wed, 03 Apr 2013)
@@ -43,6 +43,15 @@
#include <quickbook_output.hpp>
#include <rapidxml_util.hpp>
+static const std::string version = "1.1.0";
+
+inline std::string program_description()
+{
+ std::string result("=== doxygen_xml2qbk ");
+ result += version;
+ result += " ===";
+ return result;
+}
int main(int argc, char** argv)
@@ -57,12 +66,13 @@
// Read/get configuration
{
namespace po = boost::program_options;
- po::options_description description("=== doxml2qbk ===\nAllowed options");
+ po::options_description description;
std::string convenience_headers;
description.add_options()
("help", "Help message")
+ ("version", "Version description")
("xml", po::value<std::string>(&filename),
"Name of XML file written by Doxygen")
("start_include", po::value<std::string>(&config.start_include),
@@ -95,9 +105,24 @@
po::notify(varmap);
- if (varmap.count("help") || filename.empty())
+ if (varmap.count("version"))
+ {
+ std::cout << version << std::endl;
+ return 0;
+ }
+ else if (varmap.count("help"))
+ {
+ std::cout
+ << program_description() << std::endl
+ << description << std::endl;
+ return 0;
+ }
+ else if (filename.empty())
{
- std::cout << description << std::endl;
+ std::cout
+ << program_description() << std::endl
+ << "Allowed options:" << std::endl
+ << description << std::endl;
return 1;
}
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 2013-04-03 07:30:15 EDT (Wed, 03 Apr 2013)
@@ -140,7 +140,9 @@
out << (first ? " {" : ", ") << value.name;
if (! value.initializer.empty())
{
- out << " = " << boost::trim_copy(value.initializer);
+ // Doxygen 1.6 does not include "=" in the <initializer> tag, Doxygen 1.8 does.
+ // We just remove the "=" to have consisten output
+ out << " = " << boost::trim_copy(boost::replace_all_copy(value.initializer, "=", ""));
}
first = false;
}
@@ -858,7 +860,7 @@
quickbook_template_parameter_list_alt(f.template_parameters, out);
out << "\n";
- unsigned offset = 1; // '('
+ std::size_t offset = 1; // '('
switch(f.type)
{
case function_constructor_destructor :
@@ -983,7 +985,7 @@
out << value.name;
if ( !value.initializer.empty() )
{
- out << " = " << boost::trim_copy(value.initializer);
+ out << " = " << boost::trim_copy(boost::replace_all_copy(value.initializer, "=", ""));
}
first = false;
}
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