summaryrefslogtreecommitdiffstats
path: root/src/memberdef.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-09-07 09:29:20 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-09-07 09:29:20 (GMT)
commit7340b1c0e767b0ee88ce389df653d3d2a77801cd (patch)
treebab4c534d53eb7fb0f713049f0d5885d8eed8a62 /src/memberdef.cpp
parent3e1360976b6ab9621b85d93fdd4e9232d6a7a7fa (diff)
downloadDoxygen-7340b1c0e767b0ee88ce389df653d3d2a77801cd.zip
Doxygen-7340b1c0e767b0ee88ce389df653d3d2a77801cd.tar.gz
Doxygen-7340b1c0e767b0ee88ce389df653d3d2a77801cd.tar.bz2
Implementation of standard generator for docbook output
Till now docbook had its own output generator, but lot of possibilities were missing (see remark about updating below), with this patch the (more than) basic implementation has been made. Added some docbook tests to the current tests and updated documentation where necessary Tried updating current version but too many issues remained that were generically handled in the standard generator, code is in current version behind '#if 0' construct in doxygen.cpp and name with '_v1' and in docbookgen.cp'
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r--src/memberdef.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index c9745ac..5d74270 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -161,10 +161,12 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md)
//ol.disableAllBut(OutputGenerator::Html);
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
bool latexOn = ol.isEnabled(OutputGenerator::Latex);
+ bool docbookOn = ol.isEnabled(OutputGenerator::Docbook);
{
// html and latex
if (htmlOn) ol.enable(OutputGenerator::Html);
if (latexOn) ol.enable(OutputGenerator::Latex);
+ if (docbookOn) ol.enable(OutputGenerator::Docbook);
ol.endMemberDocName();
ol.startParameterList(!md->isObjCMethod());
@@ -172,6 +174,7 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md)
ol.enableAll();
ol.disable(OutputGenerator::Html);
ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Docbook);
{
// other formats
if (!md->isObjCMethod()) ol.docify("("); // start argument list
@@ -270,6 +273,7 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md)
// ol.docify(" ");
//}
ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Docbook);
ol.disable(OutputGenerator::Html);
ol.docify(" "); /* man page */
if (htmlOn) ol.enable(OutputGenerator::Html);
@@ -277,12 +281,15 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md)
ol.startEmphasis();
ol.enable(OutputGenerator::Man);
if (latexOn) ol.enable(OutputGenerator::Latex);
+ if (docbookOn) ol.enable(OutputGenerator::Docbook);
if (a->name.isEmpty()) ol.docify(a->type); else ol.docify(a->name);
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Docbook);
ol.endEmphasis();
ol.enable(OutputGenerator::Man);
if (latexOn) ol.enable(OutputGenerator::Latex);
+ if (docbookOn) ol.enable(OutputGenerator::Docbook);
}
if (!a->array.isEmpty())
{
@@ -338,10 +345,12 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Docbook);
if (!md->isObjCMethod()) ol.docify(")"); // end argument list
ol.enableAll();
if (htmlOn) ol.enable(OutputGenerator::Html);
if (latexOn) ol.enable(OutputGenerator::Latex);
+ if (docbookOn) ol.enable(OutputGenerator::Docbook);
if (first) ol.startParameterName(defArgList->count()<2);
ol.endParameterName(TRUE,defArgList->count()<2,!md->isObjCMethod());
ol.popGeneratorState();
@@ -1478,6 +1487,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Docbook);
ol.docify("\n");
ol.popGeneratorState();
}
@@ -3836,8 +3846,10 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
typeDecl.pushGeneratorState();
typeDecl.disableAllBut(OutputGenerator::Html);
typeDecl.enable(OutputGenerator::Latex);
+ typeDecl.enable(OutputGenerator::Docbook);
typeDecl.lineBreak();
typeDecl.disable(OutputGenerator::Latex);
+ typeDecl.disable(OutputGenerator::Docbook);
typeDecl.writeString("&#160;&#160;");
typeDecl.popGeneratorState();
}