1 /******************************************************************************
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
22 #include <qtextstream.h>
25 #include "docbookgen.h"
29 #include "classlist.h"
34 #include "outputgen.h"
39 #include "docbookvisitor.h"
40 #include "docparser.h"
42 #include "parserintf.h"
43 #include "arguments.h"
44 #include "memberlist.h"
46 #include "memberdef.h"
47 #include "namespacedef.h"
48 #include "membername.h"
49 #include "membergroup.h"
54 #define Docbook_DB(x) do {} while(0)
56 //#define Docbook_DB(x) printf x
57 // debug inside output
58 //#define Docbook_DB(x) QCString __t;__t.sprintf x;m_t << __t
61 #define DB_GEN_C DB_GEN_C1(t)
62 #define DB_GEN_C1(x) x << "<!-- DB_GEN_C " << __LINE__ << " -->\n";
63 #define DB_GEN_C2(y) DB_GEN_C2a(t,y)
64 #define DB_GEN_C2a(x,y) x << "<!-- DB_GEN_C " << __LINE__ << " " << y << " -->\n";
69 #define DB_GEN_C2a(x,y)
73 inline void writeDocbookString(FTextStream &t,const char *s)
75 t << convertToDocBook(s);
78 inline void writeDocbookCodeString(FTextStream &t,const char *s, int &col)
87 static int tabSize = Config_getInt(TAB_SIZE);
88 int spacesToNextTabStop = tabSize - (col%tabSize);
89 col+=spacesToNextTabStop;
90 while (spacesToNextTabStop--) t << " ";
93 case ' ': t << " "; col++; break;
94 case '<': t << "<"; col++; break;
95 case '>': t << ">"; col++; break;
96 case '&': t << "&"; col++; break;
97 case '\'': t << "'"; col++; break;
98 case '"': t << """; col++; break;
99 case '\007': t << "^G"; col++; break; // bell
100 case '\014': t << "^L"; col++; break; // form feed
101 default: t << c; col++; break;
106 static void addIndexTerm(FTextStream &t, QCString prim, QCString sec = "")
108 t << "<indexterm><primary>";
109 t << convertToDocBook(prim);
114 t << convertToDocBook(sec);
117 t << "</indexterm>" << endl;
119 void writeDocbookLink(FTextStream &t,const char * /*extRef*/,const char *compoundId,
120 const char *anchorId,const char * text,const char * /*tooltip*/)
122 t << "<link linkend=\"_" << stripPath(compoundId);
123 if (anchorId) t << "_1" << anchorId;
126 writeDocbookString(t,text);
130 DocbookCodeGenerator::DocbookCodeGenerator(FTextStream &t) : m_lineNumber(-1), m_col(0),
131 m_insideCodeLine(FALSE), m_insideSpecialHL(FALSE)
133 m_prettyCode=Config_getBool(DOCBOOK_PROGRAMLISTING);
137 DocbookCodeGenerator::DocbookCodeGenerator() : m_lineNumber(-1), m_col(0),
138 m_insideCodeLine(FALSE), m_insideSpecialHL(FALSE), m_streamSet(FALSE)
140 m_prettyCode=Config_getBool(DOCBOOK_PROGRAMLISTING);
143 DocbookCodeGenerator::~DocbookCodeGenerator() {}
145 void DocbookCodeGenerator::codify(const char *text)
147 Docbook_DB(("(codify \"%s\")\n",text));
148 writeDocbookCodeString(m_t,text,m_col);
150 void DocbookCodeGenerator::writeCodeLink(const char *ref,const char *file,
151 const char *anchor,const char *name,
154 Docbook_DB(("(writeCodeLink)\n"));
155 writeDocbookLink(m_t,ref,file,anchor,name,tooltip);
158 void DocbookCodeGenerator::writeCodeLinkLine(const char *ref,const char *file,
159 const char *anchor,const char *name,
162 Docbook_DB(("(writeCodeLinkLine)\n"));
163 m_t << "<anchor xml:id=\"_" << stripExtensionGeneral(stripPath(file),".xml");
165 writeDocbookString(m_t,name);
169 void DocbookCodeGenerator::writeTooltip(const char *, const DocLinkInfo &, const char *,
170 const char *, const SourceLinkInfo &, const SourceLinkInfo &
173 Docbook_DB(("(writeToolTip)\n"));
175 void DocbookCodeGenerator::startCodeLine(bool)
177 Docbook_DB(("(startCodeLine)\n"));
178 m_insideCodeLine=TRUE;
181 void DocbookCodeGenerator::endCodeLine()
184 Docbook_DB(("(endCodeLine)\n"));
187 m_external.resize(0);
188 m_insideCodeLine=FALSE;
190 void DocbookCodeGenerator::startFontClass(const char *colorClass)
192 Docbook_DB(("(startFontClass)\n"));
193 m_t << "<emphasis role=\"" << colorClass << "\">";
194 m_insideSpecialHL=TRUE;
196 void DocbookCodeGenerator::endFontClass()
198 Docbook_DB(("(endFontClass)\n"));
199 m_t << "</emphasis>"; // non DocBook
200 m_insideSpecialHL=FALSE;
202 void DocbookCodeGenerator::writeCodeAnchor(const char *)
204 Docbook_DB(("(writeCodeAnchor)\n"));
206 void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
207 const char *anchor,int l)
209 Docbook_DB(("(writeLineNumber)\n"));
210 m_insideCodeLine = TRUE;
214 lineNumber.sprintf("%05d",l);
216 if (fileName && !m_sourceFileName.isEmpty())
218 writeCodeLinkLine(ref,m_sourceFileName,anchor,lineNumber,0);
219 writeCodeLink(ref,fileName,anchor,lineNumber,0);
233 void DocbookCodeGenerator::setCurrentDoc(Definition *,const char *,bool)
236 void DocbookCodeGenerator::addWord(const char *,bool)
239 void DocbookCodeGenerator::finish()
241 if (m_insideCodeLine) endCodeLine();
243 void DocbookCodeGenerator::startCodeFragment()
245 m_t << "<literallayout><computeroutput>" << endl;
247 void DocbookCodeGenerator::endCodeFragment()
249 m_t << "</computeroutput></literallayout>" << endl;
252 DocbookGenerator::DocbookGenerator() : OutputGenerator()
255 dir=Config_getString(DOCBOOK_OUTPUT);
256 //insideTabbing=FALSE;
257 //firstDescItem=TRUE;
258 //disableLinks=FALSE;
260 //templateMemberItem = FALSE;
261 m_prettyCode=Config_getBool(DOCBOOK_PROGRAMLISTING);
268 m_firstMember = FALSE;
269 for (int i = 0 ; i < sizeof(m_inListItem) / sizeof(*m_inListItem) ; i++) m_inListItem[i] = FALSE;
270 for (int i = 0 ; i < sizeof(m_inSimpleSect) / sizeof(*m_inSimpleSect) ; i++) m_inSimpleSect[i] = FALSE;
273 DocbookGenerator::~DocbookGenerator()
278 void DocbookGenerator::init()
280 QCString dir=Config_getString(DOCBOOK_OUTPUT);
282 if (!d.exists() && !d.mkdir(dir))
284 err("Could not create output directory %s\n",dir.data());
291 void DocbookGenerator::startFile(const char *name,const char *,const char *)
294 QCString fileName=name;
296 QCString fileType="section";
297 if (fileName == "refman")
302 else if (fileName == "index")
308 relPath = relativePathToRoot(fileName);
309 if (fileName.right(4)!=".xml") fileName+=".xml";
310 startPlainFile(fileName);
311 m_codeGen.setTextStream(t);
312 m_codeGen.setRelativePath(relPath);
313 m_codeGen.setSourceFileName(stripPath(fileName));
315 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
316 t << "<" << fileType << " xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
317 if (!pageName.isEmpty()) t << " xml:id=\"_" << stripPath(pageName) << "\"";
321 void DocbookGenerator::endFile()
324 if (m_inDetail) t << "</section>" << endl;
326 while (m_inLevel != -1)
328 t << "</section>" << endl;
331 if (m_inGroup) t << "</section>" << endl;
334 QCString fileType="section";
335 QCString fileName= m_codeGen.sourceFileName();
336 if (fileName == "index.xml")
340 else if (fileName == "mainpage.xml")
344 t << "</" << fileType << ">" << endl;
346 m_codeGen.setSourceFileName("");
349 void DocbookGenerator::startIndexSection(IndexSections is)
351 DB_GEN_C2("IndexSections " << is)
354 case isTitlePageStart:
356 QCString dbk_projectName = Config_getString(PROJECT_NAME);
357 t << " <info>" << endl;
358 t << " <title>" << convertToDocBook(dbk_projectName) << "</title>" << endl;
359 t << " </info>" << endl;
362 case isTitlePageAuthor:
365 t << "<chapter>" << endl;
372 //Directory Index}\n"
374 case isNamespaceIndex:
375 //Namespace Index}\n"
377 case isClassHierarchyIndex:
378 //Hierarchical Index}\n"
380 case isCompoundIndex:
381 //t << "{"; //Class Index}\n"
384 //Annotated File Index}\n"
387 //Annotated Page Index}\n"
389 case isModuleDocumentation:
393 case isDirDocumentation:
397 case isNamespaceDocumentation:
401 case isClassDocumentation:
405 case isFileDocumentation:
409 case isExampleDocumentation:
413 case isPageDocumentation:
415 case isPageDocumentation2:
422 void DocbookGenerator::endIndexSection(IndexSections is)
424 DB_GEN_C2("IndexSections " << is)
425 static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
428 case isTitlePageStart:
430 case isTitlePageAuthor:
433 t << "</title>" << endl;
434 t << " <xi:include href=\"mainpage.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
435 t << "</chapter>" << endl;
438 //t << "</chapter>" << endl;
441 //t << "<xi:include href=\"dirs.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
442 //t << "</chapter>" << endl;
444 case isNamespaceIndex:
445 //t << "<xi:include href=\"namespaces.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
446 //t << "</chapter>" << endl;
448 case isClassHierarchyIndex:
449 //t << "<xi:include href=\"hierarchy.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
450 //t << "</chapter>" << endl;
452 case isCompoundIndex:
453 //t << "</chapter>" << endl;
456 //t << "<xi:include href=\"files.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
457 //t << "</chapter>" << endl;
460 //t << "<xi:include href=\"pages.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>";
461 //t << "</chapter>" << endl;
463 case isModuleDocumentation:
465 t << "</title>" << endl;
466 GroupSDict::Iterator gli(*Doxygen::groupSDict);
469 for (gli.toFirst();(gd=gli.current()) && !found;++gli)
471 if (!gd->isReference())
473 t << " <xi:include href=\"" << gd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
477 for (;(gd=gli.current());++gli)
479 if (!gd->isReference())
481 t << " <xi:include href=\"" << gd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
487 case isDirDocumentation:
489 t << "</title>" << endl;
490 SDict<DirDef>::Iterator dli(*Doxygen::directories);
493 for (dli.toFirst();(dd=dli.current()) && !found;++dli)
495 if (dd->isLinkableInProject())
497 t << "< xi:include href=\"" << dd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
501 for (;(dd=dli.current());++dli)
503 if (dd->isLinkableInProject())
505 t << " <xi:include href=\"" << dd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
511 case isNamespaceDocumentation:
513 t << "</title>" << endl;
514 NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
517 for (nli.toFirst();(nd=nli.current()) && !found;++nli)
519 if (nd->isLinkableInProject())
521 t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
525 while ((nd=nli.current()))
527 if (nd->isLinkableInProject())
529 t << "<xi:include href=\"" << nd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
536 case isClassDocumentation:
538 t << "</title>" << endl;
539 ClassSDict::Iterator cli(*Doxygen::classSDict);
542 for (cli.toFirst();(cd=cli.current()) && !found;++cli)
544 if (cd->isLinkableInProject() &&
545 cd->templateMaster()==0 &&
546 !cd->isEmbeddedInOuterScope()
549 t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
553 for (;(cd=cli.current());++cli)
555 if (cd->isLinkableInProject() &&
556 cd->templateMaster()==0 &&
557 !cd->isEmbeddedInOuterScope()
560 t << " <xi:include href=\"" << cd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
566 case isFileDocumentation:
568 t << "</title>" << endl;
570 FileNameListIterator fnli(*Doxygen::inputNameList);
572 for (fnli.toFirst();(fn=fnli.current());++fnli)
574 FileNameIterator fni(*fn);
576 for (;(fd=fni.current());++fni)
578 if (fd->isLinkableInProject())
582 t << " <xi:include href=\"" << fd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
583 if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
585 t << " <xi:include href=\"" << fd->getSourceFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
591 t << " <xi:include href=\"" << fd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
592 if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
594 t << " <xi:include href=\"" << fd->getSourceFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
603 case isExampleDocumentation:
605 t << "</title>" << endl;
606 PageSDict::Iterator pdi(*Doxygen::exampleSDict);
607 PageDef *pd=pdi.toFirst();
610 t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
612 for (++pdi;(pd=pdi.current());++pdi)
614 t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
619 case isPageDocumentation:
621 case isPageDocumentation2:
624 t << "<index/>" << endl;
628 void DocbookGenerator::writePageLink(const char *name, bool /*first*/)
631 PageSDict::Iterator pdi(*Doxygen::pageSDict);
632 PageDef *pd = pdi.toFirst();
633 for (pd = pdi.toFirst();(pd=pdi.current());++pdi)
635 if (!pd->getGroupDef() && !pd->isReference() && pd->name() == stripPath(name))
638 if (!pd->title().isEmpty())
640 t << " <title>" << convertToDocBook(pd->title()) << "</title>" << endl;
644 t << " <title>" << convertToDocBook(pd->name()) << "</title>" << endl;
646 t << " <xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
651 void DocbookGenerator::writeDoc(DocNode *n,Definition *ctx,MemberDef *)
654 DocbookDocVisitor *visitor =
655 new DocbookDocVisitor(t,*this);
660 void DocbookGenerator::startParagraph(const char *)
663 t << "<para>" << endl;
666 void DocbookGenerator::endParagraph()
669 t << "</para>" << endl;
671 void DocbookGenerator::writeString(const char *text)
676 void DocbookGenerator::startMemberHeader(const char *name,int)
679 t << "<simplesect>" << endl;
680 m_inSimpleSect[m_levelListItem] = TRUE;
684 void DocbookGenerator::endMemberHeader()
687 t << " </title>" << endl;
689 void DocbookGenerator::docify(const char *str)
692 t << convertToDocBook(str);
694 void DocbookGenerator::writeObjectLink(const char *ref, const char *f,
695 const char *anchor, const char *text)
699 if (f) t << "<link linkend=\"_" << stripPath(f) << "_1" << anchor << "\">";
700 else t << "<link linkend=\"_" << anchor << "\">";
702 t << "<link linkend=\"_" << stripPath(f) << "\">";
706 void DocbookGenerator::startMemberList()
709 t << " <itemizedlist>" << endl;
712 void DocbookGenerator::endMemberList()
715 if (m_inListItem[m_levelListItem]) t << "</listitem>" << endl;
716 m_inListItem[m_levelListItem] = FALSE;
717 t << " </itemizedlist>" << endl;
718 m_levelListItem = (m_levelListItem> 0 ? m_levelListItem - 1 : 0);
719 if (m_inSimpleSect[m_levelListItem]) t << "</simplesect>" << endl;
720 m_inSimpleSect[m_levelListItem] = FALSE;
722 void DocbookGenerator::startMemberItem(const char *,int,const char *)
725 if (m_inListItem[m_levelListItem]) t << "</listitem>" << endl;
726 t << " <listitem><para>";
727 m_inListItem[m_levelListItem] = TRUE;
729 void DocbookGenerator::endMemberItem()
732 t << "</para>" << endl;
734 void DocbookGenerator::startBold(void)
737 t << "<emphasis role=\"strong\">";
739 void DocbookGenerator::endBold(void)
744 void DocbookGenerator::startGroupHeader(int extraIndentLevel)
746 DB_GEN_C2("m_inLevel " << m_inLevel)
747 DB_GEN_C2("extraIndentLevel " << extraIndentLevel)
748 m_firstMember = TRUE;
749 if (m_inSimpleSect[m_levelListItem]) t << "</simplesect>" << endl;
750 m_inSimpleSect[m_levelListItem] = FALSE;
751 if (m_inLevel != -1) m_inGroup = TRUE;
752 if (m_inLevel == extraIndentLevel) t << "</section>" << endl;
753 m_inLevel = extraIndentLevel;
754 t << "<section>" << endl;
757 void DocbookGenerator::writeRuler(void)
759 DB_GEN_C2("m_inLevel " << m_inLevel)
760 DB_GEN_C2("m_inGroup " << m_inGroup)
761 if (m_inGroup) t << "</section>" << endl;
765 void DocbookGenerator::endGroupHeader(int)
768 t << "</title>" << endl;
771 void DocbookGenerator::startParameterList(bool openBracket)
774 if (openBracket) t << "(";
776 void DocbookGenerator::endParameterList()
780 void DocbookGenerator::writeNonBreakableSpace(int n)
783 for (int i=0;i<n;i++) t << " ";
785 void DocbookGenerator::lineBreak(const char *)
790 void DocbookGenerator::startTypewriter()
793 if (!m_denseText) t << "<computeroutput>";
795 void DocbookGenerator::endTypewriter()
798 if (!m_denseText) t << "</computeroutput>" << endl;
800 void DocbookGenerator::startTextBlock(bool dense)
806 t << "<programlisting>";
809 void DocbookGenerator::endTextBlock(bool dense)
815 t << "</programlisting>";
818 void DocbookGenerator::startMemberDoc(const char *clname, const char *memname, const char *anchor, const char *title,
819 int memCount, int memTotal, bool showInline)
821 DB_GEN_C2("m_inLevel " << m_inLevel)
822 t << " <section>" << endl;
823 t << " <title>" << convertToDocBook(title);
826 t << "<computeroutput>[" << memCount << "/" << memTotal << "]</computeroutput>";
828 t << "</title>" << endl;
829 if (memname && memname[0]!='@')
831 addIndexTerm(t,memname,clname);
832 addIndexTerm(t,clname,memname);
835 void DocbookGenerator::endMemberDoc(bool)
838 t << "</computeroutput></para>";
840 void DocbookGenerator::startTitleHead(const char *)
845 void DocbookGenerator::endTitleHead(const char *fileName,const char *name)
848 t << "</title>" << endl;
849 if (name) addIndexTerm(t, name);
851 void DocbookGenerator::startDoxyAnchor(const char *fName,const char *manName,
852 const char *anchor,const char *name,
856 if (!m_inListItem[m_levelListItem] && !m_descTable)
858 if (!m_firstMember) t << " </section>";
859 m_firstMember = FALSE;
863 t << "<anchor xml:id=\"_" << stripPath(fName) << "_1" << anchor << "\"/>";
866 void DocbookGenerator::endDoxyAnchor(const char *fileName,const char *anchor)
870 void DocbookGenerator::startMemberDocName(bool)
873 t << "<para><computeroutput>";
875 void DocbookGenerator::endMemberDocName()
879 void DocbookGenerator::startMemberGroupHeader(bool hasHeader)
882 t << "<simplesect><title>";
884 void DocbookGenerator::endMemberGroupHeader()
887 t << "</title>" << endl;
889 void DocbookGenerator::startMemberGroup()
893 void DocbookGenerator::endMemberGroup(bool)
896 t << "</simplesect>" << endl;
898 void DocbookGenerator::startClassDiagram()
904 void DocbookGenerator::endClassDiagram(const ClassDiagram &d, const char *fileName,const char *)
907 t << " <informalfigure>" << endl;
908 t << " <mediaobject>" << endl;
909 t << " <imageobject>" << endl;
910 t << " <imagedata width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\""
911 << relPath << fileName << ".png\">" << "</imagedata>" << endl;
912 t << " </imageobject>" << endl;
913 d.writeImage(t,dir,relPath,fileName,FALSE);
914 t << " </mediaobject>" << endl;
915 t << " </informalfigure>" << endl;
916 t << "</para>" << endl;
918 void DocbookGenerator::startLabels()
923 void DocbookGenerator::writeLabel(const char *l,bool isLast)
926 t << "<computeroutput>[" << l << "]</computeroutput>";
927 if (!isLast) t << ", ";
930 void DocbookGenerator::endLabels()
934 void DocbookGenerator::startExamples()
937 t << "<simplesect><title>";
938 docify(theTranslator->trExamples());
942 void DocbookGenerator::endExamples()
945 t << "</simplesect>" << endl;
947 void DocbookGenerator::startSubsubsection(void)
950 t << "<simplesect><title>";
952 void DocbookGenerator::endSubsubsection(void)
955 t << "</title></simplesect>" << endl;
957 void DocbookGenerator::writeChar(char c)
965 void DocbookGenerator::startMemberDocPrefixItem()
968 t << "<computeroutput>";
970 void DocbookGenerator::endMemberDocPrefixItem()
973 t << "</computeroutput>";
975 void DocbookGenerator::exceptionEntry(const char* prefix,bool closeBracket)
979 t << " " << prefix << "(";
980 else if (closeBracket)
984 void DocbookGenerator::startParameterName(bool)
989 void DocbookGenerator::endParameterName(bool last,bool /*emptyList*/,bool closeBracket)
994 if (closeBracket) t << ")";
997 void DocbookGenerator::startCodeFragment()
1000 t << "<programlisting>";
1002 void DocbookGenerator::endCodeFragment()
1005 t << "</programlisting>";
1007 void DocbookGenerator::startMemberTemplateParams()
1012 void DocbookGenerator::endMemberTemplateParams(const char *,const char *)
1018 void DocbookGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
1021 t << " <section xml:id=\"_" << stripPath(lab) << "\">";
1024 void DocbookGenerator::endSection(const char *lab,SectionInfo::SectionType)
1030 void DocbookGenerator::addIndexItem(const char *prim,const char *sec)
1033 addIndexTerm(t, prim, sec);
1036 void DocbookGenerator::startDescTable(const char *title)
1040 t << "<informaltable frame=\"all\">" << endl;
1041 if (title)t << "<title>" << convertToDocBook(title) << "</title>" << endl;
1042 t << " <tgroup cols=\"" << ncols << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
1043 for (int i = 0; i < ncols; i++)
1045 t << " <colspec colname='c" << i+1 << "'/>\n";
1051 void DocbookGenerator::endDescTable()
1054 t << " </tbody>" << endl;
1055 t << " </tgroup>" << endl;
1056 t << "</informaltable>" << endl;
1057 m_descTable = FALSE;
1060 void DocbookGenerator::startDescTableRow()
1067 void DocbookGenerator::endDescTableRow()
1073 void DocbookGenerator::startDescTableTitle()
1078 void DocbookGenerator::endDescTableTitle()
1083 void DocbookGenerator::startDescTableData()
1086 t << "</entry><entry>";
1089 void DocbookGenerator::endDescTableData()
1094 void DocbookGenerator::startGroupCollaboration()
1098 void DocbookGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
1101 g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,FALSE);
1103 void DocbookGenerator::startDotGraph()
1107 void DocbookGenerator::endDotGraph(const DotClassGraph &g)
1110 g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,TRUE,FALSE);
1112 void DocbookGenerator::startInclDepGraph()
1116 void DocbookGenerator::endInclDepGraph(const DotInclDepGraph &g)
1119 QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), fileName,relPath,FALSE);
1121 void DocbookGenerator::startCallGraph()
1125 void DocbookGenerator::endCallGraph(const DotCallGraph &g)
1128 QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), fileName,relPath,FALSE);
1130 void DocbookGenerator::startDirDepGraph()
1134 void DocbookGenerator::endDirDepGraph(const DotDirDeps &g)
1137 QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT), fileName,relPath,FALSE);
1139 void DocbookGenerator::startMemberDocList()
1143 void DocbookGenerator::endMemberDocList()
1148 void DocbookGenerator::startConstraintList(const char *header)
1151 t << "<simplesect><title>";
1153 t << "</title>" << endl;
1155 void DocbookGenerator::startConstraintParam()
1158 t << "<para><emphasis role=\"strong\">";
1160 void DocbookGenerator::endConstraintParam()
1164 void DocbookGenerator::startConstraintType()
1169 void DocbookGenerator::endConstraintType()
1172 t << "</emphasis></para>" << endl;
1174 void DocbookGenerator::startConstraintDocs()
1178 void DocbookGenerator::endConstraintDocs()
1182 void DocbookGenerator::endConstraintList()
1185 t << "</simplesect>" << endl;