浏览该文件的文档.
44 {
"doxysection",
"doxysubsection",
"doxysubsubsection",
"doxyparagraph",
"doxysubparagraph" };
50 if (compactLatex) l++;
59 t <<
"\n\\begin{DoxyInlineImage}\n";
65 t <<
"\n\\begin{DoxyImage}\n";
69 t <<
"\n\\begin{DoxyImageNoCaption}\n"
74 t <<
"\\includegraphics";
81 t <<
"width=" << width;
89 t <<
"height=" << height;
96 t <<
"[height=\\baselineskip,keepaspectratio=true]";
100 t <<
"[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]";
108 t <<
"{" << name <<
"}";
114 t <<
"\n\\doxyfigcaption{";
129 t <<
"\n\\end{DoxyInlineImage}\n";
136 t <<
"\\end{DoxyImage}\n";
140 t <<
"\\end{DoxyImageNoCaption}\n";
148 for (
const auto &n : children) n->accept(parent);
155 char str[2]; str[1]=0;
163 case '!':
m_t <<
"\"!";
break;
164 case '"':
m_t <<
"\"\"";
break;
165 case '@':
m_t <<
"\"@";
break;
166 case '|':
m_t <<
"\\texttt{\"|}";
break;
167 case '[':
m_t <<
"[";
break;
168 case ']':
m_t <<
"]";
break;
169 case '{':
m_t <<
"\\lcurly{}";
break;
170 case '}':
m_t <<
"\\rcurly{}";
break;
171 default: str[0]=c;
filter(str);
break;
180 const QCString &langExt,
bool insideTabbing)
183 m_insideTabbing(insideTabbing), m_langExt(langExt)
229 m_t <<
"\\texorpdfstring{$<$}{<}";
240 m_t <<
"\\texorpdfstring{$>$}{>}";
265 m_t <<
"\\doxygenemoji{";
267 m_t <<
"}{" << imageName <<
"}";
284 m_t <<
"{\\texttt{ ";
292 m_t <<
"~\\newline\n";
299 m_t <<
"\\DoxyHorRuler{1}\n";
301 m_t <<
"\\DoxyHorRuler{0}\n";
310 if (s->
enable())
m_t <<
"{\\bfseries{";
else m_t <<
"}}";
325 if (s->
enable())
m_t <<
"{\\ttfamily ";
else m_t <<
"}";
328 if (s->
enable())
m_t <<
"\\textsubscript{";
else m_t <<
"}";
331 if (s->
enable())
m_t <<
"\\textsuperscript{";
else m_t <<
"}";
334 if (s->
enable())
m_t <<
"\\begin{center}";
else m_t <<
"\\end{center} ";
337 if (s->
enable())
m_t <<
"\n\\footnotesize ";
else m_t <<
"\n\\normalsize ";
342 m_t <<
"\n\\begin{DoxyPre}";
348 m_t <<
"\\end{DoxyPre}\n";
376 m_t <<
"\\begin{DoxyVerb}";
378 m_t <<
"\\end{DoxyVerb}\n";
392 static int dotindex = 1;
400 std::ofstream file(fileName.
str(),std::ofstream::out | std::ofstream::binary);
403 err(
"Could not open file %s for writing\n",
qPrint(fileName));
420 static int mscindex = 1;
427 std::string fileName = baseName.
str()+
".msc";
428 std::ofstream file(fileName,std::ofstream::out | std::ofstream::binary);
431 err(
"Could not open file %s for writing\n",fileName.c_str());
527 m_t <<
"\n\\begin{DoxyVerbInclude}\n";
529 m_t <<
"\\end{DoxyVerbInclude}\n";
568 err(
"Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
569 "Please create a bug report\n",__FILE__);
628 const char *p = s.
data();
636 case '\'':
m_t <<
"\\textnormal{\\textquotesingle}";
break;
637 default:
m_t << c;
break;
665 anchor = anchor.
mid(anchorPrefix.
length());
666 m_t <<
"\\cite{" << anchor <<
"}";
670 m_t <<
"{\\bfseries [";
686 m_t <<
"\n\\begin{DoxyEnumerate}";
692 m_t <<
"\n\\begin{DoxyItemize}";
702 m_t <<
"\n\\end{DoxyEnumerate}";
706 m_t <<
"\n\\end{DoxyItemize}";
752 m_t <<
"\\begin{DoxySeeAlso}{";
756 m_t <<
"\\begin{DoxyReturn}{";
760 m_t <<
"\\begin{DoxyAuthor}{";
764 m_t <<
"\\begin{DoxyAuthor}{";
768 m_t <<
"\\begin{DoxyVersion}{";
772 m_t <<
"\\begin{DoxySince}{";
776 m_t <<
"\\begin{DoxyDate}{";
780 m_t <<
"\\begin{DoxyNote}{";
784 m_t <<
"\\begin{DoxyWarning}{";
788 m_t <<
"\\begin{DoxyPrecond}{";
792 m_t <<
"\\begin{DoxyPostcond}{";
796 m_t <<
"\\begin{DoxyCopyright}{";
800 m_t <<
"\\begin{DoxyInvariant}{";
804 m_t <<
"\\begin{DoxyRemark}{";
808 m_t <<
"\\begin{DoxyAttention}{";
812 m_t <<
"\\begin{DoxyParagraph}{";
815 m_t <<
"\\begin{DoxyParagraph}{";
838 m_t <<
"\n\\end{DoxySeeAlso}\n";
841 m_t <<
"\n\\end{DoxyReturn}\n";
844 m_t <<
"\n\\end{DoxyAuthor}\n";
847 m_t <<
"\n\\end{DoxyAuthor}\n";
850 m_t <<
"\n\\end{DoxyVersion}\n";
853 m_t <<
"\n\\end{DoxySince}\n";
856 m_t <<
"\n\\end{DoxyDate}\n";
859 m_t <<
"\n\\end{DoxyNote}\n";
862 m_t <<
"\n\\end{DoxyWarning}\n";
865 m_t <<
"\n\\end{DoxyPrecond}\n";
868 m_t <<
"\n\\end{DoxyPostcond}\n";
871 m_t <<
"\n\\end{DoxyCopyright}\n";
874 m_t <<
"\n\\end{DoxyInvariant}\n";
877 m_t <<
"\n\\end{DoxyRemark}\n";
880 m_t <<
"\n\\end{DoxyAttention}\n";
883 m_t <<
"\n\\end{DoxyParagraph}\n";
886 m_t <<
"\n\\end{DoxyParagraph}\n";
908 m_t <<
"\\begin{DoxyItemize}\n";
915 m_t <<
"\\end{DoxyItemize}\n";
954 m_t <<
"\n\\begin{DoxyEnumerate}";
955 for (
const auto &opt : s->
attribs())
957 if (opt.name==
"type")
961 m_t << (first ?
"[":
",");
962 m_t <<
"label=\\arabic*";
965 else if (opt.value==
"a")
967 m_t << (first ?
"[":
",");
968 m_t <<
"label=\\enumalphalphcnt*";
971 else if (opt.value==
"A")
973 m_t << (first ?
"[":
",");
974 m_t <<
"label=\\enumAlphAlphcnt*";
977 else if (opt.value==
"i")
979 m_t << (first ?
"[":
",");
980 m_t <<
"label=\\roman*";
983 else if (opt.value==
"I")
985 m_t << (first ?
"[":
",");
986 m_t <<
"label=\\Roman*";
990 else if (opt.name==
"start")
992 m_t << (first ?
"[":
",");
994 int val = opt.value.toInt(&ok);
995 if (ok)
m_t <<
"start=" << val;
999 if (!first)
m_t <<
"]\n";
1002 m_t <<
"\n\\begin{DoxyItemize}";
1010 m_t <<
"\n\\end{DoxyEnumerate}";
1012 m_t <<
"\n\\end{DoxyItemize}";
1020 for (
const auto &opt : l->
attribs())
1022 if (opt.name==
"value")
1025 int val = opt.value.toInt(&ok);
1060 auto it = std::find_if(attrs.begin(),attrs.end(),
1061 [](
const auto &att) { return att.name==
"class"; });
1062 if (it!=attrs.end() && it->value ==
"reflist")
return true;
1070 bool isNested=
false;
1076 while (n && !isNested)
1092 m_t <<
"\n\\begin{DoxyRefList}";
1097 m_t <<
"\n\\begin{DoxyDescription}";
1106 m_t <<
"\n\\end{DoxyRefList}";
1110 m_t <<
"\n\\end{DoxyDescription}";
1140 bool isNested=
FALSE;
1141 while (n && !isNested)
1153 t <<
"{\\begin{tabularx}{\\linewidth}{|*{" << cols <<
"}{>{\\raggedright\\arraybackslash}X|}}";
1157 t <<
"\\tabulinesep=1mm\n\\begin{longtabu}spread 0pt [c]{*{" << cols <<
"}{|X[-1]}|}\n";
1166 t <<
"\\end{tabularx}}\n";
1170 t <<
"\\end{longtabu}\n";
1196 m_t <<
"\\caption{";
1251 for (
const auto &span :
rowSpans())
1255 if (span.rowSpan>0 && span.column==c &&
1256 row->
rowIndex()>span.cell->rowIndex()
1262 m_t <<
"\\multicolumn{" << span.colSpan <<
"}{";
1267 m_t <<
"\\multicolumn{1}{c|}{}";
1279 if (span.rowSpan>0) span.rowSpan--;
1280 if (span.rowSpan<=0)
1284 else if (span.column>col)
1286 m_t <<
"\\cline{" << col <<
"-" << (span.column-1) <<
"}";
1287 col = span.column+span.colSpan;
1291 col = span.column+span.colSpan;
1297 m_t <<
"\\cline{" << col <<
"-" <<
numCols() <<
"}";
1307 m_t <<
"\\endfirsthead\n";
1309 m_t <<
"\\endfoot\n";
1314 m_t <<
"\\endhead\n";
1332 for (
const auto &span :
rowSpans())
1336 if (row && span.colSpan>1)
1338 m_t <<
"\\multicolumn{" << span.colSpan <<
"}{";
1343 m_t <<
"l|}{" << (c->
isHeading()?
"\\columncolor{\\tableheadbgcolor}" :
"") <<
"}";
1359 m_t <<
"\\multicolumn{" << cs <<
"}{";
1382 m_t <<
"\\multirow";
1400 m_t <<
"{" << rs <<
"}{*}{";
1404 m_t <<
"\\PBS\\centering ";
1408 m_t <<
"\\PBS\\raggedleft ";
1412 m_t <<
"\\cellcolor{\\tableheadbgcolor}\\textbf{ ";
1463 m_t <<
"{\\texttt{ ";
1489 if (gfxName.
right(4)==
".eps" || gfxName.
right(4)==
".pdf")
1594 m_t <<
"\\item \\contentsline{section}{";
1629 m_t <<
"\\footnotesize\n";
1630 m_t <<
"\\begin{multicols}{2}\n";
1631 m_t <<
"\\begin{DoxyCompactList}\n";
1639 m_t <<
"\\end{DoxyCompactList}\n";
1640 m_t <<
"\\end{multicols}\n";
1641 m_t <<
"\\normalsize\n";
1653 m_t <<
"\n\\begin{DoxyParams}";
1654 if (hasInOutSpecs && hasTypeSpecs)
m_t <<
"[2]";
1655 else if (hasInOutSpecs || hasTypeSpecs)
m_t <<
"[1]";
1660 m_t <<
"\n\\begin{DoxyRetVals}{";
1664 m_t <<
"\n\\begin{DoxyExceptions}{";
1668 m_t <<
"\n\\begin{DoxyTemplParams}{";
1685 m_t <<
"\\end{DoxyParams}\n";
1688 m_t <<
"\\end{DoxyRetVals}\n";
1691 m_t <<
"\\end{DoxyExceptions}\n";
1694 m_t <<
"\\end{DoxyTemplParams}\n";
1724 m_t <<
"\\mbox{\\texttt{ ";
1739 if (useTable)
m_t <<
" & ";
1758 if (useTable)
m_t <<
" & ";
1764 if (!first)
m_t <<
",";
else first=
FALSE;
1812 m_t <<
"\\begin{DoxyRefDesc}{";
1815 bool anonymousEnum = x->
file()==
"@";
1817 if (pdfHyperlinks && !anonymousEnum)
1823 m_t <<
"\\textbf{ ";
1828 if (pdfHyperlinks && !anonymousEnum)
1840 m_t <<
"\\end{DoxyRefDesc}\n";
1866 m_t <<
"\\begin{quote}\n";
1873 m_t <<
"\\end{quote}\n";
1911 if (ref.
isEmpty() && pdfHyperLinks)
1915 m_t <<
"\\doxytablelink{";
1919 m_t <<
"\\mbox{\\hyperlink{";
1926 else if (ref.
isEmpty() && refToTable)
1928 m_t <<
"\\doxytableref{";
1932 m_t <<
"\\doxyref{";
1936 m_t <<
"\\textbf{ ";
1944 if (ref.
isEmpty() && !pdfHyperLinks)
1948 m_t <<
"}{" << file;
1949 if (!file.isEmpty() && !anchor.
isEmpty())
m_t <<
"_";
1950 m_t << anchor <<
"}";
1952 if (ref.
isEmpty() && pdfHyperLinks)
1971 if ((i=baseName.
findRev(
'/'))!=-1)
1975 if ((i=baseName.
find(
'.'))!=-1)
1977 baseName=baseName.
left(i);
2002 if ((i=baseName.
findRev(
'/'))!=-1)
2006 if ((i=baseName.
find(
'.'))!=-1)
2008 baseName=baseName.
left(i);
2028 if ((i=shortName.
findRev(
'/'))!=-1)
2030 shortName=shortName.
right(shortName.
length()-i-1);
2050 if ((i=baseName.
findRev(
'/'))!=-1)
2054 if ((i=baseName.
find(
'.'))!=-1)
2056 baseName=baseName.
left(i);
2076 if ((i=shortName.
findRev(
'/'))!=-1)
2078 shortName=shortName.
right(shortName.
length()-i-1);
2091 if ((i=shortName.
findRev(
'/'))!=-1)
2093 shortName=shortName.
right(shortName.
length()-i-1);
2097 if (shortName.
find(
'.')==-1) shortName +=
".png";
2117 err(
"Maximum indent level (%d) exceeded while generating LaTeX output!\n",
maxIndentLevels-1);
Node representing an HTML blockquote
Node representing an item of a auto list
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine)
Write a PlantUML compatible file.
Node representing a Hypertext reference
Node representing a style change
const char * latex(DocSymbol::SymType symb) const
Access routine to the LaTeX code of the HTML entity
Node representing a verbatim, unparsed text fragment
DocHtmlCaption * caption() const
virtual QCString trCopyright()=0
QCString integerToRoman(int n, bool upper)
DocNodeList & paramTypes()
Node representing a simple section title
static void writeStartTableCommand(TextStream &t, const DocNode *n, int cols)
virtual QCString trPostcondition()=0
Node representing a paragraph in the documentation tree
bool isInlineImage() const
QCString latexFilterURL(const QCString &s)
void endMscFile(bool hasCaption)
Alignment alignment() const
Node representing a dot file
void pushHidden(bool hide)
Node representing a HTML table
virtual QCString trNote()=0
LatexListItemInfo m_listItemInfo[maxIndentLevels]
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Class representing a directory in the file system
static void visitCaption(LatexDocVisitor *parent, const DocNodeList &children)
Root node of documentation tree
void startCodeFragment(const QCString &style) override
static void visitPreStart(TextStream &t, bool hasCaption, QCString name, QCString width, QCString height, bool inlineImage=FALSE)
static const char * getSectionName(int level)
uint length() const
Returns the length of the string, not counting the 0-terminator.
Class representing a list of HTML attributes.
void endDiaFile(bool hasCaption)
int findRev(char c, int index=-1, bool cs=TRUE) const
virtual QCString trExceptions()=0
Node representing a HTML list item
bool isEmpty() const
Returns TRUE iff the string is empty
size_t numColumns() const
Node representing a VHDL flow chart
Abstract node interface with type information.
void writePlantUMLFile(const QCString &fileName, DocVerbatim *s)
static void visitPostEnd(TextStream &t, bool hasCaption, bool inlineImage=FALSE)
Node representing a HTML description data
void visitPost(DocAutoList *)
Node representing a Html description item
Node representing a n emoji
Node representing a msc file
SrcLangExt
Language as given by extension
virtual QCString trReturns()=0
QCString escapeMakeIndexChars(const char *s)
QCString targetTitle() const
QCString exampleFile() const
Node representing a reference to a section
static bool classEqualsReflist(const DocNode *n)
static PlantumlManager & instance()
Node representing an anchor
virtual QCString trPrecondition()=0
void err(const char *fmt,...)
Text streaming class that buffers data.
int find(char c, int index=0, bool cs=TRUE) const
Root node of a text fragment
static CitationManager & instance()
const HtmlAttribList & attribs() const
Abstract visitor that participates in the visitor pattern.
void writeDiaFile(const QCString &fileName, DocVerbatim *s)
void setInColSpan(bool b)
void endDotFile(bool hasCaption)
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper
void addRowSpan(ActiveRowSpan &&span)
static bool listIsNested(const DocNode *n)
Node representing a Html description list
void startDiaFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
CodeParserInterface & getCodeParser(const QCString &langExt)
Node representing a include/dontinclude operator block
Node representing an entry in the index.
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
Node representing a list of section references
static const char * secLabels[maxLevels]
DocHtmlRow * firstRow() const
virtual QCString trSeeAlso()=0
Node representing a line break
Node representing a special symbol
const char * name(int index) const
Access routine to the name of the Emoji entity
LatexDocVisitor(TextStream &t, LatexCodeGenerator &ci, const QCString &langExt, bool insideTabbing)
QCString extractBlock(const QCString &text, const QCString &marker)
Returns the section of text, in between a pair of markers.
Node representing an item of a cross-referenced list
FileDef * createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Node representing an image
virtual Kind kind() const =0
virtual QCString trVersion()=0
std::vector< std::unique_ptr< DocNode > > DocNodeList
QCString left(size_t len) const
Node representing a URL (or email address)
void writeDotGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine)
Node representing a HTML table caption
Node representing a parameter list.
virtual QCString trAttention()=0
Translator * theTranslator
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
Node representing a separator
LatexCodeGenerator & m_ci
QCString exampleFile() const
Node representing an block of paragraphs
Node representing a separator between two simple sections of the same type.
void endLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=FALSE)
const int DocVisitor_Latex
QCString stripPath(const QCString &s)
Concrete visitor implementation for LaTeX output.
virtual QCString trPageAbbreviation()=0
QCString latexEscapeLabelName(const QCString &s)
Node representing a citation of some bibliographic reference
virtual QCString trParameters()=0
int usedTableLevel() const
int currentColumn() const
Node representing a reference to some item
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Node representing a parameter section
const DocNodeList & children() const
Node representing a Html list
virtual QCString trRemarks()=0
static const int maxIndentLevels
int lineBlock(const QCString &text, const QCString &marker)
Returns the line number of the line following the line with the marker.
void setInRowSpan(bool b)
DocParamSect::Direction direction() const
Node representing a simple section
Node representing a normal section
Node representing a horizontal ruler
QCString language() const
static bool tableIsNested(const DocNode *n)
Node representing an included text block from file
virtual void parseCode(CodeOutputInterface &codeOutIntf, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=0, bool showLineNumbers=TRUE, const Definition *searchCtx=0, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
Node representing an auto List
virtual QCString trSince()=0
void endCodeFragment(const QCString &style) override
Node representing an internal section of documentation
virtual QCString trInvariant()=0
void writeMscGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, MscOutputFormat format, const QCString &srcFile, int srcLine)
bool hasTypeSpecifier() const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
std::string dirPath(bool absPath=true) const
Node representing a word that can be linked to something
#define Config_getBool(name)
void filter(const QCString &str)
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command
Node representing a link to some item
Node representing a dia file
Minimal replacement for QFileInfo.
const char * qPrint(const char *s)
static void writeEndTableCommand(TextStream &t, const DocNode *n)
#define Config_getString(name)
static bool insideMainPage
void visitPre(DocAutoList *)
QCString convertCharEntitiesToUTF8(const QCString &str)
Node representing a simple list
QCString getFileNameExtension(const QCString &fn)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Node representing a simple list item
QCString includeFileName() const
A model of a file symbol.
const DocNodeList & children() const
Node representing some amount of white space
static EmojiEntityMapper * instance()
Returns the one and only instance of the Emoji entity mapper
std::string fileName() const
Node representing a HTML table cell
QCString extension() const
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
virtual QCString trDate()=0
bool hasInOutSpecifier() const
Node representing an internal reference to some item
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces)
DocNodeList & parameters()
A bunch of utility functions.
Valignment valignment() const
Node representing a HTML table row
void setCurrentColumn(int col)
QCString latexEscapeIndexChars(const QCString &s)
QCString right(size_t len) const
QCString & prepend(const char *s)
QCString & sprintf(const char *format,...)
void startLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=FALSE)
QCString anchorPrefix() const
virtual QCString trTemplateParameters()=0
void writeMscFile(const QCString &fileName, DocVerbatim *s)
QCString exampleFile() const
virtual QCString trReturnValues()=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
virtual QCString trWarning()=0
const HtmlAttribList & attribs() const
This is an alternative implementation of QCString.