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)
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)
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 240 of file latexdocvisitor.cpp.

242 : m_t(t), m_ci(ci), m_lcg(lcg), m_insidePre(FALSE),
244 m_langExt(langExt), m_hierarchyLevel(hierarchyLevel)
245{
246}
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 2083 of file latexdocvisitor.cpp.

2084{
2085 if (m_indentLevel>0)
2086 {
2087 m_indentLevel--;
2088 }
2089}

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 2008 of file latexdocvisitor.cpp.

2009{
2010 if (m_hide) return;
2011 visitPostEnd(m_t,hasCaption);
2012}
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 1952 of file latexdocvisitor.cpp.

1953{
1954 if (m_hide) return;
1955 visitPostEnd(m_t,hasCaption);
1956}

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 1911 of file latexdocvisitor.cpp.

1912{
1913 m_t << "}";
1914 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1915 if (ref.isEmpty() && !pdfHyperLinks)
1916 {
1917 m_t << "{";
1919 m_t << "}{" << file;
1920 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1921 m_t << anchor << "}";
1922 if (refToSection)
1923 {
1924 m_t << "{" << sectionType.level() << "}";
1925 }
1926 }
1927 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1928 {
1929 if (refToSection)
1930 {
1931 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1932 }
1933 }
1934}
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 1974 of file latexdocvisitor.cpp.

1975{
1976 if (m_hide) return;
1977 visitPostEnd(m_t,hasCaption);
1978}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endPlantUmlFile()

void LatexDocVisitor::endPlantUmlFile ( bool hasCaption)
private

Definition at line 2063 of file latexdocvisitor.cpp.

2064{
2065 if (m_hide) return;
2066 visitPostEnd(m_t,hasCaption);
2067}

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 1851 of file latexdocvisitor.cpp.

1852{
1853 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
1855 m_lcg.insideTabbing(),
1858 m_lcg.usedTableLevel()>0, // insideTable
1859 false, // keepSpaces
1860 retainNewLine
1861 );
1862}
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 59 of file latexdocvisitor.cpp.

60{
61 bool compactLatex = Config_getBool(COMPACT_LATEX);
62 int l = level;
63 if (compactLatex) l++;
64
65 if (l < g_maxLevels)
66 {
67 l += m_hierarchyLevel; /* May be -1 if generating main page */
68 // Sections get special treatment because they inherit the parent's level
69 if (l >= g_maxLevels)
70 {
71 l = g_maxLevels - 1;
72 }
73 else if (l < 0)
74 {
75 /* Should not happen; level is always >= 1 and hierarchyLevel >= -1 */
76 l = 0;
77 }
78 return g_secLabels[l];
79 }
80 else if (l == 7)
81 {
82 return g_paragraphLabel;
83 }
84 else
85 {
87 }
88}
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 2074 of file latexdocvisitor.cpp.

2075{
2076 m_indentLevel++;
2078 {
2079 err("Maximum indent level ({}) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2080 }
2081}
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 2069 of file latexdocvisitor.cpp.

2070{
2071 return std::min(m_indentLevel,maxIndentLevels-1);
2072}

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 1231 of file latexdocvisitor.cpp.

1232{
1233 bool isNested=m_lcg.usedTableLevel()>0;
1234 while (n && !isNested)
1235 {
1237 n = ::parent(n);
1238 }
1239 return isNested;
1240}
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 555 of file latexdocvisitor.cpp.

556{
557 if (m_hide) return;
558 m_t << "\\label{" << stripPath(anc.file()) << "_" << anc.anchor() << "}%\n";
559 if (!anc.file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
560 {
561 m_t << "\\Hypertarget{" << stripPath(anc.file()) << "_" << anc.anchor()
562 << "}%\n";
563 }
564}
QCString anchor() const
Definition docnode.h:232
QCString file() const
Definition docnode.h:233
QCString stripPath(const QCString &s)
Definition util.cpp:4890

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 790 of file latexdocvisitor.cpp.

791{
792 if (m_hide) return;
793 if (m_indentLevel>=maxIndentLevels-1) return;
794 if (l.isEnumList())
795 {
796 m_t << "\n\\begin{DoxyEnumerate}";
797 m_listItemInfo[indentLevel()].isEnum = true;
798 }
799 else
800 {
801 m_listItemInfo[indentLevel()].isEnum = false;
802 m_t << "\n\\begin{DoxyItemize}";
803 }
804 visitChildren(l);
805 if (l.isEnumList())
806 {
807 m_t << "\n\\end{DoxyEnumerate}";
808 }
809 else
810 {
811 m_t << "\n\\end{DoxyItemize}";
812 }
813}
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 815 of file latexdocvisitor.cpp.

816{
817 if (m_hide) return;
818 switch (li.itemNumber())
819 {
820 case DocAutoList::Unchecked: // unchecked
821 m_t << "\n\\item[\\DoxyUnchecked] ";
822 break;
823 case DocAutoList::Checked_x: // checked with x
824 case DocAutoList::Checked_X: // checked with X
825 m_t << "\n\\item[\\DoxyChecked] ";
826 break;
827 default:
828 m_t << "\n\\item ";
829 break;
830 }
832 visitChildren(li);
834}
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 727 of file latexdocvisitor.cpp.

728{
729 if (m_hide) return;
730 auto opt = cite.option();
731 QCString txt;
732 if (opt.noCite())
733 {
734 if (!cite.file().isEmpty())
735 {
736 txt = cite.getText();
737 }
738 else
739 {
740 if (!opt.noPar()) txt += "[";
741 txt += cite.target();
742 if (!opt.noPar()) txt += "]";
743 }
744 m_t << "{\\bfseries ";
745 filter(txt);
746 m_t << "}";
747 }
748 else
749 {
750 if (!cite.file().isEmpty())
751 {
752 QCString anchor = cite.anchor();
753 QCString anchorPrefix = CitationManager::instance().anchorPrefix();
754 anchor = anchor.mid(anchorPrefix.length()); // strip prefix
755
756 txt = "\\DoxyCite{" + anchor + "}";
757 if (opt.isNumber())
758 {
759 txt += "{number}";
760 }
761 else if (opt.isShortAuthor())
762 {
763 txt += "{shortauthor}";
764 }
765 else if (opt.isYear())
766 {
767 txt += "{year}";
768 }
769 if (!opt.noPar()) txt += "{1}";
770 else txt += "{0}";
771
772 m_t << txt;
773 }
774 else
775 {
776 if (!opt.noPar()) txt += "[";
777 txt += cite.target();
778 if (!opt.noPar()) txt += "]";
779 m_t << "{\\bfseries ";
780 filter(txt);
781 m_t << "}";
782 }
783 }
784}
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 1551 of file latexdocvisitor.cpp.

1552{
1553 if (m_hide) return;
1554 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1555 startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1556 visitChildren(df);
1557 endDiaFile(df.hasCaption());
1558}
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:5809

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 1533 of file latexdocvisitor.cpp.

1534{
1535 if (m_hide) return;
1536 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1537 startDotFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1538 visitChildren(df);
1539 endDotFile(df.hasCaption());
1540}
void endDotFile(bool hasCaption)
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)

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 319 of file latexdocvisitor.cpp.

320{
321 if (m_hide) return;
322 QCString emojiName = EmojiEntityMapper::instance().name(s.index());
323 if (!emojiName.isEmpty())
324 {
325 QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
326 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxygenemoji{";
327 filter(emojiName);
328 if (m_texOrPdf != TexOrPdf::PDF) m_t << "}{" << imageName << "}";
329 }
330 else
331 {
332 m_t << s.name();
333 }
334}
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 694 of file latexdocvisitor.cpp.

695{
696 if (m_hide) return;
697 QCString s = f.text();
698 const char *p = s.data();
699 char c = 0;
700 if (p)
701 {
702 while ((c=*p++))
703 {
704 switch (c)
705 {
706 case '\'': m_t << "\\textnormal{\\textquotesingle}"; break;
707 default: m_t << c; break;
708 }
709 }
710 }
711}
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 363 of file latexdocvisitor.cpp.

364{
365 if (m_hide) return;
366 if (insideTable())
367 m_t << "\\DoxyHorRuler{1}\n";
368 else
369 m_t << "\\DoxyHorRuler{0}\n";
370}
bool insideTable() const

References insideTable(), m_hide, and m_t.

◆ operator()() [10/58]

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

Definition at line 1462 of file latexdocvisitor.cpp.

1463{
1464 if (m_hide) return;
1465 if (Config_getBool(PDF_HYPERLINKS))
1466 {
1467 m_t << "\\href{";
1468 m_t << latexFilterURL(href.url());
1469 m_t << "}";
1470 }
1471 m_t << "{\\texttt{";
1472 visitChildren(href);
1473 m_t << "}}";
1474}
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 1831 of file latexdocvisitor.cpp.

1832{
1833 if (m_hide) return;
1834 m_t << "\\begin{quote}\n";
1836 visitChildren(q);
1837 m_t << "\\end{quote}\n";
1839}

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

◆ operator()() [12/58]

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

Definition at line 1311 of file latexdocvisitor.cpp.

1312{
1313 if (m_hide) return;
1314 visitChildren(c);
1315}

References m_hide, and visitChildren().

◆ operator()() [13/58]

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

Definition at line 1347 of file latexdocvisitor.cpp.

1348{
1349 if (m_hide) return;
1350 //printf("Cell(r=%u,c=%u) rowSpan=%d colSpan=%d currentColumn()=%zu\n",c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),currentColumn());
1351
1353
1354 QCString cellOpts;
1355 QCString cellSpec;
1356 auto appendOpt = [&cellOpts](const QCString &s)
1357 {
1358 if (!cellOpts.isEmpty()) cellOpts+=",";
1359 cellOpts+=s;
1360 };
1361 auto appendSpec = [&cellSpec](const QCString &s)
1362 {
1363 if (!cellSpec.isEmpty()) cellSpec+=",";
1364 cellSpec+=s;
1365 };
1366 auto writeCell = [this,&cellOpts,&cellSpec]()
1367 {
1368 if (!cellOpts.isEmpty() || !cellSpec.isEmpty())
1369 {
1370 m_t << "\\SetCell";
1371 if (!cellOpts.isEmpty())
1372 {
1373 m_t << "[" << cellOpts << "]";
1374 }
1375 m_t << "{" << cellSpec << "}";
1376 }
1377 };
1378
1379 // skip over columns that have a row span starting at an earlier row
1380 for (const auto &span : rowSpans())
1381 {
1382 //printf("span(r=%u,c=%u): column=%zu colSpan=%zu,rowSpan=%zu currentColumn()=%zu\n",
1383 // span.cell.rowIndex(),span.cell.columnIndex(),
1384 // span.column,span.colSpan,span.rowSpan,
1385 // currentColumn());
1386 if (span.rowSpan>0 && span.column==currentColumn())
1387 {
1388 setCurrentColumn(currentColumn()+span.colSpan);
1389 for (size_t i=0;i<span.colSpan;i++)
1390 {
1391 m_t << "&";
1392 }
1393 }
1394 }
1395
1396 int cs = c.colSpan();
1397 int ha = c.alignment();
1398 int rs = c.rowSpan();
1399 int va = c.valignment();
1400
1401 switch (ha) // horizontal alignment
1402 {
1403 case DocHtmlCell::Right:
1404 appendSpec("r");
1405 break;
1407 appendSpec("c");
1408 break;
1409 default:
1410 // default
1411 break;
1412 }
1413 if (rs>0) // row span
1414 {
1415 appendOpt("r="+QCString().setNum(rs));
1416 //printf("adding row span: cell={r=%d c=%d rs=%d cs=%d} curCol=%zu\n",
1417 // c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),
1418 // currentColumn());
1420 }
1421 if (cs>1) // column span
1422 {
1423 // update column to the end of the span, needs to be done *after* calling addRowSpan()
1425 appendOpt("c="+QCString().setNum(cs));
1426 }
1427 if (c.isHeading())
1428 {
1429 appendSpec("bg=\\tableheadbgcolor");
1430 appendSpec("font=\\bfseries");
1431 }
1432 switch(va) // vertical alignment
1433 {
1434 case DocHtmlCell::Top:
1435 appendSpec("h");
1436 break;
1438 appendSpec("f");
1439 break;
1441 // default
1442 break;
1443 }
1444 writeCell();
1445
1446 visitChildren(c);
1447
1448 for (int i=0;i<cs-1;i++)
1449 {
1450 m_t << "&"; // placeholder for invisible cell
1451 }
1452
1453 if (!c.isLast()) m_t << "&";
1454}
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 1222 of file latexdocvisitor.cpp.

1223{
1225 if (!m_insideItem) m_t << "\\hfill";
1226 m_t << " \\\\\n";
1227 visitChildren(dd);
1229}

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

◆ operator()() [15/58]

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

Definition at line 1188 of file latexdocvisitor.cpp.

1189{
1190 if (m_hide) return;
1191 bool eq = classEqualsReflist(dl);
1192 if (eq)
1193 {
1194 m_t << "\n\\begin{DoxyRefList}";
1195 }
1196 else
1197 {
1198 if (listIsNested(dl)) m_t << "\n\\hfill";
1199 m_t << "\n\\begin{DoxyDescription}";
1200 }
1201 visitChildren(dl);
1202 if (eq)
1203 {
1204 m_t << "\n\\end{DoxyRefList}";
1205 }
1206 else
1207 {
1208 m_t << "\n\\end{DoxyDescription}";
1209 }
1210}
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 1212 of file latexdocvisitor.cpp.

1213{
1214 if (m_hide) return;
1215 m_t << "\n\\item[{\\parbox[t]{\\linewidth}{";
1217 visitChildren(dt);
1219 m_t << "}}]";
1220}
#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 1484 of file latexdocvisitor.cpp.

1485{
1486 if (m_hide) return;
1487 m_t << "\n\n";
1488 auto summary = d.summary();
1489 if (summary)
1490 {
1491 std::visit(*this,*summary);
1492 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1493 }
1494 visitChildren(d);
1495 if (summary)
1496 {
1497 m_t << "\\end{adjustwidth}\n";
1498 }
1499 else
1500 {
1501 m_t << "\n\n";
1502 }
1503}
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 1505 of file latexdocvisitor.cpp.

1506{
1507 if (m_hide) return;
1508 m_t << "\\" << getSectionName(header.level()) << "*{";
1509 visitChildren(header);
1510 m_t << "}";
1511}
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 1072 of file latexdocvisitor.cpp.

1073{
1074 if (m_hide) return;
1075 if (m_indentLevel>=maxIndentLevels-1) return;
1077 if (s.type()==DocHtmlList::Ordered)
1078 {
1079 bool first = true;
1080 m_t << "\n\\begin{DoxyEnumerate}";
1081 for (const auto &opt : s.attribs())
1082 {
1083 if (opt.name=="type")
1084 {
1085 if (opt.value=="1")
1086 {
1087 m_t << (first ? "[": ",");
1088 m_t << "label=\\arabic*";
1089 first = false;
1090 }
1091 else if (opt.value=="a")
1092 {
1093 m_t << (first ? "[": ",");
1094 m_t << "label=\\enumalphalphcnt*";
1095 first = false;
1096 }
1097 else if (opt.value=="A")
1098 {
1099 m_t << (first ? "[": ",");
1100 m_t << "label=\\enumAlphAlphcnt*";
1101 first = false;
1102 }
1103 else if (opt.value=="i")
1104 {
1105 m_t << (first ? "[": ",");
1106 m_t << "label=\\roman*";
1107 first = false;
1108 }
1109 else if (opt.value=="I")
1110 {
1111 m_t << (first ? "[": ",");
1112 m_t << "label=\\Roman*";
1113 first = false;
1114 }
1115 }
1116 else if (opt.name=="start")
1117 {
1118 m_t << (first ? "[": ",");
1119 bool ok = false;
1120 int val = opt.value.toInt(&ok);
1121 if (ok) m_t << "start=" << val;
1122 first = false;
1123 }
1124 }
1125 if (!first) m_t << "]\n";
1126 }
1127 else
1128 {
1129 m_t << "\n\\begin{DoxyItemize}";
1130 }
1131 visitChildren(s);
1132 if (m_indentLevel>=maxIndentLevels-1) return;
1133 if (s.type()==DocHtmlList::Ordered)
1134 m_t << "\n\\end{DoxyEnumerate}";
1135 else
1136 m_t << "\n\\end{DoxyItemize}";
1137}
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 1139 of file latexdocvisitor.cpp.

1140{
1141 if (m_hide) return;
1142 if (m_listItemInfo[indentLevel()].isEnum)
1143 {
1144 for (const auto &opt : l.attribs())
1145 {
1146 if (opt.name=="value")
1147 {
1148 bool ok = false;
1149 int val = opt.value.toInt(&ok);
1150 if (ok)
1151 {
1152 m_t << "\n\\setcounter{DoxyEnumerate" << integerToRoman(indentLevel()+1,false) << "}{" << (val - 1) << "}";
1153 }
1154 }
1155 }
1156 }
1157 m_t << "\n\\item ";
1159 visitChildren(l);
1161}
const HtmlAttribList & attribs() const
Definition docnode.h:1170
QCString integerToRoman(int n, bool upper)
Definition util.cpp:6648

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 1317 of file latexdocvisitor.cpp.

1318{
1319 if (m_hide) return;
1321
1322 visitChildren(row);
1323
1324 m_t << "\\\\";
1325
1326 size_t col = 1;
1327 for (auto &span : rowSpans())
1328 {
1329 if (span.rowSpan>0) span.rowSpan--;
1330 if (span.rowSpan<=0)
1331 {
1332 // inactive span
1333 }
1334 else if (span.column>col)
1335 {
1336 col = span.column+span.colSpan;
1337 }
1338 else
1339 {
1340 col = span.column+span.colSpan;
1341 }
1342 }
1343
1344 m_t << "\n";
1345}

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

◆ operator()() [22/58]

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

Definition at line 1476 of file latexdocvisitor.cpp.

1477{
1478 if (m_hide) return;
1479 m_t << "{\\bfseries{";
1480 visitChildren(d);
1481 m_t << "}}";
1482}

References m_hide, m_t, and visitChildren().

◆ operator()() [23/58]

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

Definition at line 1266 of file latexdocvisitor.cpp.

1267{
1268 if (m_hide) return;
1270 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1271 if (c)
1272 {
1273 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1274 if (!c->file().isEmpty() && pdfHyperLinks)
1275 {
1276 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1277 << "}{}";
1278 }
1279 m_t << "\n";
1280 }
1281
1283 if (!isTableNested(t.parent()))
1284 {
1285 // write caption
1286 m_t << "{";
1287 if (c)
1288 {
1289 std::visit(*this, *t.caption());
1290 }
1291 m_t << "}";
1292 // write label
1293 m_t << "{";
1294 if (c && (!stripPath(c->file()).isEmpty() || !c->anchor().isEmpty()))
1295 {
1296 m_t << stripPath(c->file()) << "_" << c->anchor();
1297 }
1298 m_t << "}";
1299 }
1300
1301 // write head row(s)
1302 m_t << "{" << t.numberHeaderRows() << "}\n";
1303
1305
1306 visitChildren(t);
1308 popTableState();
1309}
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 1513 of file latexdocvisitor.cpp.

1514{
1515 if (img.type()==DocImage::Latex)
1516 {
1517 if (m_hide) return;
1518 QCString gfxName = img.name();
1519 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1520 {
1521 gfxName=gfxName.left(gfxName.length()-4);
1522 }
1523
1524 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1525 visitChildren(img);
1527 }
1528 else // other format -> skip
1529 {
1530 }
1531}
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 566 of file latexdocvisitor.cpp.

567{
568 if (m_hide) return;
570 switch(inc.type())
571 {
573 {
574 m_ci.startCodeFragment("DoxyCodeInclude");
575 FileInfo cfi( inc.file().str() );
576 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
578 inc.text(),
579 langExt,
580 inc.stripCodeComments(),
581 CodeParserOptions()
582 .setExample(inc.isExample(), inc.exampleFile())
583 .setFileDef(fd.get())
584 .setInlineFragment(true)
585 );
586 m_ci.endCodeFragment("DoxyCodeInclude");
587 }
588 break;
590 {
591 m_ci.startCodeFragment("DoxyCodeInclude");
593 inc.text(),langExt,
594 inc.stripCodeComments(),
595 CodeParserOptions()
596 .setExample(inc.isExample(), inc.exampleFile())
597 .setInlineFragment(true)
598 .setShowLineNumbers(false)
599 );
600 m_ci.endCodeFragment("DoxyCodeInclude");
601 }
602 break;
610 break;
612 m_t << inc.text();
613 break;
615 if (isTableNested(inc.parent())) // in table
616 {
617 m_t << "\\begin{DoxyCode}{0}";
618 filter(inc.text(), true);
619 m_t << "\\end{DoxyCode}\n";
620 }
621 else
622 {
623 m_t << "\n\\begin{DoxyVerbInclude}\n";
624 m_t << inc.text();
625 m_t << "\\end{DoxyVerbInclude}\n";
626 }
627 break;
630 {
631 m_ci.startCodeFragment("DoxyCodeInclude");
633 inc.file(),
634 inc.blockId(),
635 inc.context(),
637 inc.trimLeft(),
639 );
640 m_ci.endCodeFragment("DoxyCodeInclude");
641 }
642 break;
643 }
644}
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:5147

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 646 of file latexdocvisitor.cpp.

647{
648 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
649 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
650 if (op.isFirst())
651 {
652 if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
654 m_hide = TRUE;
655 }
656 QCString locLangExt = getFileNameExtension(op.includeFileName());
657 if (locLangExt.isEmpty()) locLangExt = m_langExt;
658 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
659 if (op.type()!=DocIncOperator::Skip)
660 {
661 m_hide = popHidden();
662 if (!m_hide)
663 {
664 std::unique_ptr<FileDef> fd;
665 if (!op.includeFileName().isEmpty())
666 {
667 FileInfo cfi( op.includeFileName().str() );
668 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
669 }
670
671 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
673 CodeParserOptions()
674 .setExample(op.isExample(),op.exampleFile())
675 .setFileDef(fd.get())
676 .setStartLine(op.line())
677 .setShowLineNumbers(op.showLineNo())
678 );
679 }
681 m_hide=TRUE;
682 }
683 if (op.isLast())
684 {
686 if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
687 }
688 else
689 {
690 if (!m_hide) m_t << "\n";
691 }
692}
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:5189

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 713 of file latexdocvisitor.cpp.

714{
715 if (m_hide) return;
716 m_t << "\\index{";
718 m_t << "@{";
720 m_t << "}}";
721}
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 1456 of file latexdocvisitor.cpp.

1457{
1458 if (m_hide) return;
1459 visitChildren(i);
1460}

References m_hide, and visitChildren().

◆ operator()() [29/58]

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

Definition at line 1817 of file latexdocvisitor.cpp.

1818{
1819 if (m_hide) return;
1820 startLink(QCString(),ref.file(),ref.anchor());
1821 visitChildren(ref);
1822 endLink(QCString(),ref.file(),ref.anchor());
1823}
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 350 of file latexdocvisitor.cpp.

351{
352 if (m_hide) return;
353 if (m_insideItem)
354 {
355 m_t << "\\\\\n";
356 }
357 else
358 {
359 m_t << "~\\newline\n";
360 }
361}

References m_hide, m_insideItem, and m_t.

◆ operator()() [31/58]

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

Definition at line 1569 of file latexdocvisitor.cpp.

1570{
1571 if (m_hide) return;
1572 startLink(lnk.ref(),lnk.file(),lnk.anchor());
1573 visitChildren(lnk);
1574 endLink(lnk.ref(),lnk.file(),lnk.anchor());
1575}

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 258 of file latexdocvisitor.cpp.

259{
260 if (m_hide) return;
261 startLink(w.ref(),w.file(),w.anchor());
262 filter(w.word());
263 endLink(w.ref(),w.file(),w.anchor());
264}
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 1542 of file latexdocvisitor.cpp.

1543{
1544 if (m_hide) return;
1545 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1546 startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1547 visitChildren(df);
1548 endMscFile(df.hasCaption());
1549}
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 836 of file latexdocvisitor.cpp.

837{
838 if (m_hide) return;
839 visitChildren(p);
840 if (!p.isLast() && // omit <p> for last paragraph
841 !(p.parent() && // and for parameter sections
842 std::get_if<DocParamSect>(p.parent())
843 )
844 )
845 {
846 if (insideTable())
847 {
848 m_t << "~\\newline\n";
849 }
850 else
851 {
852 m_t << "\n\n";
853 }
854 }
855}
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 1709 of file latexdocvisitor.cpp.

1710{
1711 if (m_hide) return;
1713 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1714 if (sect)
1715 {
1716 parentType = sect->type();
1717 }
1718 bool useTable = parentType==DocParamSect::Param ||
1719 parentType==DocParamSect::RetVal ||
1720 parentType==DocParamSect::Exception ||
1721 parentType==DocParamSect::TemplateParam;
1722 if (!useTable)
1723 {
1724 m_t << "\\item[";
1725 }
1726 if (sect && sect->hasInOutSpecifier())
1727 {
1729 {
1730 m_t << "\\doxymbox{\\texttt{";
1731 if (pl.direction()==DocParamSect::In)
1732 {
1733 m_t << "in";
1734 }
1735 else if (pl.direction()==DocParamSect::Out)
1736 {
1737 m_t << "out";
1738 }
1739 else if (pl.direction()==DocParamSect::InOut)
1740 {
1741 m_t << "in,out";
1742 }
1743 m_t << "}} ";
1744 }
1745 if (useTable) m_t << " & ";
1746 }
1747 if (sect && sect->hasTypeSpecifier())
1748 {
1749 for (const auto &type : pl.paramTypes())
1750 {
1751 std::visit(*this,type);
1752 }
1753 if (useTable) m_t << " & ";
1754 }
1755 m_t << "{\\em ";
1756 bool first=TRUE;
1757 for (const auto &param : pl.parameters())
1758 {
1759 if (!first) m_t << ","; else first=FALSE;
1761 std::visit(*this,param);
1763 }
1764 m_t << "}";
1765 if (useTable)
1766 {
1767 m_t << " & ";
1768 }
1769 else
1770 {
1771 m_t << "]";
1772 }
1773 for (const auto &par : pl.paragraphs())
1774 {
1775 std::visit(*this,par);
1776 }
1777 if (useTable)
1778 {
1779 m_t << "\\\\\n"
1780 << "\\hline\n";
1781 }
1782}
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 1650 of file latexdocvisitor.cpp.

1651{
1652 if (m_hide) return;
1653 bool hasInOutSpecs = s.hasInOutSpecifier();
1654 bool hasTypeSpecs = s.hasTypeSpecifier();
1655 m_lcg.incUsedTableLevel();
1656 switch(s.type())
1657 {
1659 m_t << "\n\\begin{DoxyParams}";
1660 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1661 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1662 m_t << "{";
1664 break;
1666 m_t << "\n\\begin{DoxyRetVals}{";
1668 break;
1670 m_t << "\n\\begin{DoxyExceptions}{";
1672 break;
1674 m_t << "\n\\begin{DoxyTemplParams}{";
1676 break;
1677 default:
1678 ASSERT(0);
1680 }
1681 m_t << "}\n";
1682 visitChildren(s);
1683 m_lcg.decUsedTableLevel();
1684 switch(s.type())
1685 {
1687 m_t << "\\end{DoxyParams}\n";
1688 break;
1690 m_t << "\\end{DoxyRetVals}\n";
1691 break;
1693 m_t << "\\end{DoxyExceptions}\n";
1694 break;
1696 m_t << "\\end{DoxyTemplParams}\n";
1697 break;
1698 default:
1699 ASSERT(0);
1701 }
1702}
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 1845 of file latexdocvisitor.cpp.

1846{
1847 if (m_hide) return;
1848 visitChildren(pb);
1849}

References m_hide, and visitChildren().

◆ operator()() [38/58]

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

Definition at line 1560 of file latexdocvisitor.cpp.

1561{
1562 if (m_hide) return;
1563 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1564 startPlantUmlFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1565 visitChildren(df);
1567}
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 1577 of file latexdocvisitor.cpp.

1578{
1579 if (m_hide) return;
1580 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1581 // ref.anchor() for LaTeX/RTF
1582 if (ref.isSubPage())
1583 {
1584 startLink(ref.ref(),QCString(),ref.anchor());
1585 }
1586 else
1587 {
1588 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1589 }
1590 if (!ref.hasLinkText())
1591 {
1592 filter(ref.targetTitle());
1593 }
1594 visitChildren(ref);
1595 if (ref.isSubPage())
1596 {
1597 endLink(ref.ref(),QCString(),ref.anchor());
1598 }
1599 else
1600 {
1601 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1602 }
1603}
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 857 of file latexdocvisitor.cpp.

858{
859 visitChildren(r);
860}

References visitChildren().

◆ operator()() [41/58]

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

Definition at line 1605 of file latexdocvisitor.cpp.

1606{
1607 if (m_hide) return;
1608 m_t << "\\item \\contentsline{section}{";
1609 if (ref.isSubPage())
1610 {
1611 startLink(ref.ref(),QCString(),ref.anchor());
1612 }
1613 else
1614 {
1615 if (!ref.file().isEmpty())
1616 {
1617 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1618 }
1619 }
1620 visitChildren(ref);
1621 if (ref.isSubPage())
1622 {
1623 endLink(ref.ref(),QCString(),ref.anchor());
1624 }
1625 else
1626 {
1627 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1628 }
1629 m_t << "}{\\ref{";
1630 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1631 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1632 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1633 m_t << "}}{}\n";
1634}
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 1636 of file latexdocvisitor.cpp.

1637{
1638 if (m_hide) return;
1639 m_t << "\\footnotesize\n";
1640 m_t << "\\begin{multicols}{2}\n";
1641 m_t << "\\begin{DoxyCompactList}\n";
1643 visitChildren(l);
1645 m_t << "\\end{DoxyCompactList}\n";
1646 m_t << "\\end{multicols}\n";
1647 m_t << "\\normalsize\n";
1648}

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

◆ operator()() [43/58]

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

Definition at line 1038 of file latexdocvisitor.cpp.

1039{
1040 if (m_hide) return;
1041 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1042 if (pdfHyperlinks)
1043 {
1044 m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
1045 }
1046 m_t << "\\" << getSectionName(s.level()) << "{";
1047 if (pdfHyperlinks)
1048 {
1049 m_t << "\\texorpdfstring{";
1050 }
1051 if (s.title())
1052 {
1053 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::TEX;
1054 std::visit(*this,*s.title());
1056 }
1057 if (pdfHyperlinks)
1058 {
1059 m_t << "}{";
1060 if (s.title())
1061 {
1062 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::PDF;
1063 std::visit(*this,*s.title());
1065 }
1066 m_t << "}";
1067 }
1068 m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
1069 visitChildren(s);
1070}
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 1704 of file latexdocvisitor.cpp.

1705{
1706 m_t << " " << sep.chars() << " ";
1707}
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 1017 of file latexdocvisitor.cpp.

1018{
1019 if (m_hide) return;
1020 m_t << "\\begin{DoxyItemize}\n";
1021 m_listItemInfo[indentLevel()].isEnum = false;
1022 visitChildren(l);
1023 m_t << "\\end{DoxyItemize}\n";
1024}

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

◆ operator()() [46/58]

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

Definition at line 1026 of file latexdocvisitor.cpp.

1027{
1028 if (m_hide) return;
1029 m_t << "\\item ";
1031 if (li.paragraph())
1032 {
1033 visit(*this,*li.paragraph());
1034 }
1036}
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 862 of file latexdocvisitor.cpp.

863{
864 if (m_hide) return;
865 switch(s.type())
866 {
868 m_t << "\\begin{DoxySeeAlso}{";
870 break;
872 m_t << "\\begin{DoxyReturn}{";
874 break;
876 m_t << "\\begin{DoxyAuthor}{";
878 break;
880 m_t << "\\begin{DoxyAuthor}{";
882 break;
884 m_t << "\\begin{DoxyVersion}{";
886 break;
888 m_t << "\\begin{DoxySince}{";
890 break;
892 m_t << "\\begin{DoxyDate}{";
894 break;
896 m_t << "\\begin{DoxyNote}{";
898 break;
900 m_t << "\\begin{DoxyWarning}{";
902 break;
904 m_t << "\\begin{DoxyPrecond}{";
906 break;
908 m_t << "\\begin{DoxyPostcond}{";
910 break;
912 m_t << "\\begin{DoxyCopyright}{";
914 break;
916 m_t << "\\begin{DoxyInvariant}{";
918 break;
920 m_t << "\\begin{DoxyRemark}{";
922 break;
924 m_t << "\\begin{DoxyAttention}{";
926 break;
928 m_t << "\\begin{DoxyImportant}{";
930 break;
932 m_t << "\\begin{DoxyParagraph}{";
933 break;
935 m_t << "\\begin{DoxyParagraph}{";
936 break;
937 case DocSimpleSect::Unknown: break;
938 }
939
940 if (s.title())
941 {
943 std::visit(*this,*s.title());
945 }
946 m_t << "}\n";
948 visitChildren(s);
949 switch(s.type())
950 {
952 m_t << "\n\\end{DoxySeeAlso}\n";
953 break;
955 m_t << "\n\\end{DoxyReturn}\n";
956 break;
958 m_t << "\n\\end{DoxyAuthor}\n";
959 break;
961 m_t << "\n\\end{DoxyAuthor}\n";
962 break;
964 m_t << "\n\\end{DoxyVersion}\n";
965 break;
967 m_t << "\n\\end{DoxySince}\n";
968 break;
970 m_t << "\n\\end{DoxyDate}\n";
971 break;
973 m_t << "\n\\end{DoxyNote}\n";
974 break;
976 m_t << "\n\\end{DoxyWarning}\n";
977 break;
979 m_t << "\n\\end{DoxyPrecond}\n";
980 break;
982 m_t << "\n\\end{DoxyPostcond}\n";
983 break;
985 m_t << "\n\\end{DoxyCopyright}\n";
986 break;
988 m_t << "\n\\end{DoxyInvariant}\n";
989 break;
991 m_t << "\n\\end{DoxyRemark}\n";
992 break;
994 m_t << "\n\\end{DoxyAttention}\n";
995 break;
997 m_t << "\n\\end{DoxyImportant}\n";
998 break;
1000 m_t << "\n\\end{DoxyParagraph}\n";
1001 break;
1002 case DocSimpleSect::Rcs:
1003 m_t << "\n\\end{DoxyParagraph}\n";
1004 break;
1005 default:
1006 break;
1007 }
1009}
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 723 of file latexdocvisitor.cpp.

724{
725}

◆ operator()() [49/58]

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

Definition at line 372 of file latexdocvisitor.cpp.

373{
374 if (m_hide) return;
375 switch (s.style())
376 {
378 if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
379 break;
383 if (s.enable()) m_t << "\\sout{"; else m_t << "}";
384 break;
387 if (s.enable()) m_t << "\\uline{"; else m_t << "}";
388 break;
390 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
391 break;
395 if (s.enable()) m_t << "{\\ttfamily "; else m_t << "}";
396 break;
398 if (s.enable()) m_t << "\\textsubscript{"; else m_t << "}";
399 break;
401 if (s.enable()) m_t << "\\textsuperscript{"; else m_t << "}";
402 break;
404 if (s.enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
405 break;
407 if (s.enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
408 break;
410 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
411 break;
413 if (s.enable())
414 {
415 m_t << "\n\\begin{DoxyPre}";
417 }
418 else
419 {
421 m_t << "\\end{DoxyPre}\n";
422 }
423 break;
424 case DocStyleChange::Div: /* HTML only */ break;
425 case DocStyleChange::Span: /* HTML only */ break;
426 }
427}
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 279 of file latexdocvisitor.cpp.

280{
281 if (m_hide) return;
282 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
283 const char *res = HtmlEntityMapper::instance().latex(s.symbol());
284 if (res)
285 {
287 {
288 if (pdfHyperlinks)
289 {
290 m_t << "\\texorpdfstring{$<$}{<}";
291 }
292 else
293 {
294 m_t << "$<$";
295 }
296 }
298 {
299 if (pdfHyperlinks)
300 {
301 m_t << "\\texorpdfstring{$>$}{>}";
302 }
303 else
304 {
305 m_t << "$>$";
306 }
307 }
308 else
309 {
310 m_t << res;
311 }
312 }
313 else
314 {
315 err("LaTeX: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(s.symbol(),TRUE));
316 }
317}
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 1825 of file latexdocvisitor.cpp.

1826{
1827 if (m_hide) return;
1828 visitChildren(t);
1829}

References m_hide, and visitChildren().

◆ operator()() [52/58]

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

Definition at line 1011 of file latexdocvisitor.cpp.

1012{
1013 if (m_hide) return;
1014 visitChildren(t);
1015}

References m_hide, and visitChildren().

◆ operator()() [53/58]

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

Definition at line 336 of file latexdocvisitor.cpp.

337{
338 if (m_hide) return;
339 if (Config_getBool(PDF_HYPERLINKS))
340 {
341 m_t << "\\href{";
342 if (u.isEmail()) m_t << "mailto:";
343 m_t << latexFilterURL(u.url()) << "}";
344 }
345 m_t << "{\\texttt{";
346 filter(u.url());
347 m_t << "}}";
348}
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 429 of file latexdocvisitor.cpp.

430{
431 if (m_hide) return;
432 QCString lang = m_langExt;
433 if (!s.language().isEmpty()) // explicit language setting
434 {
435 lang = s.language();
436 }
437 SrcLangExt langExt = getLanguageFromCodeLang(lang);
438 switch(s.type())
439 {
441 {
442 m_ci.startCodeFragment("DoxyCode");
443 getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
444 Config_getBool(STRIP_CODE_COMMENTS),
445 CodeParserOptions().setExample(s.isExample(),s.exampleFile()));
446 m_ci.endCodeFragment("DoxyCode");
447 }
448 break;
450 filter(s.text(), true);
451 break;
453 m_t << "{\\ttfamily ";
454 filter(s.text(), true);
455 m_t << "}";
456 break;
458 if (isTableNested(s.parent())) // in table
459 {
460 m_t << "\\begin{DoxyCode}{0}";
461 filter(s.text(), true);
462 m_t << "\\end{DoxyCode}\n";
463 }
464 else
465 {
466 m_t << "\\begin{DoxyVerb}";
467 m_t << s.text();
468 m_t << "\\end{DoxyVerb}\n";
469 }
470 break;
476 /* nothing */
477 break;
479 m_t << s.text();
480 break;
481 case DocVerbatim::Dot:
482 {
483 static int dotindex = 1;
484 QCString fileName(4096, QCString::ExplicitSize);
485
486 fileName.sprintf("%s%d%s",
487 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_"),
488 dotindex++,
489 ".dot"
490 );
491 std::ofstream file = Portable::openOutputStream(fileName);
492 if (!file.is_open())
493 {
494 err("Could not open file {} for writing\n",fileName);
495 }
496 else
497 {
498 file.write( s.text().data(), s.text().length() );
499 file.close();
500
501 startDotFile(fileName,s.width(),s.height(),s.hasCaption(),s.srcFile(),s.srcLine());
502 visitChildren(s);
504
505 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
506 }
507 }
508 break;
509 case DocVerbatim::Msc:
510 {
511 static int mscindex = 1;
512 QCString baseName(4096, QCString::ExplicitSize);
513
514 baseName.sprintf("%s%d",
515 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_"),
516 mscindex++
517 );
518 QCString fileName = baseName+".msc";
519 std::ofstream file = Portable::openOutputStream(fileName);
520 if (!file.is_open())
521 {
522 err("Could not open file {} for writing\n",fileName);
523 }
524 else
525 {
526 QCString text = "msc {";
527 text+=s.text();
528 text+="}";
529 file.write( text.data(), text.length() );
530 file.close();
531
532 writeMscFile(baseName, s);
533
534 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
535 }
536 }
537 break;
539 {
540 QCString latexOutput = Config_getString(LATEX_OUTPUT);
541 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
542 latexOutput,s.exampleFile(),s.text(),
544 s.engine(),s.srcFile(),s.srcLine(),true);
545
546 for (const auto &baseName: baseNameVector)
547 {
548 writePlantUMLFile(baseName, s);
549 }
550 }
551 break;
552 }
553}
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)
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
@ ExplicitSize
Definition qcstring.h:146
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:649
const char * qPrint(const char *s)
Definition qcstring.h:687
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5165

References DocVerbatim::Code, Config_getBool, Config_getString, DocVerbatim::context(), QCString::data(), DocVerbatim::DocbookOnly, DocVerbatim::Dot, endDotFile(), DocVerbatim::engine(), err, DocVerbatim::exampleFile(), QCString::ExplicitSize, 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, QCString::length(), m_ci, m_hide, m_langExt, m_t, DocVerbatim::ManOnly, DocVerbatim::Msc, Portable::openOutputStream(), DocNode::parent(), CodeParserInterface::parseCode(), DocVerbatim::PlantUML, PlantumlManager::PUML_BITMAP, PlantumlManager::PUML_EPS, qPrint(), Dir::remove(), DocVerbatim::RtfOnly, QCString::sprintf(), DocVerbatim::srcFile(), DocVerbatim::srcLine(), startDotFile(), QCString::str(), DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::useBitmap(), DocVerbatim::Verbatim, visitChildren(), DocVerbatim::width(), writeMscFile(), writePlantUMLFile(), PlantumlManager::writePlantUMLSource(), and DocVerbatim::XmlOnly.

◆ operator()() [55/58]

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

Definition at line 1841 of file latexdocvisitor.cpp.

1842{
1843}

◆ operator()() [56/58]

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

Definition at line 266 of file latexdocvisitor.cpp.

267{
268 if (m_hide) return;
269 if (m_insidePre)
270 {
271 m_t << w.chars();
272 }
273 else
274 {
275 m_t << " ";
276 }
277}
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 252 of file latexdocvisitor.cpp.

253{
254 if (m_hide) return;
255 filter(w.word());
256}
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 1784 of file latexdocvisitor.cpp.

1785{
1786 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1787 if (m_hide) return;
1788 if (x.title().isEmpty()) return;
1790 m_t << "\\begin{DoxyRefDesc}{";
1791 filter(x.title());
1792 m_t << "}\n";
1793 bool anonymousEnum = x.file()=="@";
1794 m_t << "\\item[";
1795 if (pdfHyperlinks && !anonymousEnum)
1796 {
1797 m_t << "\\doxymbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1798 }
1799 else
1800 {
1801 m_t << "\\textbf{ ";
1802 }
1804 filter(x.title());
1806 if (pdfHyperlinks && !anonymousEnum)
1807 {
1808 m_t << "}";
1809 }
1810 m_t << "}]";
1811 visitChildren(x);
1812 if (x.title().isEmpty()) return;
1814 m_t << "\\end{DoxyRefDesc}\n";
1815}
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 1992 of file latexdocvisitor.cpp.

1999{
2000 QCString baseName=makeBaseName(fileName);
2001 baseName.prepend("dia_");
2002
2003 QCString outDir = Config_getString(LATEX_OUTPUT);
2004 writeDiaGraphFromFile(fileName,outDir,baseName,DiaOutputFormat::EPS,srcFile,srcLine);
2005 visitPreStart(m_t,hasCaption, baseName, width, height);
2006}
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
static QCString makeBaseName(const QCString &name)

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 )
private

Definition at line 1936 of file latexdocvisitor.cpp.

1943{
1944 QCString baseName=makeBaseName(fileName);
1945 baseName.prepend("dot_");
1946 QCString outDir = Config_getString(LATEX_OUTPUT);
1947 QCString name = fileName;
1948 writeDotGraphFromFile(name,outDir,baseName,GraphOutputFormat::EPS,srcFile,srcLine);
1949 visitPreStart(m_t,hasCaption, baseName, width, height);
1950}
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 1864 of file latexdocvisitor.cpp.

1866{
1867 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1868 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1869 {
1870 if (refToTable)
1871 {
1872 m_t << "\\doxytablelink{";
1873 }
1874 else if (refToSection)
1875 {
1876 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1877 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxysectlink{";
1878 }
1879 else
1880 {
1881 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1882 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxylink{";
1883 }
1884 if (refToTable || m_texOrPdf != TexOrPdf::PDF)
1885 {
1886 if (!file.isEmpty()) m_t << stripPath(file);
1887 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1888 if (!anchor.isEmpty()) m_t << anchor;
1889 m_t << "}";
1890 }
1891 m_t << "{";
1892 }
1893 else if (ref.isEmpty() && refToSection)
1894 {
1895 m_t << "\\doxysectref{";
1896 }
1897 else if (ref.isEmpty() && refToTable)
1898 {
1899 m_t << "\\doxytableref{";
1900 }
1901 else if (ref.isEmpty()) // internal non-PDF link
1902 {
1903 m_t << "\\doxyref{";
1904 }
1905 else // external link
1906 {
1907 m_t << "\\textbf{ ";
1908 }
1909}

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 1958 of file latexdocvisitor.cpp.

1965{
1966 QCString baseName=makeBaseName(fileName);
1967 baseName.prepend("msc_");
1968
1969 QCString outDir = Config_getString(LATEX_OUTPUT);
1970 writeMscGraphFromFile(fileName,outDir,baseName,MscOutputFormat::EPS,srcFile,srcLine);
1971 visitPreStart(m_t,hasCaption, baseName, width, height);
1972}
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 2029 of file latexdocvisitor.cpp.

2036{
2037 QCString outDir = Config_getString(LATEX_OUTPUT);
2038 std::string inBuf;
2039 readInputFile(fileName,inBuf);
2040
2041 bool useBitmap = inBuf.find("@startditaa") != std::string::npos;
2042 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
2043 outDir,QCString(),inBuf,
2045 QCString(),srcFile,srcLine,false);
2046 bool first = true;
2047 for (const auto &bName: baseNameVector)
2048 {
2049 QCString baseName = makeBaseName(bName);
2050 QCString shortName = makeShortName(baseName);
2051 if (useBitmap)
2052 {
2053 if (shortName.find('.')==-1) shortName += ".png";
2054 }
2057 if (!first) endPlantUmlFile(hasCaption);
2058 first = false;
2059 visitPreStart(m_t,hasCaption, shortName, width, height);
2060 }
2061}
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
static QCString makeShortName(const QCString &baseName)
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:5486

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

Referenced by operator()().

◆ visitCaption()

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

Definition at line 232 of file latexdocvisitor.cpp.

233{
234 for (const auto &n : children)
235 {
236 std::visit(*this,n);
237 }
238}

Referenced by writeMscFile(), and writePlantUMLFile().

◆ visitChildren()

◆ writeEndTableCommand()

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

Definition at line 1254 of file latexdocvisitor.cpp.

1255{
1256 if (isTableNested(n))
1257 {
1258 m_t << "\\end{DoxyTableNested}\n";
1259 }
1260 else
1261 {
1262 m_t << "\\end{DoxyTable}\n";
1263 }
1264}

References isTableNested(), and m_t.

Referenced by operator()().

◆ writeMscFile()

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

Definition at line 1981 of file latexdocvisitor.cpp.

1982{
1983 QCString shortName = makeShortName(baseName);
1984 QCString outDir = Config_getString(LATEX_OUTPUT);
1985 writeMscGraphFromFile(baseName+".msc",outDir,shortName,MscOutputFormat::EPS,s.srcFile(),s.srcLine());
1986 visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
1989}
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, makeShortName(), 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 1242 of file latexdocvisitor.cpp.

1243{
1244 if (isTableNested(n))
1245 {
1246 m_t << "\\begin{DoxyTableNested}{" << cols << "}";
1247 }
1248 else
1249 {
1250 m_t << "\n\\begin{DoxyTable}{" << cols << "}";
1251 }
1252}

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: