This has driven me batty for ages, so today I dug into it a bit. I can't
get Doxygen/BoostBook to emit any documentation about global objects.
I've attached 4 file: 2 headers, an xml and Jamfile.v2. Drop them in a
directory, bjam --v2 it and check out the resulting reference section.
The functions are documented but not the globals. Why?
My toolset:
doxygen: 1.3.7
docbook-xsl: 1.66.1
docbook-dtd: 4.2
Boost CVS main, up-to-date
If you look at the resulting autodoc.boostbook, you can see something
interesting. Although each file has exactly one global, in
autodoc.boostbook, both globals appear in both headers. But when it gets
built into HTML, all the globals have vanished!
I tracked part of the problem down to boostbook/xsl/reference.xsl, which
seems to be ignoring <data-member> at namespace scope. For instance,
consider the following (at line 29):
<!-- Emit namespace types -->
<xsl:apply-templates select="class|class-specialization|
struct|struct-specialization|
union|union-specialization|
typedef|enum" mode="synopsis">
If you add "data-member" to this list, the globals now show up in the
namespace synopses. But both globals show up in the synopses of both
files, which is wrong. This is due to some bug in doxygen2boostbook.xsl,
but my xsl skillz are not m4d enough to track it down.
Hopefully, this is enough to prod an xsl guru in the right direction.
--
Eric Niebler
Boost Consulting
www.boost-consulting.com
using boostbook ;
using doxygen ;
doxygen autodoc
:
./test1.hpp
./test2.hpp
:
;
boostbook test
:
test.xml
:
;
/// \file test1.hpp
/// a description
//
namespace foo {
/// A global
///
/// A global
///
int const a_global = 1;
/// A function
///
/// A function
///
inline int a_function()
{
return 0;
}
}
/// \file test2.hpp
/// a description
//
namespace foo {
/// Another global
///
/// Another global
///
int const another_global = 1;
/// Another function
///
/// Another global
///
inline int another_function()
{
return 0;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<library
id="test"
name="test"
dirname="test"
last-revision="$Date: 2005/09/16 05:46:03 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>A test</title>
<xi:include href="autodoc.boostbook" />
</library>