浏览该文件的文档.
55 #define Docbook_DB(x) do {} while(0)
62 #define DB_GEN_C DB_GEN_C1(m_t)
63 #define DB_GEN_C1(x) x << "<!-- DB_GEN_C " << __LINE__ << " -->\n";
64 #define DB_GEN_C2(y) DB_GEN_C2a(m_t,y)
65 #define DB_GEN_C2a(x,y) x << "<!-- DB_GEN_C " << __LINE__ << " " << y << " -->\n";
70 #define DB_GEN_C2a(x,y)
83 const char *s = str.
data();
92 int spacesToNextTabStop = tabSize - (col%tabSize);
93 col+=spacesToNextTabStop;
94 while (spacesToNextTabStop--) t <<
" ";
97 case ' ': t <<
" "; col++;
break;
98 case '<': t <<
"<"; col++;
break;
99 case '>': t <<
">"; col++;
break;
100 case '&': t <<
"&"; col++;
break;
101 case '\'': t <<
"'"; col++;
break;
102 case '"': t <<
"""; col++;
break;
106 static const char *
hex=
"0123456789ABCDEF";
109 t <<
"$" <<
hex[uc>>4] <<
hex[uc&0xF] <<
";";
124 t <<
"<indexterm><primary>";
133 t <<
"</indexterm>\n";
138 t <<
"<link linkend=\"_" <<
stripPath(compoundId);
139 if (!anchorId.
isEmpty()) t <<
"_1" << anchorId;
171 const QCString &,
bool writeLineAnchor)
174 if (!writeLineAnchor)
return;
209 m_t <<
"<emphasis role=\"" << colorClass <<
"\">";
216 m_t <<
"</emphasis>";
226 const QCString &anchor,
int l,
bool writeLineAnchor)
272 m_t <<
"<programlisting linenumbering=\"unnumbered\">";
281 m_t <<
"</programlisting>";
303 return std::make_unique<DocbookGenerator>(*
this);
353 m_t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";;
354 m_t <<
"<" << fileType <<
" xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
373 else if (
fileName ==
"mainpage.xml")
377 m_t <<
"</" << fileType <<
">\n";
398 m_t <<
"<chapter>\n";
426 m_t <<
"<chapter>\n";
430 m_t <<
"<chapter>\n";
434 m_t <<
"<chapter>\n";
438 m_t <<
"<chapter>\n";
442 m_t <<
"<chapter>\n";
446 m_t <<
"<chapter>\n";
450 m_t <<
"<chapter>\n";
473 m_t <<
" <xi:include href=\"mainpage.xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
474 m_t <<
"</chapter>\n";
511 if (!gd->isReference())
513 m_t <<
" <xi:include href=\"" << gd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
517 m_t <<
"</chapter>\n";
524 if (dd->isLinkableInProject())
526 m_t <<
"< xi:include href=\"" << dd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
530 m_t <<
"</chapter>\n";
537 if (nd->isLinkableInProject() && !nd->isAlias())
539 m_t <<
"<xi:include href=\"" << nd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
543 m_t <<
"</chapter>\n";
550 if (cd->isLinkableInProject() && !cd->isAlias())
552 m_t <<
"<xi:include href=\"" << cd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
556 m_t <<
"</chapter>\n";
563 if (cd->isLinkableInProject() &&
564 cd->templateMaster()==0 &&
565 !cd->isEmbeddedInOuterScope() &&
569 m_t <<
" <xi:include href=\"" << cd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
573 m_t <<
"</chapter>\n";
580 for (
const auto &fd : *fn)
582 if (fd->isLinkableInProject())
584 m_t <<
" <xi:include href=\"" << fd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
586 if (fd->generateSourceFile())
588 m_t <<
" <xi:include href=\"" << fd->getSourceFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
593 m_t <<
"</chapter>\n";
600 m_t <<
" <xi:include href=\"" << pd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
603 m_t <<
"</chapter>\n";
619 if (!pd->getGroupDef() && !pd->isReference() && pd->name() ==
stripPath(name))
621 m_t <<
"<chapter>\n";
630 m_t <<
" <xi:include href=\"" << pd->getOutputFileBase() <<
".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>\n";
631 m_t <<
"</chapter>\n";
664 m_t <<
"<simplesect>\n";
672 m_t <<
" </title>\n";
686 else m_t <<
"<link linkend=\"_" << anchor <<
"\">";
698 m_t <<
" <itemizedlist>\n";
706 m_t <<
" </itemizedlist>\n";
715 m_t <<
" <listitem><para>";
726 m_t <<
"<emphasis role=\"strong\">";
731 m_t <<
"</emphasis>";
736 DB_GEN_C2(
"extraIndentLevel " << extraIndentLevel)
763 if (openBracket)
m_t <<
"(";
772 for (
int i=0;i<n;i++)
m_t <<
" ";
795 m_t <<
"<programlisting linenumbering=\"unnumbered\">";
804 m_t <<
"</programlisting>";
808 int memCount,
int memTotal,
bool)
815 m_t <<
"<computeroutput>[" << memCount <<
"/" << memTotal <<
"]</computeroutput>";
818 if (!memname.
isEmpty() && memname[0]!=
'@')
827 m_t <<
"</computeroutput></para>";
852 m_t <<
"<anchor xml:id=\"_" <<
stripPath(fName) <<
"_1" << anchor <<
"\"/>";
862 m_t <<
"<para><computeroutput>";
871 m_t <<
"<simplesect><title>";
885 m_t <<
"</simplesect>\n";
896 m_t <<
" <informalfigure>\n";
897 m_t <<
" <mediaobject>\n";
898 m_t <<
" <imageobject>\n";
899 m_t <<
" <imagedata width=\"50%\" align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\""
901 m_t <<
" </imageobject>\n";
903 m_t <<
" </mediaobject>\n";
904 m_t <<
" </informalfigure>\n";
915 m_t <<
"<computeroutput>[" << l <<
"]</computeroutput>";
916 if (!isLast)
m_t <<
", ";
926 m_t <<
"<simplesect><title>";
934 m_t <<
"</simplesect>\n";
939 m_t <<
"<simplesect><title>";
944 m_t <<
"</title></simplesect>\n";
957 m_t <<
"<computeroutput>";
962 m_t <<
"</computeroutput>";
969 m_t <<
" " << prefix <<
"(";
971 else if (closeBracket)
987 if (closeBracket)
m_t <<
")";
1034 m_t <<
"<table frame=\"all\">\n";
1036 m_t <<
" <tgroup cols=\"" << ncols <<
"\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
1037 for (
int i = 0; i < ncols; i++)
1039 m_t <<
" <colspec colname='c" << i+1 <<
"'/>\n";
1048 m_t <<
" </tbody>\n";
1049 m_t <<
" </tgroup>\n";
1050 m_t <<
"</table>\n";
1057 m_t <<
"<row><entry>";
1087 m_t <<
"</entry></row>\n";
1094 m_t <<
"<informaltable frame=\"all\">\n";
1096 m_t <<
" <tgroup cols=\"" << ncols <<
"\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
1097 for (
int i = 0; i < ncols; i++)
1099 m_t <<
" <colspec colname='c" << i+1 <<
"'/>\n";
1108 m_t <<
" </tbody>\n";
1109 m_t <<
" </tgroup>\n";
1110 m_t <<
"</informaltable>\n";
1140 m_t <<
"</entry><entry>";
1205 m_t <<
"<simplesect><title>";
1207 m_t <<
"</title>\n";
1212 m_t <<
"<para><emphasis role=\"strong\">";
1226 m_t <<
"</emphasis></para>\n";
1239 m_t <<
"</simplesect>\n";
1252 m_t <<
"</section>\n";
virtual QCString getDefFileExtension() const =0
QCString fileName() const
void startParameterList(bool)
void startTitleHead(const QCString &)
void startMemberDocList()
virtual QCString trCompoundMembers()=0
void openSection(const QCString &attr=QCString())
void startMemberTemplateParams()
DocbookCodeGenerator m_codeGen
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
virtual ~DocbookCodeGenerator()
Representation of an directory dependency graph
void endDotGraph(DotClassGraph &g)
void startCodeFragment(const QCString &style)
void endParameterName(bool, bool, bool)
The common base class of all entity definitions found in the sources.
QCString relativePathToRoot(const QCString &name)
void startMemberDocSimple(bool)
Class representing a directory in the file system
void startSection(const QCString &, const QCString &, SectionType)
void endMemberDocSimple(bool)
void startDescTableData()
void endConstraintParam()
uint length() const
Returns the length of the string, not counting the 0-terminator.
void endIndexSection(IndexSections)
void writeImage(TextStream &t, const QCString &path, const QCString &relPath, const QCString &file, bool generateMap=true) const
static ConceptLinkedMap * conceptLinkedMap
void startMemberItem(const QCString &, int, const QCString &)
void writeLineNumber(const QCString &extRef, const QCString &compId, const QCString &anchorId, int l, bool writeLineAnchor)
void writeDocbookCodeString(TextStream &t, const QCString &str, int &col)
void addWord(const QCString &, bool)
bool isEmpty() const
Returns TRUE iff the string is empty
void startMemberDoc(const QCString &, const QCString &, const QCString &, const QCString &, int, int, bool)
Abstract node interface with type information.
static PageLinkedMap * pageLinkedMap
static void addIndexTerm(TextStream &t, QCString prim, QCString sec="")
void endInlineMemberName()
void startDescTableTitle()
void endCallGraph(DotCallGraph &g)
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
void writeCodeLinkLine(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip, bool)
DocbookCodeGenerator(TextStream &t)
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1)
void startParameterName(bool)
void startMemberGroupHeader(bool)
void writeDocbookString(TextStream &t, const QCString &s)
virtual QCString trEnumerationValues()=0
void endInlineMemberType()
Text streaming class that buffers data.
static DirLinkedMap * dirLinkedMap
virtual std::unique_ptr< OutputGenerator > clone() const
void setCurrentDoc(const Definition *, const QCString &, bool)
QCString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE)
SectionType
enum representing the various types of sections and entities that can be referred to.
void startGroupHeader(int)
Concrete visitor implementation for Docbook output.
void endMemberGroup(bool)
void startDoxyAnchor(const QCString &fName, const QCString &manName, const QCString &anchor, const QCString &name, const QCString &args)
void startConstraintParam()
void endDoxyAnchor(const QCString &fileName, const QCString &anchor)
static FileNameLinkedMap * inputNameLinkedMap
virtual QCString trISOLang()=0
void endClassDiagram(const ClassDiagram &, const QCString &, const QCString &)
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
A model of a class/file/namespace member symbol.
@ isNamespaceDocumentation
void lineBreak(const QCString &)
#define Config_getInt(name)
void startFile(const QCString &name, const QCString &manName, const QCString &title, int id)
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip)
void endInlineMemberDoc()
void startFontClass(const QCString &colorClass)
void startInlineMemberName()
Representation of an call graph
Translator * theTranslator
static GroupLinkedMap * groupLinkedMap
void startGroupCollaboration()
void endDirDepGraph(DotDirDeps &g)
QCString sourceFileName()
virtual ~DocbookGenerator()
QCString stripPath(const QCString &s)
void writeDoc(DocNode *, const Definition *ctx, const MemberDef *md, int id)
void writeDocbookLink(TextStream &t, const QCString &, const QCString &compoundId, const QCString &anchorId, const QCString &text, const QCString &)
void startMemberHeader(const QCString &anchor, int typ)
void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &)
void setRelativePath(const QCString &path)
void writeNonBreakableSpace(int)
void writeCodeAnchor(const QCString &)
void startMemberDocPrefixItem()
void codify(const QCString &text)
void startIndexSection(IndexSections)
Class representing a built-in class diagram.
Representation of a class inheritance or dependency graph
void startConstraintType()
void writeObjectLink(const QCString &, const QCString &, const QCString &, const QCString &)
void clearSubDirs(const Dir &d)
QCString m_sourceFileName
void writeString(const QCString &)
void endMemberDocPrefixItem()
Abstract output generator.
void startDescTable(const QCString &)
void startMemberDocName(bool)
void endTitleHead(const QCString &fileName, const QCString &name)
#define Config_getBool(name)
void startConstraintDocs()
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
void endInclDepGraph(DotInclDepGraph &g)
void startParagraph(const QCString &)
void startConstraintList(const QCString &)
void startSubsubsection()
void term(const char *fmt,...)
void endSection(const QCString &, SectionType)
const char * qPrint(const char *s)
#define Config_getString(name)
void startInlineMemberDoc()
void setSourceFileName(const QCString &sourceFileName)
QCString convertToDocBook(const QCString &s)
Representation of a group collaboration graph
static NamespaceLinkedMap * namespaceLinkedMap
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
void writePageLink(const QCString &, bool)
void startTextBlock(bool)
void startInlineMemberType()
Representation of an include dependency graph
virtual void accept(DocVisitor *v)=0
OutputGenerator & operator=(const OutputGenerator &o)
void endCodeFragment(const QCString &style)
void addIndexItem(const QCString &, const QCString &)
virtual QCString trExamples()=0
void docify(const QCString &text)
static ClassLinkedMap * classLinkedMap
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
A bunch of utility functions.
void createSubDirs(const Dir &d)
void endMemberGroupHeader()
void exceptionEntry(const QCString &, bool)
QCString right(size_t len) const
void endGroupCollaboration(DotGroupCollaboration &g)
void startPlainFile(const QCString &name)
bool resize(size_t newlen)
Resizes the string to hold newlen characters (this value should also count the 0-terminator).
DocbookGenerator & operator=(const DocbookGenerator &o)
QCString & sprintf(const char *format,...)
void writeLabel(const QCString &, bool)
void endMemberTemplateParams(const QCString &, const QCString &)
static PageLinkedMap * exampleLinkedMap
This is an alternative implementation of QCString.