|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65106 - sandbox/geometry/other/programs/doxygen_xml2qbk
From: barend.gehrels_at_[hidden]
Date: 2010-08-29 10:19:27
Author: barendgehrels
Date: 2010-08-29 10:19:24 EDT (Sun, 29 Aug 2010)
New Revision: 65106
URL: http://svn.boost.org/trac/boost/changeset/65106
Log:
Small fixes
Text files modified:
sandbox/geometry/other/programs/doxygen_xml2qbk/doxygen_xml2qbk.cpp | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 deletions(-)
Modified: sandbox/geometry/other/programs/doxygen_xml2qbk/doxygen_xml2qbk.cpp
==============================================================================
--- sandbox/geometry/other/programs/doxygen_xml2qbk/doxygen_xml2qbk.cpp (original)
+++ sandbox/geometry/other/programs/doxygen_xml2qbk/doxygen_xml2qbk.cpp 2010-08-29 10:19:24 EDT (Sun, 29 Aug 2010)
@@ -589,8 +589,8 @@
<< "[[Case] [Behavior] ]" << std::endl;
BOOST_FOREACH(std::string const& behavior, behaviors)
{
- // Split at first ":"
- std::size_t pos = behavior.find(":");
+ // Split at last ":"
+ std::size_t pos = behavior.rfind(":");
if (pos != std::string::npos)
{
std::string c = behavior.substr(0, pos);
@@ -616,12 +616,31 @@
}
-void quickbook_output(function const& f, std::ostream& out)
+void quickbook_output(function const& f, bool use_arity, std::ostream& out)
{
// Write the parsed function
int arity = (int)f.parameters.size();
- out << "[section:" << f.name << "_" << arity << " " << f.name << " (" << arity << ")" "]" << std::endl;
- out << std::endl;
+ bool has_strategy = false;
+ BOOST_FOREACH(param const& p, f.parameters)
+ {
+ if (p.type == "Strategy")
+ {
+ has_strategy = true;
+ }
+ }
+
+ out << "[section:" << f.name;
+ if (use_arity)
+ {
+ out << "_" << arity;
+ }
+ out << " " << f.name;
+ if (has_strategy)
+ {
+ out << " (with strategy)";
+ }
+ out << "]" << std::endl
+ << std::endl;
out << f.brief_description << std::endl;
out << std::endl;
@@ -821,7 +840,9 @@
//: "../../../libs/geometry/doc/doxygen_output/xml/structboost_1_1geometry_1_1strategy_1_1distance_1_1pythagoras.xml";
//: "../../../libs/geometry/doc/doxygen_output/xml/classboost_1_1geometry_1_1point.xml";
//: "../../../libs/geometry/doc/doxygen_output/xml/group__simplify.xml";
- : "../../../libs/geometry/doc/doxygen_output/xml/group__register.xml";
+ //: "../../../libs/geometry/doc/doxygen_output/xml/group__centroid.xml";
+ //: "../../../libs/geometry/doc/doxygen_output/xml/group__register.xml";
+ : "../../../libs/geometry/doc/doxygen_output/xml/group__intersection.xml";
std::string xml_string = file_to_string(filename);
@@ -858,11 +879,11 @@
BOOST_FOREACH(function const& f, doc.functions)
{
- quickbook_output(f, std::cout);
+ quickbook_output(f, doc.functions.size() > 1, std::cout);
}
BOOST_FOREACH(function const& f, doc.defines)
{
- quickbook_output(f, std::cout);
+ quickbook_output(f, true, std::cout);
}
if (! doc.cos.name.empty())
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