Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68545 - in trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk: . sample sample/src
From: barend.gehrels_at_[hidden]
Date: 2011-01-29 11:18:33


Author: barendgehrels
Date: 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
New Revision: 68545
URL: http://svn.boost.org/trac/boost/changeset/68545

Log:
Added derivation information
Text files modified:
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_elements.hpp | 10 +++++++++-
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml_parser.hpp | 8 ++++++++
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/quickbook_output.hpp | 19 +++++++++++++++++--
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/Jamfile.v2 | 1 +
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/apple.qbk | 2 +-
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/fruit.qbk | 5 +++--
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/make_qbk.py | 1 +
   trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/src/fruit.hpp | 6 +++++-
   8 files changed, 45 insertions(+), 7 deletions(-)

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_elements.hpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_elements.hpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_elements.hpp 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -98,11 +98,19 @@
 
 };
 
+struct base_class
+{
+ std::string name;
+ std::string derivation; // "prot" element
+ std::string virtuality; // "virt" element
+};
+
 struct class_or_struct : public element
 {
     std::string name, fullname;
- std::string model_of;
     std::vector<function> functions;
+
+ std::vector<base_class> base_classes;
 };
 
 

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml_parser.hpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml_parser.hpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/doxygen_xml_parser.hpp 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -398,6 +398,14 @@
                 doc.cos.name = keep_after(name, "::");
             }
         }
+ else if (nodename == "basecompoundref")
+ {
+ base_class bc;
+ bc.name = node->value();
+ bc.derivation = get_attribute(node, "prot");
+ bc.virtuality = get_attribute(node, "virt");
+ doc.cos.base_classes.push_back(bc);
+ }
         else
         {
             //std::cout << nodename << " ignored." << std::endl;

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-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -311,8 +311,23 @@
     out << "[heading Synopsis]" << std::endl
         << "``";
     quickbook_template_parameter_list(cos.template_parameters, out);
- out << "class " << short_name << std::endl
- << "{" << std::endl
+ out << "class " << short_name;
+
+ if (! cos.base_classes.empty())
+ {
+ out << " : ";
+ bool first = true;
+ BOOST_FOREACH(base_class const& bc, cos.base_classes)
+ {
+ out << (first ? "" : ", ")
+ << (boost::equals(bc.derivation, "private") ? "" : bc.derivation)
+ << (boost::equals(bc.virtuality, "non-virtual") ? "" : bc.virtuality)
+ << " " << bc.name;
+ first = false;
+ }
+ }
+
+ out << std::endl << "{" << std::endl
         << " // ..." << std::endl
         << "};" << std::endl
         << "``" << std::endl << std::endl;

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/Jamfile.v2 (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/Jamfile.v2 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -16,6 +16,7 @@
         : fruit.qbk
         : <dependency>Jamfile.v2
                 <dependency>apple.qbk
+ <dependency>eat.qbk
         : <xsl:param>chunk.section.depth=4
         <xsl:param>chunk.first.sections=1
         <xsl:param>toc.section.depth=3

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/apple.qbk
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/apple.qbk (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/apple.qbk 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -12,7 +12,7 @@
 
 [heading Synopsis]
 ``template<typename String>
-class fruit::apple
+class fruit::apple : public fruit::rose, protected fruit::dutch
 {
   // ...
 };

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/fruit.qbk
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/fruit.qbk (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/fruit.qbk 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -22,11 +22,12 @@
     [category fruit]
 ]
 
-This is the fruit documentation
+This is the fruit documentation (just a foo sample of the doxygen_xml2qbk doc tool)
 
 [import src/examples/apple_example.cpp]
 
+[include rose.qbk]
 [include apple.qbk]
 [include eat.qbk]
 
-Hope you enjoyed yor fruit
+Hope you enjoyed your fruit

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/make_qbk.py
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/make_qbk.py (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/make_qbk.py 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -19,5 +19,6 @@
 os.system("doxygen fruit.dox")
 os.system(cmd % ("group__eat", "eat"))
 os.system(cmd % ("classfruit_1_1apple", "apple"))
+os.system(cmd % ("classfruit_1_1rose", "rose"))
 
 os.system("bjam")

Modified: trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/src/fruit.hpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/src/fruit.hpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/sample/src/fruit.hpp 2011-01-29 11:18:30 EST (Sat, 29 Jan 2011)
@@ -11,6 +11,10 @@
 
 namespace fruit
 {
+
+/// Rose (Rosaceae)
+class rose {};
+
 /*!
 \brief An apple
 \details The apple is the pomaceous fruit of the apple tree,
@@ -23,7 +27,7 @@
 }
 */
 template <typename String = std::string>
-class apple
+class apple : public rose
 {
     String sort;
 


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