Hi!
I have a \code block like this in a \page comment:
------------------------------------------
\code{.cpp}
namespace XYZ { namespace ABC {
class testclass
: public XYZ::DEF::SomeTemplateFunc<tmpl_arg_1\, tmpl_arg_2>
[...]
\endcode
}
------------------------------------------
That generates nice output: everything is perfect, and the rest of the \page is
great.
Now I've defined an alias to create a "titled box": a one-column, two-row table
with a title in the first row and anything I want in the second row. The macro
looks like this (probably not the best it could be, but it works):
ALIASES += titledbox{2}="<table><tr
align=\"center\"><td>\1</td></tr><tr><td>\2</td></tr></table>"
The first argument is the title, second is everything to fill the second row
cell. It works very nicely with normal text, HTML, or even a <pre> block for
the second argument, as long as I remember to escape all commas. :) No
problems to this point.
But now I'm using that alias to put a title over a block of C++ code: I put a
\code{.cpp} block as the second argument to the alias.
Problem: if the code is "incomplete", the alias gives bad output. By
"incomplete", I mean some open curly-braces are not closed within the \code
block. See the code block above which worked just fine by itself: it does not
close the two namespaces and it doesn't work inside this alias.
This test page shows the bad result:
------------------------------------------
/*! \page testcodeintable TestCodeInTable
\titledbox{<b>sometitle</b>,
\code{.cpp}
namespace XYZ { namespace ABC {
class testclass
: public XYZ::DEF::SomeTemplateFunc<tmpl_arg_1\, tmpl_arg_2>
[...]
\endcode
}
*/
------------------------------------------
Instead of a nice boxed two-row table, the output looks like this:
------------------------------------------
{sometitle,
namespace XYZ { namespace ABC {
class testclass
: public XYZ::DEF::SomeTemplateFunc<tmpl_arg_1\, tmpl_arg_2>
[...]
}
------------------------------------------
(If that was part of a larger page, many other Doxygen constructs later in the
page are messed up, too.)
Note that the actual \code block in those results looks just fine; it's the
outer table that is messed up/missing.
But if I add two closing curly-braces just before the \endcode line to close
the two namespaces, then the output looks perfect: borders around the title and
around the code snippet. The code has an additional box due to the \code
command, but that's ok.
So, why does the alias not work unless the \code block has all scopes closed?
Curly-braces don't affect <table>, do they?
And how does the "complete-ness" of code inside \code affect something OUTSIDE
the \code-\endcode block?
Mike
This email was sent to you by Thomson Reuters, the global news and information
company. Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be the views of
Thomson Reuters.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users