Doxygen
Loading...
Searching...
No Matches
LatexDocVisitor Class Reference

Concrete visitor implementation for LaTeX output. More...

#include <src/latexdocvisitor.h>

Inheritance diagram for LatexDocVisitor:
Collaboration diagram for LatexDocVisitor:

Classes

struct  ActiveRowSpan
struct  TableState
struct  LatexListItemInfo

Public Member Functions

 LatexDocVisitor (TextStream &t, OutputCodeList &ci, LatexCodeGenerator &lcg, const QCString &langExt, int hierarchyLevel=0)
void operator() (const DocWord &)
void operator() (const DocLinkedWord &)
void operator() (const DocWhiteSpace &)
void operator() (const DocSymbol &)
void operator() (const DocEmoji &)
void operator() (const DocURL &)
void operator() (const DocLineBreak &)
void operator() (const DocHorRuler &)
void operator() (const DocStyleChange &)
void operator() (const DocVerbatim &)
void operator() (const DocAnchor &)
void operator() (const DocInclude &)
void operator() (const DocIncOperator &)
void operator() (const DocFormula &)
void operator() (const DocIndexEntry &)
void operator() (const DocSimpleSectSep &)
void operator() (const DocCite &)
void operator() (const DocSeparator &)
void operator() (const DocAutoList &)
void operator() (const DocAutoListItem &)
void operator() (const DocPara &)
void operator() (const DocRoot &)
void operator() (const DocSimpleSect &)
void operator() (const DocTitle &)
void operator() (const DocSimpleList &)
void operator() (const DocSimpleListItem &)
void operator() (const DocSection &s)
void operator() (const DocHtmlList &s)
void operator() (const DocHtmlListItem &)
void operator() (const DocHtmlDescList &)
void operator() (const DocHtmlDescTitle &)
void operator() (const DocHtmlDescData &)
void operator() (const DocHtmlTable &t)
void operator() (const DocHtmlCaption &)
void operator() (const DocHtmlRow &)
void operator() (const DocHtmlCell &)
void operator() (const DocInternal &)
void operator() (const DocHRef &)
void operator() (const DocHtmlSummary &)
void operator() (const DocHtmlDetails &)
void operator() (const DocHtmlHeader &)
void operator() (const DocImage &)
void operator() (const DocDotFile &)
void operator() (const DocMscFile &)
void operator() (const DocDiaFile &)
void operator() (const DocPlantUmlFile &)
void operator() (const DocLink &lnk)
void operator() (const DocRef &ref)
void operator() (const DocSecRefItem &)
void operator() (const DocSecRefList &)
void operator() (const DocParamSect &)
void operator() (const DocParamList &)
void operator() (const DocXRefItem &)
void operator() (const DocInternalRef &)
void operator() (const DocText &)
void operator() (const DocHtmlBlockQuote &)
void operator() (const DocVhdlFlow &)
void operator() (const DocParBlock &)
Public Member Functions inherited from DocVisitor
 DocVisitor ()
virtual ~DocVisitor ()
CodeParserInterfacegetCodeParser (const QCString &langExt)
void pushHidden (bool hide)
bool popHidden ()

Private Types

typedef std::vector< ActiveRowSpanRowSpanList

Private Member Functions

template<class T>
void visitChildren (const T &t)
void filter (const QCString &str, const bool retainNewLine=false)
void startLink (const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=false, bool refToSection=false)
void endLink (const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=false, bool refToSection=false, SectionType sectionType=SectionType::Anchor)
void startDotFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)
void endDotFile (bool hasCaption)
void startMscFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
void endMscFile (bool hasCaption)
void writeMscFile (const QCString &fileName, const DocVerbatim &s, bool newFile=true)
void startDiaFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
void endDiaFile (bool hasCaption)
void writePlantUMLFile (const QCString &fileName, const DocVerbatim &s)
void startPlantUmlFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
void endPlantUmlFile (bool hasCaption)
void visitCaption (const DocNodeList &children)
void incIndentLevel ()
void decIndentLevel ()
int indentLevel () const
const char * getSectionName (int level) const
void pushTableState ()
void popTableState ()
size_t currentColumn () const
void setCurrentColumn (size_t col)
void setNumCols (size_t num)
RowSpanListrowSpans ()
void addRowSpan (ActiveRowSpan &&span)
bool insideTable () const
bool isTableNested (const DocNodeVariant *n) const
void writeStartTableCommand (const DocNodeVariant *n, size_t cols)
void writeEndTableCommand (const DocNodeVariant *n)

Private Attributes

TextStreamm_t
OutputCodeListm_ci
LatexCodeGeneratorm_lcg
bool m_insidePre
bool m_insideItem
bool m_hide
QCString m_langExt
int m_hierarchyLevel
TexOrPdf m_texOrPdf = TexOrPdf::NO
std::stack< TableStatem_tableStateStack
RowSpanList m_emptyRowSpanList
int m_indentLevel = 0
LatexListItemInfo m_listItemInfo [maxIndentLevels]

Static Private Attributes

static const int maxIndentLevels = 13

Detailed Description

Concrete visitor implementation for LaTeX output.

Definition at line 37 of file latexdocvisitor.h.

Member Typedef Documentation

◆ RowSpanList

typedef std::vector<ActiveRowSpan> LatexDocVisitor::RowSpanList
private

Definition at line 131 of file latexdocvisitor.h.

Constructor & Destructor Documentation

◆ LatexDocVisitor()

LatexDocVisitor::LatexDocVisitor ( TextStream & t,
OutputCodeList & ci,
LatexCodeGenerator & lcg,
const QCString & langExt,
int hierarchyLevel = 0 )

Definition at line 218 of file latexdocvisitor.cpp.

220 : m_t(t), m_ci(ci), m_lcg(lcg), m_insidePre(FALSE),
222 m_langExt(langExt), m_hierarchyLevel(hierarchyLevel)
223{
224}
OutputCodeList & m_ci
LatexCodeGenerator & m_lcg
#define FALSE
Definition qcstring.h:34

References FALSE, m_ci, m_hide, m_hierarchyLevel, m_insideItem, m_insidePre, m_langExt, m_lcg, and m_t.

Member Function Documentation

◆ addRowSpan()

void LatexDocVisitor::addRowSpan ( ActiveRowSpan && span)
inlineprivate

Definition at line 227 of file latexdocvisitor.h.

228 {
229 if (!m_tableStateStack.empty()) m_tableStateStack.top().rowSpans.push_back(std::move(span));
230 }
std::stack< TableState > m_tableStateStack

References m_tableStateStack.

Referenced by operator()().

◆ currentColumn()

size_t LatexDocVisitor::currentColumn ( ) const
inlineprivate

Definition at line 211 of file latexdocvisitor.h.

212 {
213 return !m_tableStateStack.empty() ? m_tableStateStack.top().currentColumn : 0;
214 }

References m_tableStateStack.

Referenced by operator()().

◆ decIndentLevel()

void LatexDocVisitor::decIndentLevel ( )
private

Definition at line 2030 of file latexdocvisitor.cpp.

2031{
2032 if (m_indentLevel>0)
2033 {
2034 m_indentLevel--;
2035 }
2036}

References m_indentLevel.

Referenced by operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), and operator()().

◆ endDiaFile()

void LatexDocVisitor::endDiaFile ( bool hasCaption)
private

Definition at line 1955 of file latexdocvisitor.cpp.

1956{
1957 if (m_hide) return;
1958 visitPostEnd(m_t,hasCaption);
1959}
static void visitPostEnd(TextStream &t, bool hasCaption, bool inlineImage=FALSE)

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endDotFile()

void LatexDocVisitor::endDotFile ( bool hasCaption)
private

Definition at line 1900 of file latexdocvisitor.cpp.

1901{
1902 if (m_hide) return;
1903 visitPostEnd(m_t,hasCaption);
1904}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()(), and operator()().

◆ endLink()

void LatexDocVisitor::endLink ( const QCString & ref,
const QCString & file,
const QCString & anchor,
bool refToTable = false,
bool refToSection = false,
SectionType sectionType = SectionType::Anchor )
private

Definition at line 1860 of file latexdocvisitor.cpp.

1861{
1862 m_t << "}";
1863 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1864 if (ref.isEmpty() && !pdfHyperLinks)
1865 {
1866 m_t << "{";
1868 m_t << "}{" << file;
1869 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1870 m_t << anchor << "}";
1871 if (refToSection)
1872 {
1873 m_t << "{" << sectionType.level() << "}";
1874 }
1875 }
1876 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1877 {
1878 if (refToSection)
1879 {
1880 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1881 }
1882 }
1883}
void filter(const QCString &str, const bool retainNewLine=false)
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
constexpr int level() const
Definition section.h:45
virtual QCString trPageAbbreviation()=0
#define Config_getBool(name)
Definition config.h:33
Translator * theTranslator
Definition language.cpp:71
@ PDF
called through texorpdf as PDF (second) part

References Config_getBool, filter(), QCString::isEmpty(), SectionType::level(), m_t, m_texOrPdf, PDF, and theTranslator.

Referenced by operator()(), operator()(), operator()(), operator()(), and operator()().

◆ endMscFile()

void LatexDocVisitor::endMscFile ( bool hasCaption)
private

Definition at line 1922 of file latexdocvisitor.cpp.

1923{
1924 if (m_hide) return;
1925 visitPostEnd(m_t,hasCaption);
1926}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endPlantUmlFile()

void LatexDocVisitor::endPlantUmlFile ( bool hasCaption)
private

Definition at line 2010 of file latexdocvisitor.cpp.

2011{
2012 if (m_hide) return;
2013 visitPostEnd(m_t,hasCaption);
2014}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()(), and startPlantUmlFile().

◆ filter()

void LatexDocVisitor::filter ( const QCString & str,
const bool retainNewLine = false )
private

Definition at line 1800 of file latexdocvisitor.cpp.

1801{
1802 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
1804 m_lcg.insideTabbing(),
1807 m_lcg.usedTableLevel()>0, // insideTable
1808 false, // keepSpaces
1809 retainNewLine
1810 );
1811}
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline)

References filterLatexString(), m_insideItem, m_insidePre, m_lcg, and m_t.

Referenced by endLink(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), and operator()().

◆ getSectionName()

const char * LatexDocVisitor::getSectionName ( int level) const
private

Definition at line 60 of file latexdocvisitor.cpp.

61{
62 bool compactLatex = Config_getBool(COMPACT_LATEX);
63 int l = level;
64 if (compactLatex) l++;
65
66 if (l < g_maxLevels)
67 {
68 l += m_hierarchyLevel; /* May be -1 if generating main page */
69 // Sections get special treatment because they inherit the parent's level
70 if (l >= g_maxLevels)
71 {
72 l = g_maxLevels - 1;
73 }
74 else if (l < 0)
75 {
76 /* Should not happen; level is always >= 1 and hierarchyLevel >= -1 */
77 l = 0;
78 }
79 return g_secLabels[l];
80 }
81 else if (l == 7)
82 {
83 return g_paragraphLabel;
84 }
85 else
86 {
88 }
89}
static const char * g_subparagraphLabel
static const int g_maxLevels
static const std::array< const char *, g_maxLevels > g_secLabels
static const char * g_paragraphLabel

References Config_getBool, g_maxLevels, g_paragraphLabel, g_secLabels, g_subparagraphLabel, and m_hierarchyLevel.

Referenced by operator()(), and operator()().

◆ incIndentLevel()

void LatexDocVisitor::incIndentLevel ( )
private

Definition at line 2021 of file latexdocvisitor.cpp.

2022{
2023 m_indentLevel++;
2025 {
2026 err("Maximum indent level ({}) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2027 }
2028}
static const int maxIndentLevels
#define err(fmt,...)
Definition message.h:127

References err, m_indentLevel, and maxIndentLevels.

Referenced by operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), and operator()().

◆ indentLevel()

int LatexDocVisitor::indentLevel ( ) const
private

Definition at line 2016 of file latexdocvisitor.cpp.

2017{
2018 return std::min(m_indentLevel,maxIndentLevels-1);
2019}

References m_indentLevel, and maxIndentLevels.

Referenced by operator()(), operator()(), operator()(), and operator()().

◆ insideTable()

bool LatexDocVisitor::insideTable ( ) const
inlineprivate

Definition at line 231 of file latexdocvisitor.h.

232 {
233 return !m_tableStateStack.empty();
234 }

References m_tableStateStack.

Referenced by operator()(), and operator()().

◆ isTableNested()

bool LatexDocVisitor::isTableNested ( const DocNodeVariant * n) const
private

Definition at line 1180 of file latexdocvisitor.cpp.

1181{
1182 bool isNested=m_lcg.usedTableLevel()>0;
1183 while (n && !isNested)
1184 {
1186 n = ::parent(n);
1187 }
1188 return isNested;
1189}
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
Definition docnode.h:1366
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
Definition docnode.h:1330

References holds_one_of_alternatives(), m_lcg, and parent().

Referenced by operator()(), operator()(), operator()(), writeEndTableCommand(), and writeStartTableCommand().

◆ operator()() [1/58]

void LatexDocVisitor::operator() ( const DocAnchor & anc)

Definition at line 504 of file latexdocvisitor.cpp.

505{
506 if (m_hide) return;
507 m_t << "\\label{" << stripPath(anc.file()) << "_" << anc.anchor() << "}%\n";
508 if (!anc.file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
509 {
510 m_t << "\\Hypertarget{" << stripPath(anc.file()) << "_" << anc.anchor()
511 << "}%\n";
512 }
513}
QCString anchor() const
Definition docnode.h:232
QCString file() const
Definition docnode.h:233
QCString stripPath(const QCString &s)
Definition util.cpp:4902

References DocAnchor::anchor(), Config_getBool, DocAnchor::file(), QCString::isEmpty(), m_hide, m_t, and stripPath().

◆ operator()() [2/58]

void LatexDocVisitor::operator() ( const DocAutoList & l)

Definition at line 739 of file latexdocvisitor.cpp.

740{
741 if (m_hide) return;
742 if (m_indentLevel>=maxIndentLevels-1) return;
743 if (l.isEnumList())
744 {
745 m_t << "\n\\begin{DoxyEnumerate}";
746 m_listItemInfo[indentLevel()].isEnum = true;
747 }
748 else
749 {
750 m_listItemInfo[indentLevel()].isEnum = false;
751 m_t << "\n\\begin{DoxyItemize}";
752 }
753 visitChildren(l);
754 if (l.isEnumList())
755 {
756 m_t << "\n\\end{DoxyEnumerate}";
757 }
758 else
759 {
760 m_t << "\n\\end{DoxyItemize}";
761 }
762}
bool isEnumList() const
Definition docnode.h:580
LatexListItemInfo m_listItemInfo[maxIndentLevels]
void visitChildren(const T &t)

References indentLevel(), DocAutoList::isEnumList(), m_hide, m_indentLevel, m_listItemInfo, m_t, maxIndentLevels, and visitChildren().

◆ operator()() [3/58]

void LatexDocVisitor::operator() ( const DocAutoListItem & li)

Definition at line 764 of file latexdocvisitor.cpp.

765{
766 if (m_hide) return;
767 switch (li.itemNumber())
768 {
769 case DocAutoList::Unchecked: // unchecked
770 m_t << "\n\\item[\\DoxyUnchecked] ";
771 break;
772 case DocAutoList::Checked_x: // checked with x
773 case DocAutoList::Checked_X: // checked with X
774 m_t << "\n\\item[\\DoxyChecked] ";
775 break;
776 default:
777 m_t << "\n\\item ";
778 break;
779 }
781 visitChildren(li);
783}
int itemNumber() const
Definition docnode.h:598

References DocAutoList::Checked_X, DocAutoList::Checked_x, decIndentLevel(), incIndentLevel(), DocAutoListItem::itemNumber(), m_hide, m_t, DocAutoList::Unchecked, and visitChildren().

◆ operator()() [4/58]

void LatexDocVisitor::operator() ( const DocCite & cite)

Definition at line 676 of file latexdocvisitor.cpp.

677{
678 if (m_hide) return;
679 auto opt = cite.option();
680 QCString txt;
681 if (opt.noCite())
682 {
683 if (!cite.file().isEmpty())
684 {
685 txt = cite.getText();
686 }
687 else
688 {
689 if (!opt.noPar()) txt += "[";
690 txt += cite.target();
691 if (!opt.noPar()) txt += "]";
692 }
693 m_t << "{\\bfseries ";
694 filter(txt);
695 m_t << "}";
696 }
697 else
698 {
699 if (!cite.file().isEmpty())
700 {
701 QCString anchor = cite.anchor();
702 QCString anchorPrefix = CitationManager::instance().anchorPrefix();
703 anchor = anchor.mid(anchorPrefix.length()); // strip prefix
704
705 txt = "\\DoxyCite{" + anchor + "}";
706 if (opt.isNumber())
707 {
708 txt += "{number}";
709 }
710 else if (opt.isShortAuthor())
711 {
712 txt += "{shortauthor}";
713 }
714 else if (opt.isYear())
715 {
716 txt += "{year}";
717 }
718 if (!opt.noPar()) txt += "{1}";
719 else txt += "{0}";
720
721 m_t << txt;
722 }
723 else
724 {
725 if (!opt.noPar()) txt += "[";
726 txt += cite.target();
727 if (!opt.noPar()) txt += "]";
728 m_t << "{\\bfseries ";
729 filter(txt);
730 m_t << "}";
731 }
732 }
733}
QCString anchorPrefix() const
Definition cite.cpp:126
static CitationManager & instance()
Definition cite.cpp:85
QCString getText() const
Definition docnode.cpp:959
CiteInfoOption option() const
Definition docnode.h:253
QCString target() const
Definition docnode.h:252
QCString anchor() const
Definition docnode.h:251
QCString file() const
Definition docnode.h:248
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241

References DocCite::anchor(), CitationManager::anchorPrefix(), DocCite::file(), filter(), DocCite::getText(), CitationManager::instance(), QCString::isEmpty(), QCString::length(), m_hide, m_t, QCString::mid(), DocCite::option(), and DocCite::target().

◆ operator()() [5/58]

void LatexDocVisitor::operator() ( const DocDiaFile & df)

Definition at line 1500 of file latexdocvisitor.cpp.

1501{
1502 if (m_hide) return;
1503 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1504 startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1505 visitChildren(df);
1506 endDiaFile(df.hasCaption());
1507}
QCString height() const
Definition docnode.h:689
QCString srcFile() const
Definition docnode.h:691
QCString file() const
Definition docnode.h:685
int srcLine() const
Definition docnode.h:692
bool hasCaption() const
Definition docnode.h:687
QCString width() const
Definition docnode.h:688
void endDiaFile(bool hasCaption)
void startDiaFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
#define Config_getString(name)
Definition config.h:32
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
Definition util.cpp:5826

References Config_getBool, Config_getString, copyFile(), endDiaFile(), DocDiagramFileBase::file(), DocDiagramFileBase::hasCaption(), DocDiagramFileBase::height(), m_hide, DocDiagramFileBase::srcFile(), DocDiagramFileBase::srcLine(), startDiaFile(), stripPath(), visitChildren(), and DocDiagramFileBase::width().

◆ operator()() [6/58]

void LatexDocVisitor::operator() ( const DocDotFile & df)

Definition at line 1482 of file latexdocvisitor.cpp.

1483{
1484 if (m_hide) return;
1485 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1486 startDotFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1487 visitChildren(df);
1488 endDotFile(df.hasCaption());
1489}
void endDotFile(bool hasCaption)
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)

References Config_getBool, Config_getString, copyFile(), endDotFile(), DocDiagramFileBase::file(), DocDiagramFileBase::hasCaption(), DocDiagramFileBase::height(), m_hide, DocDiagramFileBase::srcFile(), DocDiagramFileBase::srcLine(), startDotFile(), stripPath(), visitChildren(), and DocDiagramFileBase::width().

◆ operator()() [7/58]

void LatexDocVisitor::operator() ( const DocEmoji & s)

Definition at line 297 of file latexdocvisitor.cpp.

298{
299 if (m_hide) return;
300 QCString emojiName = EmojiEntityMapper::instance().name(s.index());
301 if (!emojiName.isEmpty())
302 {
303 QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
304 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxygenemoji{";
305 filter(emojiName);
306 if (m_texOrPdf != TexOrPdf::PDF) m_t << "}{" << imageName << "}";
307 }
308 else
309 {
310 m_t << s.name();
311 }
312}
int index() const
Definition docnode.h:345
QCString name() const
Definition docnode.h:344
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:2026
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1978

References filter(), DocEmoji::index(), EmojiEntityMapper::instance(), QCString::isEmpty(), QCString::length(), m_hide, m_t, m_texOrPdf, QCString::mid(), DocEmoji::name(), EmojiEntityMapper::name(), and PDF.

◆ operator()() [8/58]

void LatexDocVisitor::operator() ( const DocFormula & f)

Definition at line 643 of file latexdocvisitor.cpp.

644{
645 if (m_hide) return;
646 QCString s = f.text();
647 const char *p = s.data();
648 char c = 0;
649 if (p)
650 {
651 while ((c=*p++))
652 {
653 switch (c)
654 {
655 case '\'': m_t << "\\textnormal{\\textquotesingle}"; break;
656 default: m_t << c; break;
657 }
658 }
659 }
660}
QCString text() const
Definition docnode.h:533
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172

References QCString::data(), m_hide, m_t, and DocFormula::text().

◆ operator()() [9/58]

void LatexDocVisitor::operator() ( const DocHorRuler & )

Definition at line 341 of file latexdocvisitor.cpp.

342{
343 if (m_hide) return;
344 if (insideTable())
345 m_t << "\\DoxyHorRuler{1}\n";
346 else
347 m_t << "\\DoxyHorRuler{0}\n";
348}
bool insideTable() const

References insideTable(), m_hide, and m_t.

◆ operator()() [10/58]

void LatexDocVisitor::operator() ( const DocHRef & href)

Definition at line 1411 of file latexdocvisitor.cpp.

1412{
1413 if (m_hide) return;
1414 if (Config_getBool(PDF_HYPERLINKS))
1415 {
1416 m_t << "\\href{";
1417 m_t << latexFilterURL(href.url());
1418 m_t << "}";
1419 }
1420 m_t << "{\\texttt{";
1421 visitChildren(href);
1422 m_t << "}}";
1423}
QCString url() const
Definition docnode.h:830
QCString latexFilterURL(const QCString &s)

References Config_getBool, latexFilterURL(), m_hide, m_t, DocHRef::url(), and visitChildren().

◆ operator()() [11/58]

void LatexDocVisitor::operator() ( const DocHtmlBlockQuote & q)

Definition at line 1780 of file latexdocvisitor.cpp.

1781{
1782 if (m_hide) return;
1783 m_t << "\\begin{quote}\n";
1785 visitChildren(q);
1786 m_t << "\\end{quote}\n";
1788}

References decIndentLevel(), incIndentLevel(), m_hide, m_t, and visitChildren().

◆ operator()() [12/58]

void LatexDocVisitor::operator() ( const DocHtmlCaption & c)

Definition at line 1260 of file latexdocvisitor.cpp.

1261{
1262 if (m_hide) return;
1263 visitChildren(c);
1264}

References m_hide, and visitChildren().

◆ operator()() [13/58]

void LatexDocVisitor::operator() ( const DocHtmlCell & c)

Definition at line 1296 of file latexdocvisitor.cpp.

1297{
1298 if (m_hide) return;
1299 //printf("Cell(r=%u,c=%u) rowSpan=%d colSpan=%d currentColumn()=%zu\n",c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),currentColumn());
1300
1302
1303 QCString cellOpts;
1304 QCString cellSpec;
1305 auto appendOpt = [&cellOpts](const QCString &s)
1306 {
1307 if (!cellOpts.isEmpty()) cellOpts+=",";
1308 cellOpts+=s;
1309 };
1310 auto appendSpec = [&cellSpec](const QCString &s)
1311 {
1312 if (!cellSpec.isEmpty()) cellSpec+=",";
1313 cellSpec+=s;
1314 };
1315 auto writeCell = [this,&cellOpts,&cellSpec]()
1316 {
1317 if (!cellOpts.isEmpty() || !cellSpec.isEmpty())
1318 {
1319 m_t << "\\SetCell";
1320 if (!cellOpts.isEmpty())
1321 {
1322 m_t << "[" << cellOpts << "]";
1323 }
1324 m_t << "{" << cellSpec << "}";
1325 }
1326 };
1327
1328 // skip over columns that have a row span starting at an earlier row
1329 for (const auto &span : rowSpans())
1330 {
1331 //printf("span(r=%u,c=%u): column=%zu colSpan=%zu,rowSpan=%zu currentColumn()=%zu\n",
1332 // span.cell.rowIndex(),span.cell.columnIndex(),
1333 // span.column,span.colSpan,span.rowSpan,
1334 // currentColumn());
1335 if (span.rowSpan>0 && span.column==currentColumn())
1336 {
1337 setCurrentColumn(currentColumn()+span.colSpan);
1338 for (size_t i=0;i<span.colSpan;i++)
1339 {
1340 m_t << "&";
1341 }
1342 }
1343 }
1344
1345 int cs = c.colSpan();
1346 int ha = c.alignment();
1347 int rs = c.rowSpan();
1348 int va = c.valignment();
1349
1350 switch (ha) // horizontal alignment
1351 {
1352 case DocHtmlCell::Right:
1353 appendSpec("r");
1354 break;
1356 appendSpec("c");
1357 break;
1358 default:
1359 // default
1360 break;
1361 }
1362 if (rs>0) // row span
1363 {
1364 appendOpt("r="+QCString().setNum(rs));
1365 //printf("adding row span: cell={r=%d c=%d rs=%d cs=%d} curCol=%zu\n",
1366 // c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),
1367 // currentColumn());
1369 }
1370 if (cs>1) // column span
1371 {
1372 // update column to the end of the span, needs to be done *after* calling addRowSpan()
1374 appendOpt("c="+QCString().setNum(cs));
1375 }
1376 if (c.isHeading())
1377 {
1378 appendSpec("bg=\\tableheadbgcolor");
1379 appendSpec("font=\\bfseries");
1380 }
1381 switch(va) // vertical alignment
1382 {
1383 case DocHtmlCell::Top:
1384 appendSpec("h");
1385 break;
1387 appendSpec("f");
1388 break;
1390 // default
1391 break;
1392 }
1393 writeCell();
1394
1395 visitChildren(c);
1396
1397 for (int i=0;i<cs-1;i++)
1398 {
1399 m_t << "&"; // placeholder for invisible cell
1400 }
1401
1402 if (!c.isLast()) m_t << "&";
1403}
Valignment valignment() const
Definition docnode.cpp:1919
uint32_t rowSpan() const
Definition docnode.cpp:1857
Alignment alignment() const
Definition docnode.cpp:1881
bool isLast() const
Definition docnode.h:1202
bool isHeading() const
Definition docnode.h:1200
uint32_t colSpan() const
Definition docnode.cpp:1869
RowSpanList & rowSpans()
void setCurrentColumn(size_t col)
void addRowSpan(ActiveRowSpan &&span)
size_t currentColumn() const

References addRowSpan(), DocHtmlCell::alignment(), DocHtmlCell::Bottom, DocHtmlCell::Center, DocHtmlCell::colSpan(), currentColumn(), QCString::isEmpty(), DocHtmlCell::isHeading(), DocHtmlCell::isLast(), m_hide, m_t, DocHtmlCell::Middle, DocHtmlCell::Right, DocHtmlCell::rowSpan(), rowSpans(), setCurrentColumn(), DocHtmlCell::Top, DocHtmlCell::valignment(), and visitChildren().

◆ operator()() [14/58]

void LatexDocVisitor::operator() ( const DocHtmlDescData & dd)

Definition at line 1171 of file latexdocvisitor.cpp.

1172{
1174 if (!m_insideItem) m_t << "\\hfill";
1175 m_t << " \\\\\n";
1176 visitChildren(dd);
1178}

References decIndentLevel(), incIndentLevel(), m_insideItem, m_t, and visitChildren().

◆ operator()() [15/58]

void LatexDocVisitor::operator() ( const DocHtmlDescList & dl)

Definition at line 1137 of file latexdocvisitor.cpp.

1138{
1139 if (m_hide) return;
1140 bool eq = classEqualsReflist(dl);
1141 if (eq)
1142 {
1143 m_t << "\n\\begin{DoxyRefList}";
1144 }
1145 else
1146 {
1147 if (listIsNested(dl)) m_t << "\n\\hfill";
1148 m_t << "\n\\begin{DoxyDescription}";
1149 }
1150 visitChildren(dl);
1151 if (eq)
1152 {
1153 m_t << "\n\\end{DoxyRefList}";
1154 }
1155 else
1156 {
1157 m_t << "\n\\end{DoxyDescription}";
1158 }
1159}
static bool listIsNested(const DocHtmlDescList &dl)
static bool classEqualsReflist(const DocHtmlDescList &dl)

References classEqualsReflist(), listIsNested(), m_hide, m_t, and visitChildren().

◆ operator()() [16/58]

void LatexDocVisitor::operator() ( const DocHtmlDescTitle & dt)

Definition at line 1161 of file latexdocvisitor.cpp.

1162{
1163 if (m_hide) return;
1164 m_t << "\n\\item[{\\parbox[t]{\\linewidth}{";
1166 visitChildren(dt);
1168 m_t << "}}]";
1169}
#define TRUE
Definition qcstring.h:37

References FALSE, m_hide, m_insideItem, m_t, TRUE, and visitChildren().

◆ operator()() [17/58]

void LatexDocVisitor::operator() ( const DocHtmlDetails & d)

Definition at line 1433 of file latexdocvisitor.cpp.

1434{
1435 if (m_hide) return;
1436 m_t << "\n\n";
1437 auto summary = d.summary();
1438 if (summary)
1439 {
1440 std::visit(*this,*summary);
1441 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1442 }
1443 visitChildren(d);
1444 if (summary)
1445 {
1446 m_t << "\\end{adjustwidth}\n";
1447 }
1448 else
1449 {
1450 m_t << "\n\n";
1451 }
1452}
const DocNodeVariant * summary() const
Definition docnode.h:864

References m_hide, m_t, DocHtmlDetails::summary(), and visitChildren().

◆ operator()() [18/58]

void LatexDocVisitor::operator() ( const DocHtmlHeader & header)

Definition at line 1454 of file latexdocvisitor.cpp.

1455{
1456 if (m_hide) return;
1457 m_t << "\\" << getSectionName(header.level()) << "*{";
1458 visitChildren(header);
1459 m_t << "}";
1460}
int level() const
Definition docnode.h:877
const char * getSectionName(int level) const

References getSectionName(), DocHtmlHeader::level(), m_hide, m_t, and visitChildren().

◆ operator()() [19/58]

void LatexDocVisitor::operator() ( const DocHtmlList & s)

Definition at line 1021 of file latexdocvisitor.cpp.

1022{
1023 if (m_hide) return;
1024 if (m_indentLevel>=maxIndentLevels-1) return;
1026 if (s.type()==DocHtmlList::Ordered)
1027 {
1028 bool first = true;
1029 m_t << "\n\\begin{DoxyEnumerate}";
1030 for (const auto &opt : s.attribs())
1031 {
1032 if (opt.name=="type")
1033 {
1034 if (opt.value=="1")
1035 {
1036 m_t << (first ? "[": ",");
1037 m_t << "label=\\arabic*";
1038 first = false;
1039 }
1040 else if (opt.value=="a")
1041 {
1042 m_t << (first ? "[": ",");
1043 m_t << "label=\\enumalphalphcnt*";
1044 first = false;
1045 }
1046 else if (opt.value=="A")
1047 {
1048 m_t << (first ? "[": ",");
1049 m_t << "label=\\enumAlphAlphcnt*";
1050 first = false;
1051 }
1052 else if (opt.value=="i")
1053 {
1054 m_t << (first ? "[": ",");
1055 m_t << "label=\\roman*";
1056 first = false;
1057 }
1058 else if (opt.value=="I")
1059 {
1060 m_t << (first ? "[": ",");
1061 m_t << "label=\\Roman*";
1062 first = false;
1063 }
1064 }
1065 else if (opt.name=="start")
1066 {
1067 m_t << (first ? "[": ",");
1068 bool ok = false;
1069 int val = opt.value.toInt(&ok);
1070 if (ok) m_t << "start=" << val;
1071 first = false;
1072 }
1073 }
1074 if (!first) m_t << "]\n";
1075 }
1076 else
1077 {
1078 m_t << "\n\\begin{DoxyItemize}";
1079 }
1080 visitChildren(s);
1081 if (m_indentLevel>=maxIndentLevels-1) return;
1082 if (s.type()==DocHtmlList::Ordered)
1083 m_t << "\n\\end{DoxyEnumerate}";
1084 else
1085 m_t << "\n\\end{DoxyItemize}";
1086}
const HtmlAttribList & attribs() const
Definition docnode.h:1006
Type type() const
Definition docnode.h:1005

References DocHtmlList::attribs(), indentLevel(), m_hide, m_indentLevel, m_listItemInfo, m_t, maxIndentLevels, DocHtmlList::Ordered, DocHtmlList::type(), and visitChildren().

◆ operator()() [20/58]

void LatexDocVisitor::operator() ( const DocHtmlListItem & l)

Definition at line 1088 of file latexdocvisitor.cpp.

1089{
1090 if (m_hide) return;
1091 if (m_listItemInfo[indentLevel()].isEnum)
1092 {
1093 for (const auto &opt : l.attribs())
1094 {
1095 if (opt.name=="value")
1096 {
1097 bool ok = false;
1098 int val = opt.value.toInt(&ok);
1099 if (ok)
1100 {
1101 m_t << "\n\\setcounter{DoxyEnumerate" << integerToRoman(indentLevel()+1,false) << "}{" << (val - 1) << "}";
1102 }
1103 }
1104 }
1105 }
1106 m_t << "\n\\item ";
1108 visitChildren(l);
1110}
const HtmlAttribList & attribs() const
Definition docnode.h:1170
QCString integerToRoman(int n, bool upper)
Definition util.cpp:6667

References DocHtmlListItem::attribs(), decIndentLevel(), incIndentLevel(), indentLevel(), integerToRoman(), m_hide, m_listItemInfo, m_t, and visitChildren().

◆ operator()() [21/58]

void LatexDocVisitor::operator() ( const DocHtmlRow & row)

Definition at line 1266 of file latexdocvisitor.cpp.

1267{
1268 if (m_hide) return;
1270
1271 visitChildren(row);
1272
1273 m_t << "\\\\";
1274
1275 size_t col = 1;
1276 for (auto &span : rowSpans())
1277 {
1278 if (span.rowSpan>0) span.rowSpan--;
1279 if (span.rowSpan<=0)
1280 {
1281 // inactive span
1282 }
1283 else if (span.column>col)
1284 {
1285 col = span.column+span.colSpan;
1286 }
1287 else
1288 {
1289 col = span.column+span.colSpan;
1290 }
1291 }
1292
1293 m_t << "\n";
1294}

References m_hide, m_t, rowSpans(), setCurrentColumn(), and visitChildren().

◆ operator()() [22/58]

void LatexDocVisitor::operator() ( const DocHtmlSummary & d)

Definition at line 1425 of file latexdocvisitor.cpp.

1426{
1427 if (m_hide) return;
1428 m_t << "{\\bfseries{";
1429 visitChildren(d);
1430 m_t << "}}";
1431}

References m_hide, m_t, and visitChildren().

◆ operator()() [23/58]

void LatexDocVisitor::operator() ( const DocHtmlTable & t)

Definition at line 1215 of file latexdocvisitor.cpp.

1216{
1217 if (m_hide) return;
1219 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1220 if (c)
1221 {
1222 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1223 if (!c->file().isEmpty() && pdfHyperLinks)
1224 {
1225 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1226 << "}{}";
1227 }
1228 m_t << "\n";
1229 }
1230
1232 if (!isTableNested(t.parent()))
1233 {
1234 // write caption
1235 m_t << "{";
1236 if (c)
1237 {
1238 std::visit(*this, *t.caption());
1239 }
1240 m_t << "}";
1241 // write label
1242 m_t << "{";
1243 if (c && (!stripPath(c->file()).isEmpty() || !c->anchor().isEmpty()))
1244 {
1245 m_t << stripPath(c->file()) << "_" << c->anchor();
1246 }
1247 m_t << "}";
1248 }
1249
1250 // write head row(s)
1251 m_t << "{" << t.numberHeaderRows() << "}\n";
1252
1254
1255 visitChildren(t);
1257 popTableState();
1258}
QCString anchor() const
Definition docnode.h:1235
QCString file() const
Definition docnode.h:1234
size_t numberHeaderRows() const
Definition docnode.cpp:2194
size_t numColumns() const
Definition docnode.h:1278
const DocNodeVariant * caption() const
Definition docnode.cpp:2189
DocNodeVariant * parent()
Definition docnode.h:90
void setNumCols(size_t num)
void writeStartTableCommand(const DocNodeVariant *n, size_t cols)
void writeEndTableCommand(const DocNodeVariant *n)
bool isTableNested(const DocNodeVariant *n) const

References DocHtmlCaption::anchor(), DocHtmlTable::caption(), Config_getBool, DocHtmlCaption::file(), QCString::isEmpty(), isTableNested(), m_hide, m_t, DocHtmlTable::numberHeaderRows(), DocHtmlTable::numColumns(), DocNode::parent(), popTableState(), pushTableState(), setNumCols(), stripPath(), visitChildren(), writeEndTableCommand(), and writeStartTableCommand().

◆ operator()() [24/58]

void LatexDocVisitor::operator() ( const DocImage & img)

Definition at line 1462 of file latexdocvisitor.cpp.

1463{
1464 if (img.type()==DocImage::Latex)
1465 {
1466 if (m_hide) return;
1467 QCString gfxName = img.name();
1468 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1469 {
1470 gfxName=gfxName.left(gfxName.length()-4);
1471 }
1472
1473 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1474 visitChildren(img);
1476 }
1477 else // other format -> skip
1478 {
1479 }
1480}
QCString name() const
Definition docnode.h:648
QCString height() const
Definition docnode.h:651
Type type() const
Definition docnode.h:647
QCString width() const
Definition docnode.h:650
bool isInlineImage() const
Definition docnode.h:654
bool hasCaption() const
Definition docnode.h:649
bool endsWith(const char *s) const
Definition qcstring.h:524
QCString left(size_t len) const
Definition qcstring.h:229
static void visitPreStart(TextStream &t, bool hasCaption, QCString name, QCString width, QCString height, bool inlineImage=FALSE)

References QCString::endsWith(), DocImage::hasCaption(), DocImage::height(), DocImage::isInlineImage(), DocImage::Latex, QCString::left(), QCString::length(), m_hide, m_t, DocImage::name(), DocImage::type(), visitChildren(), visitPostEnd(), visitPreStart(), and DocImage::width().

◆ operator()() [25/58]

void LatexDocVisitor::operator() ( const DocInclude & inc)

Definition at line 515 of file latexdocvisitor.cpp.

516{
517 if (m_hide) return;
519 switch(inc.type())
520 {
522 {
523 m_ci.startCodeFragment("DoxyCodeInclude");
524 FileInfo cfi( inc.file().str() );
525 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
527 inc.text(),
528 langExt,
529 inc.stripCodeComments(),
530 CodeParserOptions()
531 .setExample(inc.isExample(), inc.exampleFile())
532 .setFileDef(fd.get())
533 .setInlineFragment(true)
534 );
535 m_ci.endCodeFragment("DoxyCodeInclude");
536 }
537 break;
539 {
540 m_ci.startCodeFragment("DoxyCodeInclude");
542 inc.text(),langExt,
543 inc.stripCodeComments(),
544 CodeParserOptions()
545 .setExample(inc.isExample(), inc.exampleFile())
546 .setInlineFragment(true)
547 .setShowLineNumbers(false)
548 );
549 m_ci.endCodeFragment("DoxyCodeInclude");
550 }
551 break;
559 break;
561 m_t << inc.text();
562 break;
564 if (isTableNested(inc.parent())) // in table
565 {
566 m_t << "\\begin{DoxyCode}{0}";
567 filter(inc.text(), true);
568 m_t << "\\end{DoxyCode}\n";
569 }
570 else
571 {
572 m_t << "\n\\begin{DoxyVerbInclude}\n";
573 m_t << inc.text();
574 m_t << "\\end{DoxyVerbInclude}\n";
575 }
576 break;
579 {
580 m_ci.startCodeFragment("DoxyCodeInclude");
582 inc.file(),
583 inc.blockId(),
584 inc.context(),
586 inc.trimLeft(),
588 );
589 m_ci.endCodeFragment("DoxyCodeInclude");
590 }
591 break;
592 }
593}
void parseCodeFragment(OutputCodeList &codeOutList, const QCString &fileName, const QCString &blockId, const QCString &scopeName, bool showLineNumbers, bool trimLeft, bool stripCodeComments)
static CodeFragmentManager & instance()
virtual void parseCode(OutputCodeList &codeOutList, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, const CodeParserOptions &options)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
QCString blockId() const
Definition docnode.h:454
QCString extension() const
Definition docnode.h:450
bool stripCodeComments() const
Definition docnode.h:455
@ LatexInclude
Definition docnode.h:437
@ SnippetWithLines
Definition docnode.h:438
@ DontIncWithLines
Definition docnode.h:439
@ IncWithLines
Definition docnode.h:438
@ HtmlInclude
Definition docnode.h:437
@ VerbInclude
Definition docnode.h:437
@ DontInclude
Definition docnode.h:437
@ DocbookInclude
Definition docnode.h:439
Type type() const
Definition docnode.h:451
QCString exampleFile() const
Definition docnode.h:457
QCString text() const
Definition docnode.h:452
QCString file() const
Definition docnode.h:449
bool trimLeft() const
Definition docnode.h:459
bool isExample() const
Definition docnode.h:456
QCString context() const
Definition docnode.h:453
CodeParserInterface & getCodeParser(const QCString &langExt)
const std::string & str() const
Definition qcstring.h:552
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
SrcLangExt
Definition types.h:207
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5164

References DocInclude::blockId(), DocInclude::context(), createFileDef(), FileInfo::dirPath(), DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::DontIncWithLines, DocInclude::exampleFile(), DocInclude::extension(), DocInclude::file(), FileInfo::fileName(), filter(), DocVisitor::getCodeParser(), getLanguageFromFileName(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncWithLines, CodeFragmentManager::instance(), DocInclude::isExample(), isTableNested(), DocInclude::LatexInclude, m_ci, m_hide, m_t, DocInclude::ManInclude, DocNode::parent(), CodeParserInterface::parseCode(), CodeFragmentManager::parseCodeFragment(), DocInclude::RtfInclude, CodeParserOptions::setFileDef(), CodeParserOptions::setInlineFragment(), CodeParserOptions::setShowLineNumbers(), DocInclude::Snippet, DocInclude::SnippetWithLines, QCString::str(), DocInclude::stripCodeComments(), DocInclude::text(), DocInclude::trimLeft(), DocInclude::type(), DocInclude::VerbInclude, and DocInclude::XmlInclude.

◆ operator()() [26/58]

void LatexDocVisitor::operator() ( const DocIncOperator & op)

Definition at line 595 of file latexdocvisitor.cpp.

596{
597 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
598 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
599 if (op.isFirst())
600 {
601 if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
603 m_hide = TRUE;
604 }
605 QCString locLangExt = getFileNameExtension(op.includeFileName());
606 if (locLangExt.isEmpty()) locLangExt = m_langExt;
607 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
608 if (op.type()!=DocIncOperator::Skip)
609 {
610 m_hide = popHidden();
611 if (!m_hide)
612 {
613 std::unique_ptr<FileDef> fd;
614 if (!op.includeFileName().isEmpty())
615 {
616 FileInfo cfi( op.includeFileName().str() );
617 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
618 }
619
620 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
622 CodeParserOptions()
623 .setExample(op.isExample(),op.exampleFile())
624 .setFileDef(fd.get())
625 .setStartLine(op.line())
626 .setShowLineNumbers(op.showLineNo())
627 );
628 }
630 m_hide=TRUE;
631 }
632 if (op.isLast())
633 {
635 if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
636 }
637 else
638 {
639 if (!m_hide) m_t << "\n";
640 }
641}
bool stripCodeComments() const
Definition docnode.h:506
bool isLast() const
Definition docnode.h:503
QCString includeFileName() const
Definition docnode.h:509
QCString text() const
Definition docnode.h:499
QCString context() const
Definition docnode.h:501
QCString exampleFile() const
Definition docnode.h:508
int line() const
Definition docnode.h:497
Type type() const
Definition docnode.h:485
bool isFirst() const
Definition docnode.h:502
bool showLineNo() const
Definition docnode.h:498
bool isExample() const
Definition docnode.h:507
void pushHidden(bool hide)
bool popHidden()
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5206

References DocIncOperator::context(), createFileDef(), FileInfo::dirPath(), DocIncOperator::exampleFile(), FileInfo::fileName(), DocVisitor::getCodeParser(), getFileNameExtension(), getLanguageFromFileName(), DocIncOperator::includeFileName(), QCString::isEmpty(), DocIncOperator::isExample(), DocIncOperator::isFirst(), DocIncOperator::isLast(), DocIncOperator::line(), m_ci, m_hide, m_langExt, m_t, CodeParserInterface::parseCode(), DocVisitor::popHidden(), DocVisitor::pushHidden(), CodeParserOptions::setFileDef(), CodeParserOptions::setShowLineNumbers(), CodeParserOptions::setStartLine(), DocIncOperator::showLineNo(), DocIncOperator::Skip, QCString::str(), DocIncOperator::stripCodeComments(), DocIncOperator::text(), TRUE, and DocIncOperator::type().

◆ operator()() [27/58]

void LatexDocVisitor::operator() ( const DocIndexEntry & i)

Definition at line 662 of file latexdocvisitor.cpp.

663{
664 if (m_hide) return;
665 m_t << "\\index{";
667 m_t << "@{";
669 m_t << "}}";
670}
QCString entry() const
Definition docnode.h:559
QCString latexEscapeIndexChars(const QCString &s)
QCString latexEscapeLabelName(const QCString &s)

References DocIndexEntry::entry(), latexEscapeIndexChars(), latexEscapeLabelName(), m_hide, and m_t.

◆ operator()() [28/58]

void LatexDocVisitor::operator() ( const DocInternal & i)

Definition at line 1405 of file latexdocvisitor.cpp.

1406{
1407 if (m_hide) return;
1408 visitChildren(i);
1409}

References m_hide, and visitChildren().

◆ operator()() [29/58]

void LatexDocVisitor::operator() ( const DocInternalRef & ref)

Definition at line 1766 of file latexdocvisitor.cpp.

1767{
1768 if (m_hide) return;
1769 startLink(QCString(),ref.file(),ref.anchor());
1770 visitChildren(ref);
1771 endLink(QCString(),ref.file(),ref.anchor());
1772}
QCString file() const
Definition docnode.h:811
QCString anchor() const
Definition docnode.h:813
void endLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=false, bool refToSection=false, SectionType sectionType=SectionType::Anchor)
void startLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=false, bool refToSection=false)

References DocInternalRef::anchor(), endLink(), DocInternalRef::file(), m_hide, startLink(), and visitChildren().

◆ operator()() [30/58]

void LatexDocVisitor::operator() ( const DocLineBreak & )

Definition at line 328 of file latexdocvisitor.cpp.

329{
330 if (m_hide) return;
331 if (m_insideItem)
332 {
333 m_t << "\\\\\n";
334 }
335 else
336 {
337 m_t << "~\\newline\n";
338 }
339}

References m_hide, m_insideItem, and m_t.

◆ operator()() [31/58]

void LatexDocVisitor::operator() ( const DocLink & lnk)

Definition at line 1518 of file latexdocvisitor.cpp.

1519{
1520 if (m_hide) return;
1521 startLink(lnk.ref(),lnk.file(),lnk.anchor());
1522 visitChildren(lnk);
1523 endLink(lnk.ref(),lnk.file(),lnk.anchor());
1524}

References DocLink::anchor(), endLink(), DocLink::file(), m_hide, DocLink::ref(), startLink(), and visitChildren().

◆ operator()() [32/58]

void LatexDocVisitor::operator() ( const DocLinkedWord & w)

Definition at line 236 of file latexdocvisitor.cpp.

237{
238 if (m_hide) return;
239 startLink(w.ref(),w.file(),w.anchor());
240 filter(w.word());
241 endLink(w.ref(),w.file(),w.anchor());
242}
QCString file() const
Definition docnode.h:171
QCString ref() const
Definition docnode.h:173
QCString word() const
Definition docnode.h:170
QCString anchor() const
Definition docnode.h:174

References DocLinkedWord::anchor(), endLink(), DocLinkedWord::file(), filter(), m_hide, DocLinkedWord::ref(), startLink(), and DocLinkedWord::word().

◆ operator()() [33/58]

void LatexDocVisitor::operator() ( const DocMscFile & df)

Definition at line 1491 of file latexdocvisitor.cpp.

1492{
1493 if (m_hide) return;
1494 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1495 startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1496 visitChildren(df);
1497 endMscFile(df.hasCaption());
1498}
void endMscFile(bool hasCaption)
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)

References Config_getBool, Config_getString, copyFile(), endMscFile(), DocDiagramFileBase::file(), DocDiagramFileBase::hasCaption(), DocDiagramFileBase::height(), m_hide, DocDiagramFileBase::srcFile(), DocDiagramFileBase::srcLine(), startMscFile(), stripPath(), visitChildren(), and DocDiagramFileBase::width().

◆ operator()() [34/58]

void LatexDocVisitor::operator() ( const DocPara & p)

Definition at line 785 of file latexdocvisitor.cpp.

786{
787 if (m_hide) return;
788 visitChildren(p);
789 if (!p.isLast() && // omit <p> for last paragraph
790 !(p.parent() && // and for parameter sections
791 std::get_if<DocParamSect>(p.parent())
792 )
793 )
794 {
795 if (insideTable())
796 {
797 m_t << "~\\newline\n";
798 }
799 else
800 {
801 m_t << "\n\n";
802 }
803 }
804}
bool isLast() const
Definition docnode.h:1088

References insideTable(), DocPara::isLast(), m_hide, m_t, DocNode::parent(), and visitChildren().

◆ operator()() [35/58]

void LatexDocVisitor::operator() ( const DocParamList & pl)

Definition at line 1658 of file latexdocvisitor.cpp.

1659{
1660 if (m_hide) return;
1662 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1663 if (sect)
1664 {
1665 parentType = sect->type();
1666 }
1667 bool useTable = parentType==DocParamSect::Param ||
1668 parentType==DocParamSect::RetVal ||
1669 parentType==DocParamSect::Exception ||
1670 parentType==DocParamSect::TemplateParam;
1671 if (!useTable)
1672 {
1673 m_t << "\\item[";
1674 }
1675 if (sect && sect->hasInOutSpecifier())
1676 {
1678 {
1679 m_t << "\\doxymbox{\\texttt{";
1680 if (pl.direction()==DocParamSect::In)
1681 {
1682 m_t << "in";
1683 }
1684 else if (pl.direction()==DocParamSect::Out)
1685 {
1686 m_t << "out";
1687 }
1688 else if (pl.direction()==DocParamSect::InOut)
1689 {
1690 m_t << "in,out";
1691 }
1692 m_t << "}} ";
1693 }
1694 if (useTable) m_t << " & ";
1695 }
1696 if (sect && sect->hasTypeSpecifier())
1697 {
1698 for (const auto &type : pl.paramTypes())
1699 {
1700 std::visit(*this,type);
1701 }
1702 if (useTable) m_t << " & ";
1703 }
1704 m_t << "{\\em ";
1705 bool first=TRUE;
1706 for (const auto &param : pl.parameters())
1707 {
1708 if (!first) m_t << ","; else first=FALSE;
1710 std::visit(*this,param);
1712 }
1713 m_t << "}";
1714 if (useTable)
1715 {
1716 m_t << " & ";
1717 }
1718 else
1719 {
1720 m_t << "]";
1721 }
1722 for (const auto &par : pl.paragraphs())
1723 {
1724 std::visit(*this,par);
1725 }
1726 if (useTable)
1727 {
1728 m_t << "\\\\\n"
1729 << "\\hline\n";
1730 }
1731}
const DocNodeList & parameters() const
Definition docnode.h:1129
const DocNodeList & paramTypes() const
Definition docnode.h:1130
DocParamSect::Direction direction() const
Definition docnode.h:1133
const DocNodeList & paragraphs() const
Definition docnode.h:1131
bool hasInOutSpecifier() const
Definition docnode.h:1069
bool hasTypeSpecifier() const
Definition docnode.h:1070
Type type() const
Definition docnode.h:1068

References DocParamList::direction(), DocParamSect::Exception, FALSE, DocParamSect::hasInOutSpecifier(), DocParamSect::hasTypeSpecifier(), DocParamSect::In, DocParamSect::InOut, m_hide, m_insideItem, m_t, DocParamSect::Out, DocParamList::paragraphs(), DocParamSect::Param, DocParamList::parameters(), DocParamList::paramTypes(), DocNode::parent(), DocParamSect::RetVal, DocParamSect::TemplateParam, TRUE, DocParamSect::type(), DocParamSect::Unknown, and DocParamSect::Unspecified.

◆ operator()() [36/58]

void LatexDocVisitor::operator() ( const DocParamSect & s)

Definition at line 1599 of file latexdocvisitor.cpp.

1600{
1601 if (m_hide) return;
1602 bool hasInOutSpecs = s.hasInOutSpecifier();
1603 bool hasTypeSpecs = s.hasTypeSpecifier();
1604 m_lcg.incUsedTableLevel();
1605 switch(s.type())
1606 {
1608 m_t << "\n\\begin{DoxyParams}";
1609 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1610 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1611 m_t << "{";
1613 break;
1615 m_t << "\n\\begin{DoxyRetVals}{";
1617 break;
1619 m_t << "\n\\begin{DoxyExceptions}{";
1621 break;
1623 m_t << "\n\\begin{DoxyTemplParams}{";
1625 break;
1626 default:
1627 ASSERT(0);
1629 }
1630 m_t << "}\n";
1631 visitChildren(s);
1632 m_lcg.decUsedTableLevel();
1633 switch(s.type())
1634 {
1636 m_t << "\\end{DoxyParams}\n";
1637 break;
1639 m_t << "\\end{DoxyRetVals}\n";
1640 break;
1642 m_t << "\\end{DoxyExceptions}\n";
1643 break;
1645 m_t << "\\end{DoxyTemplParams}\n";
1646 break;
1647 default:
1648 ASSERT(0);
1650 }
1651}
virtual QCString trExceptions()=0
virtual QCString trParameters()=0
virtual QCString trTemplateParameters()=0
virtual QCString trReturnValues()=0
#define ASSERT(x)
Definition qcstring.h:39

References ASSERT, decIndentLevel(), DocParamSect::Exception, filter(), DocParamSect::hasInOutSpecifier(), DocParamSect::hasTypeSpecifier(), incIndentLevel(), m_hide, m_lcg, m_t, DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, theTranslator, DocParamSect::type(), and visitChildren().

◆ operator()() [37/58]

void LatexDocVisitor::operator() ( const DocParBlock & pb)

Definition at line 1794 of file latexdocvisitor.cpp.

1795{
1796 if (m_hide) return;
1797 visitChildren(pb);
1798}

References m_hide, and visitChildren().

◆ operator()() [38/58]

void LatexDocVisitor::operator() ( const DocPlantUmlFile & df)

Definition at line 1509 of file latexdocvisitor.cpp.

1510{
1511 if (m_hide) return;
1512 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1513 startPlantUmlFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1514 visitChildren(df);
1516}
void startPlantUmlFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
void endPlantUmlFile(bool hasCaption)

References Config_getBool, Config_getString, copyFile(), endPlantUmlFile(), DocDiagramFileBase::file(), DocDiagramFileBase::hasCaption(), DocDiagramFileBase::height(), m_hide, DocDiagramFileBase::srcFile(), DocDiagramFileBase::srcLine(), startPlantUmlFile(), stripPath(), visitChildren(), and DocDiagramFileBase::width().

◆ operator()() [39/58]

void LatexDocVisitor::operator() ( const DocRef & ref)

Definition at line 1526 of file latexdocvisitor.cpp.

1527{
1528 if (m_hide) return;
1529 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1530 // ref.anchor() for LaTeX/RTF
1531 if (ref.isSubPage())
1532 {
1533 startLink(ref.ref(),QCString(),ref.anchor());
1534 }
1535 else
1536 {
1537 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1538 }
1539 if (!ref.hasLinkText())
1540 {
1541 filter(ref.targetTitle());
1542 }
1543 visitChildren(ref);
1544 if (ref.isSubPage())
1545 {
1546 endLink(ref.ref(),QCString(),ref.anchor());
1547 }
1548 else
1549 {
1550 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1551 }
1552}
QCString anchor() const
Definition docnode.h:785
SectionType sectionType() const
Definition docnode.h:787
QCString targetTitle() const
Definition docnode.h:786
bool isSubPage() const
Definition docnode.h:792
bool refToTable() const
Definition docnode.h:791
QCString file() const
Definition docnode.h:782
QCString ref() const
Definition docnode.h:784
bool refToSection() const
Definition docnode.h:790
bool hasLinkText() const
Definition docnode.h:788

References DocRef::anchor(), endLink(), DocRef::file(), filter(), DocRef::hasLinkText(), QCString::isEmpty(), DocRef::isSubPage(), m_hide, DocRef::ref(), DocRef::refToSection(), DocRef::refToTable(), DocRef::sectionType(), startLink(), DocRef::targetTitle(), and visitChildren().

◆ operator()() [40/58]

void LatexDocVisitor::operator() ( const DocRoot & r)

Definition at line 806 of file latexdocvisitor.cpp.

807{
808 visitChildren(r);
809}

References visitChildren().

◆ operator()() [41/58]

void LatexDocVisitor::operator() ( const DocSecRefItem & ref)

Definition at line 1554 of file latexdocvisitor.cpp.

1555{
1556 if (m_hide) return;
1557 m_t << "\\item \\contentsline{section}{";
1558 if (ref.isSubPage())
1559 {
1560 startLink(ref.ref(),QCString(),ref.anchor());
1561 }
1562 else
1563 {
1564 if (!ref.file().isEmpty())
1565 {
1566 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1567 }
1568 }
1569 visitChildren(ref);
1570 if (ref.isSubPage())
1571 {
1572 endLink(ref.ref(),QCString(),ref.anchor());
1573 }
1574 else
1575 {
1576 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1577 }
1578 m_t << "}{\\ref{";
1579 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1580 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1581 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1582 m_t << "}}{}\n";
1583}
bool refToTable() const
Definition docnode.h:943
QCString file() const
Definition docnode.h:939
QCString anchor() const
Definition docnode.h:940
QCString ref() const
Definition docnode.h:942
bool isSubPage() const
Definition docnode.h:944

References DocSecRefItem::anchor(), endLink(), DocSecRefItem::file(), QCString::isEmpty(), DocSecRefItem::isSubPage(), m_hide, m_t, DocSecRefItem::ref(), DocSecRefItem::refToTable(), startLink(), stripPath(), and visitChildren().

◆ operator()() [42/58]

void LatexDocVisitor::operator() ( const DocSecRefList & l)

Definition at line 1585 of file latexdocvisitor.cpp.

1586{
1587 if (m_hide) return;
1588 m_t << "\\footnotesize\n";
1589 m_t << "\\begin{multicols}{2}\n";
1590 m_t << "\\begin{DoxyCompactList}\n";
1592 visitChildren(l);
1594 m_t << "\\end{DoxyCompactList}\n";
1595 m_t << "\\end{multicols}\n";
1596 m_t << "\\normalsize\n";
1597}

References decIndentLevel(), incIndentLevel(), m_hide, m_t, and visitChildren().

◆ operator()() [43/58]

void LatexDocVisitor::operator() ( const DocSection & s)

Definition at line 987 of file latexdocvisitor.cpp.

988{
989 if (m_hide) return;
990 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
991 if (pdfHyperlinks)
992 {
993 m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
994 }
995 m_t << "\\" << getSectionName(s.level()) << "{";
996 if (pdfHyperlinks)
997 {
998 m_t << "\\texorpdfstring{";
999 }
1000 if (s.title())
1001 {
1002 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::TEX;
1003 std::visit(*this,*s.title());
1005 }
1006 if (pdfHyperlinks)
1007 {
1008 m_t << "}{";
1009 if (s.title())
1010 {
1011 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::PDF;
1012 std::visit(*this,*s.title());
1014 }
1015 m_t << "}";
1016 }
1017 m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
1018 visitChildren(s);
1019}
QCString file() const
Definition docnode.h:922
int level() const
Definition docnode.h:918
QCString anchor() const
Definition docnode.h:920
const DocNodeVariant * title() const
Definition docnode.h:919
@ TEX
called through texorpdf as TeX (first) part
@ NO
not called through texorpdf

References DocSection::anchor(), Config_getBool, DocSection::file(), getSectionName(), DocSection::level(), m_hide, m_t, m_texOrPdf, NO, PDF, stripPath(), TEX, DocSection::title(), and visitChildren().

◆ operator()() [44/58]

void LatexDocVisitor::operator() ( const DocSeparator & sep)

Definition at line 1653 of file latexdocvisitor.cpp.

1654{
1655 m_t << " " << sep.chars() << " ";
1656}
QCString chars() const
Definition docnode.h:369

References DocSeparator::chars(), and m_t.

◆ operator()() [45/58]

void LatexDocVisitor::operator() ( const DocSimpleList & l)

Definition at line 966 of file latexdocvisitor.cpp.

967{
968 if (m_hide) return;
969 m_t << "\\begin{DoxyItemize}\n";
970 m_listItemInfo[indentLevel()].isEnum = false;
971 visitChildren(l);
972 m_t << "\\end{DoxyItemize}\n";
973}

References indentLevel(), m_hide, m_listItemInfo, m_t, and visitChildren().

◆ operator()() [46/58]

void LatexDocVisitor::operator() ( const DocSimpleListItem & li)

Definition at line 975 of file latexdocvisitor.cpp.

976{
977 if (m_hide) return;
978 m_t << "\\item ";
980 if (li.paragraph())
981 {
982 visit(*this,*li.paragraph());
983 }
985}
const DocNodeVariant * paragraph() const
Definition docnode.h:1157

References decIndentLevel(), incIndentLevel(), m_hide, m_t, and DocSimpleListItem::paragraph().

◆ operator()() [47/58]

void LatexDocVisitor::operator() ( const DocSimpleSect & s)

Definition at line 811 of file latexdocvisitor.cpp.

812{
813 if (m_hide) return;
814 switch(s.type())
815 {
817 m_t << "\\begin{DoxySeeAlso}{";
819 break;
821 m_t << "\\begin{DoxyReturn}{";
823 break;
825 m_t << "\\begin{DoxyAuthor}{";
827 break;
829 m_t << "\\begin{DoxyAuthor}{";
831 break;
833 m_t << "\\begin{DoxyVersion}{";
835 break;
837 m_t << "\\begin{DoxySince}{";
839 break;
841 m_t << "\\begin{DoxyDate}{";
843 break;
845 m_t << "\\begin{DoxyNote}{";
847 break;
849 m_t << "\\begin{DoxyWarning}{";
851 break;
853 m_t << "\\begin{DoxyPrecond}{";
855 break;
857 m_t << "\\begin{DoxyPostcond}{";
859 break;
861 m_t << "\\begin{DoxyCopyright}{";
863 break;
865 m_t << "\\begin{DoxyInvariant}{";
867 break;
869 m_t << "\\begin{DoxyRemark}{";
871 break;
873 m_t << "\\begin{DoxyAttention}{";
875 break;
877 m_t << "\\begin{DoxyImportant}{";
879 break;
881 m_t << "\\begin{DoxyParagraph}{";
882 break;
884 m_t << "\\begin{DoxyParagraph}{";
885 break;
886 case DocSimpleSect::Unknown: break;
887 }
888
889 if (s.title())
890 {
892 std::visit(*this,*s.title());
894 }
895 m_t << "}\n";
897 visitChildren(s);
898 switch(s.type())
899 {
901 m_t << "\n\\end{DoxySeeAlso}\n";
902 break;
904 m_t << "\n\\end{DoxyReturn}\n";
905 break;
907 m_t << "\n\\end{DoxyAuthor}\n";
908 break;
910 m_t << "\n\\end{DoxyAuthor}\n";
911 break;
913 m_t << "\n\\end{DoxyVersion}\n";
914 break;
916 m_t << "\n\\end{DoxySince}\n";
917 break;
919 m_t << "\n\\end{DoxyDate}\n";
920 break;
922 m_t << "\n\\end{DoxyNote}\n";
923 break;
925 m_t << "\n\\end{DoxyWarning}\n";
926 break;
928 m_t << "\n\\end{DoxyPrecond}\n";
929 break;
931 m_t << "\n\\end{DoxyPostcond}\n";
932 break;
934 m_t << "\n\\end{DoxyCopyright}\n";
935 break;
937 m_t << "\n\\end{DoxyInvariant}\n";
938 break;
940 m_t << "\n\\end{DoxyRemark}\n";
941 break;
943 m_t << "\n\\end{DoxyAttention}\n";
944 break;
946 m_t << "\n\\end{DoxyImportant}\n";
947 break;
949 m_t << "\n\\end{DoxyParagraph}\n";
950 break;
952 m_t << "\n\\end{DoxyParagraph}\n";
953 break;
954 default:
955 break;
956 }
958}
Type type() const
Definition docnode.h:1026
const DocNodeVariant * title() const
Definition docnode.h:1033
virtual QCString trPrecondition()=0
virtual QCString trSince()=0
virtual QCString trVersion()=0
virtual QCString trReturns()=0
virtual QCString trRemarks()=0
virtual QCString trNote()=0
virtual QCString trPostcondition()=0
virtual QCString trAttention()=0
virtual QCString trCopyright()=0
virtual QCString trDate()=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
virtual QCString trWarning()=0
virtual QCString trSeeAlso()=0
virtual QCString trImportant()=0
virtual QCString trInvariant()=0

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, DocSimpleSect::Copyright, DocSimpleSect::Date, decIndentLevel(), FALSE, filter(), DocSimpleSect::Important, incIndentLevel(), DocSimpleSect::Invar, m_hide, m_insideItem, m_t, DocSimpleSect::Note, DocSimpleSect::Post, DocSimpleSect::Pre, DocSimpleSect::Rcs, DocSimpleSect::Remark, DocSimpleSect::Return, DocSimpleSect::See, DocSimpleSect::Since, theTranslator, DocSimpleSect::title(), TRUE, DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, visitChildren(), and DocSimpleSect::Warning.

◆ operator()() [48/58]

void LatexDocVisitor::operator() ( const DocSimpleSectSep & )

Definition at line 672 of file latexdocvisitor.cpp.

673{
674}

◆ operator()() [49/58]

void LatexDocVisitor::operator() ( const DocStyleChange & s)

Definition at line 350 of file latexdocvisitor.cpp.

351{
352 if (m_hide) return;
353 switch (s.style())
354 {
356 if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
357 break;
361 if (s.enable()) m_t << "\\sout{"; else m_t << "}";
362 break;
365 if (s.enable()) m_t << "\\uline{"; else m_t << "}";
366 break;
368 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
369 break;
373 if (s.enable()) m_t << "{\\ttfamily "; else m_t << "}";
374 break;
376 if (s.enable()) m_t << "\\textsubscript{"; else m_t << "}";
377 break;
379 if (s.enable()) m_t << "\\textsuperscript{"; else m_t << "}";
380 break;
382 if (s.enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
383 break;
385 if (s.enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
386 break;
388 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
389 break;
391 if (s.enable())
392 {
393 m_t << "\n\\begin{DoxyPre}";
395 }
396 else
397 {
399 m_t << "\\end{DoxyPre}\n";
400 }
401 break;
402 case DocStyleChange::Div: /* HTML only */ break;
403 case DocStyleChange::Span: /* HTML only */ break;
404 }
405}
Style style() const
Definition docnode.h:307
bool enable() const
Definition docnode.h:309

References DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Cite, DocStyleChange::Code, DocStyleChange::Del, DocStyleChange::Div, DocStyleChange::enable(), FALSE, DocStyleChange::Ins, DocStyleChange::Italic, DocStyleChange::Kbd, m_hide, m_insidePre, m_t, DocStyleChange::Preformatted, DocStyleChange::S, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::Strike, DocStyleChange::style(), DocStyleChange::Subscript, DocStyleChange::Superscript, TRUE, DocStyleChange::Typewriter, and DocStyleChange::Underline.

◆ operator()() [50/58]

void LatexDocVisitor::operator() ( const DocSymbol & s)

Definition at line 257 of file latexdocvisitor.cpp.

258{
259 if (m_hide) return;
260 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
261 const char *res = HtmlEntityMapper::instance().latex(s.symbol());
262 if (res)
263 {
265 {
266 if (pdfHyperlinks)
267 {
268 m_t << "\\texorpdfstring{$<$}{<}";
269 }
270 else
271 {
272 m_t << "$<$";
273 }
274 }
276 {
277 if (pdfHyperlinks)
278 {
279 m_t << "\\texorpdfstring{$>$}{>}";
280 }
281 else
282 {
283 m_t << "$>$";
284 }
285 }
286 else
287 {
288 m_t << res;
289 }
290 }
291 else
292 {
293 err("LaTeX: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(s.symbol(),TRUE));
294 }
295}
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:332
const char * latex(SymType symb) const
Access routine to the LaTeX code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.

References Config_getBool, err, HtmlEntityMapper::instance(), HtmlEntityMapper::latex(), m_hide, m_insidePre, m_t, HtmlEntityMapper::Sym_Greater, HtmlEntityMapper::Sym_gt, HtmlEntityMapper::Sym_Less, HtmlEntityMapper::Sym_lt, DocSymbol::symbol(), and TRUE.

◆ operator()() [51/58]

void LatexDocVisitor::operator() ( const DocText & t)

Definition at line 1774 of file latexdocvisitor.cpp.

1775{
1776 if (m_hide) return;
1777 visitChildren(t);
1778}

References m_hide, and visitChildren().

◆ operator()() [52/58]

void LatexDocVisitor::operator() ( const DocTitle & t)

Definition at line 960 of file latexdocvisitor.cpp.

961{
962 if (m_hide) return;
963 visitChildren(t);
964}

References m_hide, and visitChildren().

◆ operator()() [53/58]

void LatexDocVisitor::operator() ( const DocURL & u)

Definition at line 314 of file latexdocvisitor.cpp.

315{
316 if (m_hide) return;
317 if (Config_getBool(PDF_HYPERLINKS))
318 {
319 m_t << "\\href{";
320 if (u.isEmail()) m_t << "mailto:";
321 m_t << latexFilterURL(u.url()) << "}";
322 }
323 m_t << "{\\texttt{";
324 filter(u.url());
325 m_t << "}}";
326}
QCString url() const
Definition docnode.h:192
bool isEmail() const
Definition docnode.h:193

References Config_getBool, filter(), DocURL::isEmail(), latexFilterURL(), m_hide, m_t, and DocURL::url().

◆ operator()() [54/58]

void LatexDocVisitor::operator() ( const DocVerbatim & s)

Definition at line 407 of file latexdocvisitor.cpp.

408{
409 if (m_hide) return;
410 QCString lang = m_langExt;
411 if (!s.language().isEmpty()) // explicit language setting
412 {
413 lang = s.language();
414 }
415 SrcLangExt langExt = getLanguageFromCodeLang(lang);
416 switch(s.type())
417 {
419 {
420 m_ci.startCodeFragment("DoxyCode");
421 getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
422 Config_getBool(STRIP_CODE_COMMENTS),
423 CodeParserOptions().setExample(s.isExample(),s.exampleFile()));
424 m_ci.endCodeFragment("DoxyCode");
425 }
426 break;
428 filter(s.text(), true);
429 break;
431 m_t << "{\\ttfamily ";
432 filter(s.text(), true);
433 m_t << "}";
434 break;
436 if (isTableNested(s.parent())) // in table
437 {
438 m_t << "\\begin{DoxyCode}{0}";
439 filter(s.text(), true);
440 m_t << "\\end{DoxyCode}\n";
441 }
442 else
443 {
444 m_t << "\\begin{DoxyVerb}";
445 m_t << s.text();
446 m_t << "\\end{DoxyVerb}\n";
447 }
448 break;
454 /* nothing */
455 break;
457 m_t << s.text();
458 break;
459 case DocVerbatim::Dot:
460 {
461 bool exists = false;
462 auto fileName = writeFileContents(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_", // baseName
463 ".dot", // extension
464 s.text(), // contents
465 exists);
466 if (!fileName.isEmpty())
467 {
468 startDotFile(fileName,s.width(),s.height(),s.hasCaption(),s.srcFile(),s.srcLine(),!exists);
469 visitChildren(s);
471 }
472 }
473 break;
474 case DocVerbatim::Msc:
475 {
476 bool exists = false;
477 auto fileName = writeFileContents(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_", // baseName
478 ".msc", // extension
479 "msc {"+s.text()+"}", // contents
480 exists);
481 if (!fileName.isEmpty())
482 {
483 writeMscFile(fileName, s, !exists);
484 }
485 }
486 break;
488 {
489 QCString latexOutput = Config_getString(LATEX_OUTPUT);
490 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
491 latexOutput,s.exampleFile(),s.text(),
493 s.engine(),s.srcFile(),s.srcLine(),true);
494
495 for (const auto &baseName: baseNameVector)
496 {
497 writePlantUMLFile(baseName, s);
498 }
499 }
500 break;
501 }
502}
QCString srcFile() const
Definition docnode.h:397
int srcLine() const
Definition docnode.h:398
QCString height() const
Definition docnode.h:392
bool hasCaption() const
Definition docnode.h:390
QCString language() const
Definition docnode.h:388
bool isExample() const
Definition docnode.h:385
QCString context() const
Definition docnode.h:384
Type type() const
Definition docnode.h:382
QCString text() const
Definition docnode.h:383
QCString exampleFile() const
Definition docnode.h:386
QCString engine() const
Definition docnode.h:393
bool useBitmap() const
Definition docnode.h:394
@ JavaDocLiteral
Definition docnode.h:378
QCString width() const
Definition docnode.h:391
void writePlantUMLFile(const QCString &fileName, const DocVerbatim &s)
void writeMscFile(const QCString &fileName, const DocVerbatim &s, bool newFile=true)
StringVector writePlantUMLSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
Definition plantuml.cpp:31
static PlantumlManager & instance()
Definition plantuml.cpp:231
QCString writeFileContents(const QCString &baseName, const QCString &extension, const QCString &content, bool &exists)
Thread-safe function to write a string to a file.
Definition util.cpp:6928
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5182

References DocVerbatim::Code, Config_getBool, Config_getString, DocVerbatim::context(), DocVerbatim::DocbookOnly, DocVerbatim::Dot, endDotFile(), DocVerbatim::engine(), DocVerbatim::exampleFile(), filter(), DocVisitor::getCodeParser(), getLanguageFromCodeLang(), DocVerbatim::hasCaption(), DocVerbatim::height(), DocVerbatim::HtmlOnly, PlantumlManager::instance(), QCString::isEmpty(), DocVerbatim::isExample(), isTableNested(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocVerbatim::language(), DocVerbatim::LatexOnly, m_ci, m_hide, m_langExt, m_t, DocVerbatim::ManOnly, DocVerbatim::Msc, DocNode::parent(), CodeParserInterface::parseCode(), DocVerbatim::PlantUML, PlantumlManager::PUML_BITMAP, PlantumlManager::PUML_EPS, DocVerbatim::RtfOnly, DocVerbatim::srcFile(), DocVerbatim::srcLine(), startDotFile(), DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::useBitmap(), DocVerbatim::Verbatim, visitChildren(), DocVerbatim::width(), writeFileContents(), writeMscFile(), writePlantUMLFile(), PlantumlManager::writePlantUMLSource(), and DocVerbatim::XmlOnly.

◆ operator()() [55/58]

void LatexDocVisitor::operator() ( const DocVhdlFlow & )

Definition at line 1790 of file latexdocvisitor.cpp.

1791{
1792}

◆ operator()() [56/58]

void LatexDocVisitor::operator() ( const DocWhiteSpace & w)

Definition at line 244 of file latexdocvisitor.cpp.

245{
246 if (m_hide) return;
247 if (m_insidePre)
248 {
249 m_t << w.chars();
250 }
251 else
252 {
253 m_t << " ";
254 }
255}
QCString chars() const
Definition docnode.h:358

References DocWhiteSpace::chars(), m_hide, m_insidePre, and m_t.

◆ operator()() [57/58]

void LatexDocVisitor::operator() ( const DocWord & w)

Definition at line 230 of file latexdocvisitor.cpp.

231{
232 if (m_hide) return;
233 filter(w.word());
234}
QCString word() const
Definition docnode.h:156

References filter(), m_hide, and DocWord::word().

◆ operator()() [58/58]

void LatexDocVisitor::operator() ( const DocXRefItem & x)

Definition at line 1733 of file latexdocvisitor.cpp.

1734{
1735 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1736 if (m_hide) return;
1737 if (x.title().isEmpty()) return;
1739 m_t << "\\begin{DoxyRefDesc}{";
1740 filter(x.title());
1741 m_t << "}\n";
1742 bool anonymousEnum = x.file()=="@";
1743 m_t << "\\item[";
1744 if (pdfHyperlinks && !anonymousEnum)
1745 {
1746 m_t << "\\doxymbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1747 }
1748 else
1749 {
1750 m_t << "\\textbf{ ";
1751 }
1753 filter(x.title());
1755 if (pdfHyperlinks && !anonymousEnum)
1756 {
1757 m_t << "}";
1758 }
1759 m_t << "}]";
1760 visitChildren(x);
1761 if (x.title().isEmpty()) return;
1763 m_t << "\\end{DoxyRefDesc}\n";
1764}
QCString anchor() const
Definition docnode.h:625
QCString file() const
Definition docnode.h:624
QCString title() const
Definition docnode.h:626

References DocXRefItem::anchor(), Config_getBool, decIndentLevel(), FALSE, DocXRefItem::file(), filter(), incIndentLevel(), QCString::isEmpty(), m_hide, m_insideItem, m_t, stripPath(), DocXRefItem::title(), TRUE, and visitChildren().

◆ popTableState()

void LatexDocVisitor::popTableState ( )
inlineprivate

Definition at line 207 of file latexdocvisitor.h.

208 {
209 m_tableStateStack.pop();
210 }

References m_tableStateStack.

Referenced by operator()().

◆ pushTableState()

void LatexDocVisitor::pushTableState ( )
inlineprivate

Definition at line 203 of file latexdocvisitor.h.

204 {
205 m_tableStateStack.emplace();
206 }

References m_tableStateStack.

Referenced by operator()().

◆ rowSpans()

RowSpanList & LatexDocVisitor::rowSpans ( )
inlineprivate

Definition at line 223 of file latexdocvisitor.h.

224 {
225 return !m_tableStateStack.empty() ? m_tableStateStack.top().rowSpans : m_emptyRowSpanList;
226 }
RowSpanList m_emptyRowSpanList

References m_emptyRowSpanList, and m_tableStateStack.

Referenced by operator()(), and operator()().

◆ setCurrentColumn()

void LatexDocVisitor::setCurrentColumn ( size_t col)
inlineprivate

Definition at line 215 of file latexdocvisitor.h.

216 {
217 if (!m_tableStateStack.empty()) m_tableStateStack.top().currentColumn = col;
218 }

References m_tableStateStack.

Referenced by operator()(), and operator()().

◆ setNumCols()

void LatexDocVisitor::setNumCols ( size_t num)
inlineprivate

Definition at line 219 of file latexdocvisitor.h.

220 {
221 if (!m_tableStateStack.empty()) m_tableStateStack.top().numCols = num;
222 }

References m_tableStateStack.

Referenced by operator()().

◆ startDiaFile()

void LatexDocVisitor::startDiaFile ( const QCString & fileName,
const QCString & width,
const QCString & height,
bool hasCaption,
const QCString & srcFile,
int srcLine )
private

Definition at line 1939 of file latexdocvisitor.cpp.

1946{
1947 QCString baseName=makeBaseName(fileName,".dia");
1948 baseName.prepend("dia_");
1949
1950 QCString outDir = Config_getString(LATEX_OUTPUT);
1951 writeDiaGraphFromFile(fileName,outDir,baseName,DiaOutputFormat::EPS,srcFile,srcLine);
1952 visitPreStart(m_t,hasCaption, baseName, width, height);
1953}
QCString & prepend(const char *s)
Definition qcstring.h:422
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
Definition dia.cpp:26
QCString makeBaseName(const QCString &name, const QCString &ext)
Definition util.cpp:4918

References Config_getString, EPS, m_t, makeBaseName(), QCString::prepend(), visitPreStart(), and writeDiaGraphFromFile().

Referenced by operator()().

◆ startDotFile()

void LatexDocVisitor::startDotFile ( const QCString & fileName,
const QCString & width,
const QCString & height,
bool hasCaption,
const QCString & srcFile,
int srcLine,
bool newFile = true )
private

Definition at line 1885 of file latexdocvisitor.cpp.

1892{
1893 QCString baseName=makeBaseName(fileName,".dot");
1894 baseName.prepend("dot_");
1895 QCString outDir = Config_getString(LATEX_OUTPUT);
1896 if (newFile) writeDotGraphFromFile(fileName,outDir,baseName,GraphOutputFormat::EPS,srcFile,srcLine);
1897 visitPreStart(m_t,hasCaption, baseName, width, height);
1898}
void writeDotGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine)
Definition dot.cpp:230

References Config_getString, EPS, m_t, makeBaseName(), QCString::prepend(), visitPreStart(), and writeDotGraphFromFile().

Referenced by operator()(), and operator()().

◆ startLink()

void LatexDocVisitor::startLink ( const QCString & ref,
const QCString & file,
const QCString & anchor,
bool refToTable = false,
bool refToSection = false )
private

Definition at line 1813 of file latexdocvisitor.cpp.

1815{
1816 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1817 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1818 {
1819 if (refToTable)
1820 {
1821 m_t << "\\doxytablelink{";
1822 }
1823 else if (refToSection)
1824 {
1825 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1826 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxysectlink{";
1827 }
1828 else
1829 {
1830 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1831 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxylink{";
1832 }
1833 if (refToTable || m_texOrPdf != TexOrPdf::PDF)
1834 {
1835 if (!file.isEmpty()) m_t << stripPath(file);
1836 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1837 if (!anchor.isEmpty()) m_t << anchor;
1838 m_t << "}";
1839 }
1840 m_t << "{";
1841 }
1842 else if (ref.isEmpty() && refToSection)
1843 {
1844 m_t << "\\doxysectref{";
1845 }
1846 else if (ref.isEmpty() && refToTable)
1847 {
1848 m_t << "\\doxytableref{";
1849 }
1850 else if (ref.isEmpty()) // internal non-PDF link
1851 {
1852 m_t << "\\doxyref{";
1853 }
1854 else // external link
1855 {
1856 m_t << "\\textbf{ ";
1857 }
1858}

References Config_getBool, QCString::isEmpty(), m_t, m_texOrPdf, PDF, stripPath(), and TEX.

Referenced by operator()(), operator()(), operator()(), operator()(), and operator()().

◆ startMscFile()

void LatexDocVisitor::startMscFile ( const QCString & fileName,
const QCString & width,
const QCString & height,
bool hasCaption,
const QCString & srcFile,
int srcLine )
private

Definition at line 1906 of file latexdocvisitor.cpp.

1913{
1914 QCString baseName=makeBaseName(fileName,".msc");
1915 baseName.prepend("msc_");
1916
1917 QCString outDir = Config_getString(LATEX_OUTPUT);
1918 writeMscGraphFromFile(fileName,outDir,baseName,MscOutputFormat::EPS,srcFile,srcLine);
1919 visitPreStart(m_t,hasCaption, baseName, width, height);
1920}
void writeMscGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, MscOutputFormat format, const QCString &srcFile, int srcLine)
Definition msc.cpp:157

References Config_getString, EPS, m_t, makeBaseName(), QCString::prepend(), visitPreStart(), and writeMscGraphFromFile().

Referenced by operator()().

◆ startPlantUmlFile()

void LatexDocVisitor::startPlantUmlFile ( const QCString & fileName,
const QCString & width,
const QCString & height,
bool hasCaption,
const QCString & srcFile,
int srcLine )
private

Definition at line 1976 of file latexdocvisitor.cpp.

1983{
1984 QCString outDir = Config_getString(LATEX_OUTPUT);
1985 std::string inBuf;
1986 readInputFile(fileName,inBuf);
1987
1988 bool useBitmap = inBuf.find("@startditaa") != std::string::npos;
1989 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
1990 outDir,QCString(),inBuf,
1992 QCString(),srcFile,srcLine,false);
1993 bool first = true;
1994 for (const auto &bName: baseNameVector)
1995 {
1996 QCString baseName = makeBaseName(bName,".pu");
1997 QCString shortName = stripPath(baseName);
1998 if (useBitmap)
1999 {
2000 if (shortName.find('.')==-1) shortName += ".png";
2001 }
2004 if (!first) endPlantUmlFile(hasCaption);
2005 first = false;
2006 visitPreStart(m_t,hasCaption, shortName, width, height);
2007 }
2008}
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition plantuml.cpp:202
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
bool readInputFile(const QCString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
Definition util.cpp:5503

References Config_getString, endPlantUmlFile(), QCString::find(), PlantumlManager::generatePlantUMLOutput(), PlantumlManager::instance(), m_t, makeBaseName(), PlantumlManager::PUML_BITMAP, PlantumlManager::PUML_EPS, readInputFile(), stripPath(), visitPreStart(), and PlantumlManager::writePlantUMLSource().

Referenced by operator()().

◆ visitCaption()

void LatexDocVisitor::visitCaption ( const DocNodeList & children)
private

Definition at line 210 of file latexdocvisitor.cpp.

211{
212 for (const auto &n : children)
213 {
214 std::visit(*this,n);
215 }
216}

Referenced by writeMscFile(), and writePlantUMLFile().

◆ visitChildren()

◆ writeEndTableCommand()

void LatexDocVisitor::writeEndTableCommand ( const DocNodeVariant * n)
private

Definition at line 1203 of file latexdocvisitor.cpp.

1204{
1205 if (isTableNested(n))
1206 {
1207 m_t << "\\end{DoxyTableNested}\n";
1208 }
1209 else
1210 {
1211 m_t << "\\end{DoxyTable}\n";
1212 }
1213}

References isTableNested(), and m_t.

Referenced by operator()().

◆ writeMscFile()

void LatexDocVisitor::writeMscFile ( const QCString & fileName,
const DocVerbatim & s,
bool newFile = true )
private

Definition at line 1929 of file latexdocvisitor.cpp.

1930{
1931 QCString shortName=makeBaseName(fileName,".msc");
1932 QCString outDir = Config_getString(LATEX_OUTPUT);
1933 if (newFile) writeMscGraphFromFile(fileName,outDir,shortName,MscOutputFormat::EPS,s.srcFile(),s.srcLine());
1934 visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
1937}
const DocNodeList & children() const
Definition docnode.h:395
void visitCaption(const DocNodeList &children)

References DocVerbatim::children(), Config_getString, EPS, DocVerbatim::hasCaption(), DocVerbatim::height(), m_t, makeBaseName(), DocVerbatim::srcFile(), DocVerbatim::srcLine(), visitCaption(), visitPostEnd(), visitPreStart(), DocVerbatim::width(), and writeMscGraphFromFile().

Referenced by operator()().

◆ writePlantUMLFile()

void LatexDocVisitor::writePlantUMLFile ( const QCString & fileName,
const DocVerbatim & s )
private

◆ writeStartTableCommand()

void LatexDocVisitor::writeStartTableCommand ( const DocNodeVariant * n,
size_t cols )
private

Definition at line 1191 of file latexdocvisitor.cpp.

1192{
1193 if (isTableNested(n))
1194 {
1195 m_t << "\\begin{DoxyTableNested}{" << cols << "}";
1196 }
1197 else
1198 {
1199 m_t << "\n\\begin{DoxyTable}{" << cols << "}";
1200 }
1201}

References isTableNested(), and m_t.

Referenced by operator()().

Member Data Documentation

◆ m_ci

OutputCodeList& LatexDocVisitor::m_ci
private

Definition at line 175 of file latexdocvisitor.h.

Referenced by LatexDocVisitor(), operator()(), operator()(), and operator()().

◆ m_emptyRowSpanList

RowSpanList LatexDocVisitor::m_emptyRowSpanList
private

Definition at line 191 of file latexdocvisitor.h.

Referenced by rowSpans().

◆ m_hide

◆ m_hierarchyLevel

int LatexDocVisitor::m_hierarchyLevel
private

Definition at line 181 of file latexdocvisitor.h.

Referenced by getSectionName(), and LatexDocVisitor().

◆ m_indentLevel

int LatexDocVisitor::m_indentLevel = 0
private

◆ m_insideItem

bool LatexDocVisitor::m_insideItem
private

◆ m_insidePre

bool LatexDocVisitor::m_insidePre
private

Definition at line 177 of file latexdocvisitor.h.

Referenced by filter(), LatexDocVisitor(), operator()(), operator()(), and operator()().

◆ m_langExt

QCString LatexDocVisitor::m_langExt
private

Definition at line 180 of file latexdocvisitor.h.

Referenced by LatexDocVisitor(), operator()(), and operator()().

◆ m_lcg

LatexCodeGenerator& LatexDocVisitor::m_lcg
private

Definition at line 176 of file latexdocvisitor.h.

Referenced by filter(), isTableNested(), LatexDocVisitor(), and operator()().

◆ m_listItemInfo

LatexListItemInfo LatexDocVisitor::m_listItemInfo[maxIndentLevels]
private

Definition at line 201 of file latexdocvisitor.h.

Referenced by operator()(), operator()(), operator()(), and operator()().

◆ m_t

◆ m_tableStateStack

std::stack<TableState> LatexDocVisitor::m_tableStateStack
private

◆ m_texOrPdf

TexOrPdf LatexDocVisitor::m_texOrPdf = TexOrPdf::NO
private

Definition at line 182 of file latexdocvisitor.h.

Referenced by endLink(), operator()(), operator()(), and startLink().

◆ maxIndentLevels

const int LatexDocVisitor::maxIndentLevels = 13
staticprivate

Definition at line 193 of file latexdocvisitor.h.

Referenced by incIndentLevel(), indentLevel(), operator()(), and operator()().


The documentation for this class was generated from the following files: