summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2016-07-17 11:10:17 (GMT)
committerGitHub <noreply@github.com>2016-07-17 11:10:17 (GMT)
commitf650c8fea01b4b95180b74b2e46caa25bd0f7d90 (patch)
tree5f8786094ba6376d4db733272ce93ffa790f1461 /src
parentbe8513a4bd5a91d93dd5d8b0e4a9667f782fd335 (diff)
parent5592c705d8ac98f579e2675c12777330c4c322c9 (diff)
downloadDoxygen-f650c8fea01b4b95180b74b2e46caa25bd0f7d90.zip
Doxygen-f650c8fea01b4b95180b74b2e46caa25bd0f7d90.tar.gz
Doxygen-f650c8fea01b4b95180b74b2e46caa25bd0f7d90.tar.bz2
Merge pull request #488 from bithium/feature/perlmod
Add support to more fields in Perlmod
Diffstat (limited to 'src')
-rw-r--r--src/perlmodgen.cpp45
1 files changed, 40 insertions, 5 deletions
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 38ebbb2..09e1968 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -653,8 +653,8 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
m_output.add("<programlisting>");
parseCode(m_ci,s->context(),s->text(),FALSE,0);
m_output.add("</programlisting>");
-#endif
return;
+#endif
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::RtfOnly: type = "rtfonly"; break;
@@ -667,6 +667,14 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::PlantUML: type = "plantuml"; break;
}
openItem(type);
+ if (s->hasCaption())
+ {
+ openSubBlock("caption");
+ QListIterator<DocNode> cli(s->children());
+ DocNode *n;
+ for (cli.toFirst();(n=cli.current());++cli) n->accept(this);
+ closeSubBlock();
+ }
m_output.addFieldQuotedString("content", s->text());
closeItem();
}
@@ -897,6 +905,7 @@ void PerlModDocVisitor::visitPre(DocSection *s)
{
QCString sect = QCString().sprintf("sect%d",s->level());
openItem(sect);
+ m_output.addFieldQuotedString("title", s->title());
openSubBlock("content");
}
@@ -1260,17 +1269,43 @@ void PerlModDocVisitor::visitPre(DocParamList *pl)
DocNode *param;
for (li.toFirst();(param=li.current());++li)
{
- QCString s;
+ QCString name;
if (param->kind()==DocNode::Kind_Word)
{
- s = ((DocWord*)param)->word();
+ name = ((DocWord*)param)->word();
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
- s = ((DocLinkedWord*)param)->word();
+ name = ((DocLinkedWord*)param)->word();
+ }
+
+ QCString dir = "";
+ DocParamSect *sect = 0;
+ if (pl->parent()->kind()==DocNode::Kind_ParamSect)
+ {
+ sect=(DocParamSect*)pl->parent();
+ }
+ if (sect && sect->hasInOutSpecifier())
+ {
+ if (pl->direction()!=DocParamSect::Unspecified)
+ {
+ if (pl->direction()==DocParamSect::In)
+ {
+ dir = "in";
+ }
+ else if (pl->direction()==DocParamSect::Out)
+ {
+ dir = "out";
+ }
+ else if (pl->direction()==DocParamSect::InOut)
+ {
+ dir = "in,out";
+ }
+ }
}
+
m_output.openHash()
- .addFieldQuotedString("name", s)
+ .addFieldQuotedString("name", name).addFieldQuotedString("dir", dir)
.closeHash();
}
m_output.closeList()