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

2094{
2095 if (m_indentLevel>0)
2096 {
2097 m_indentLevel--;
2098 }
2099}

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

2019{
2020 if (m_hide) return;
2021 visitPostEnd(m_t,hasCaption);
2022}
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 1962 of file latexdocvisitor.cpp.

1963{
1964 if (m_hide) return;
1965 visitPostEnd(m_t,hasCaption);
1966}

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

1922{
1923 m_t << "}";
1924 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1925 if (ref.isEmpty() && !pdfHyperLinks)
1926 {
1927 m_t << "{";
1929 m_t << "}{" << file;
1930 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1931 m_t << anchor << "}";
1932 if (refToSection)
1933 {
1934 m_t << "{" << sectionType.level() << "}";
1935 }
1936 }
1937 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1938 {
1939 if (refToSection)
1940 {
1941 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1942 }
1943 }
1944}
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 1984 of file latexdocvisitor.cpp.

1985{
1986 if (m_hide) return;
1987 visitPostEnd(m_t,hasCaption);
1988}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endPlantUmlFile()

void LatexDocVisitor::endPlantUmlFile ( bool hasCaption)
private

Definition at line 2073 of file latexdocvisitor.cpp.

2074{
2075 if (m_hide) return;
2076 visitPostEnd(m_t,hasCaption);
2077}

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

1862{
1863 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
1865 m_lcg.insideTabbing(),
1868 m_lcg.usedTableLevel()>0, // insideTable
1869 false, // keepSpaces
1870 retainNewLine
1871 );
1872}
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 2084 of file latexdocvisitor.cpp.

2085{
2086 m_indentLevel++;
2088 {
2089 err("Maximum indent level ({}) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2090 }
2091}
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 2079 of file latexdocvisitor.cpp.

2080{
2081 return std::min(m_indentLevel,maxIndentLevels-1);
2082}

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

1242{
1243 bool isNested=m_lcg.usedTableLevel()>0;
1244 while (n && !isNested)
1245 {
1247 n = ::parent(n);
1248 }
1249 return isNested;
1250}
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:4877

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

801{
802 if (m_hide) return;
803 if (m_indentLevel>=maxIndentLevels-1) return;
804 if (l.isEnumList())
805 {
806 m_t << "\n\\begin{DoxyEnumerate}";
807 m_listItemInfo[indentLevel()].isEnum = true;
808 }
809 else
810 {
811 m_listItemInfo[indentLevel()].isEnum = false;
812 m_t << "\n\\begin{DoxyItemize}";
813 }
814 visitChildren(l);
815 if (l.isEnumList())
816 {
817 m_t << "\n\\end{DoxyEnumerate}";
818 }
819 else
820 {
821 m_t << "\n\\end{DoxyItemize}";
822 }
823}
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 825 of file latexdocvisitor.cpp.

826{
827 if (m_hide) return;
828 switch (li.itemNumber())
829 {
830 case DocAutoList::Unchecked: // unchecked
831 m_t << "\n\\item[\\DoxyUnchecked] ";
832 break;
833 case DocAutoList::Checked_x: // checked with x
834 case DocAutoList::Checked_X: // checked with X
835 m_t << "\n\\item[\\DoxyChecked] ";
836 break;
837 default:
838 m_t << "\n\\item ";
839 break;
840 }
842 visitChildren(li);
844}
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 737 of file latexdocvisitor.cpp.

738{
739 if (m_hide) return;
740 auto opt = cite.option();
741 QCString txt;
742 if (opt.noCite())
743 {
744 if (!cite.file().isEmpty())
745 {
746 txt = cite.getText();
747 }
748 else
749 {
750 if (!opt.noPar()) txt += "[";
751 txt += cite.target();
752 if (!opt.noPar()) txt += "]";
753 }
754 m_t << "{\\bfseries ";
755 filter(txt);
756 m_t << "}";
757 }
758 else
759 {
760 if (!cite.file().isEmpty())
761 {
762 QCString anchor = cite.anchor();
763 QCString anchorPrefix = CitationManager::instance().anchorPrefix();
764 anchor = anchor.mid(anchorPrefix.length()); // strip prefix
765
766 txt = "\\DoxyCite{" + anchor + "}";
767 if (opt.isNumber())
768 {
769 txt += "{number}";
770 }
771 else if (opt.isShortAuthor())
772 {
773 txt += "{shortauthor}";
774 }
775 else if (opt.isYear())
776 {
777 txt += "{year}";
778 }
779 if (!opt.noPar()) txt += "{1}";
780 else txt += "{0}";
781
782 m_t << txt;
783 }
784 else
785 {
786 if (!opt.noPar()) txt += "[";
787 txt += cite.target();
788 if (!opt.noPar()) txt += "]";
789 m_t << "{\\bfseries ";
790 filter(txt);
791 m_t << "}";
792 }
793 }
794}
QCString anchorPrefix() const
Definition cite.cpp:127
static CitationManager & instance()
Definition cite.cpp:86
QCString getText() const
Definition docnode.cpp:951
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 1561 of file latexdocvisitor.cpp.

1562{
1563 if (m_hide) return;
1564 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1565 startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1566 visitChildren(df);
1567 endDiaFile(df.hasCaption());
1568}
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:5796

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

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

705{
706 if (m_hide) return;
707 QCString s = f.text();
708 const char *p = s.data();
709 char c = 0;
710 if (p)
711 {
712 while ((c=*p++))
713 {
714 switch (c)
715 {
716 case '\'': m_t << "\\textnormal{\\textquotesingle}"; break;
717 default: m_t << c; break;
718 }
719 }
720 }
721}
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 1472 of file latexdocvisitor.cpp.

1473{
1474 if (m_hide) return;
1475 if (Config_getBool(PDF_HYPERLINKS))
1476 {
1477 m_t << "\\href{";
1478 m_t << latexFilterURL(href.url());
1479 m_t << "}";
1480 }
1481 m_t << "{\\texttt{";
1482 visitChildren(href);
1483 m_t << "}}";
1484}
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 1841 of file latexdocvisitor.cpp.

1842{
1843 if (m_hide) return;
1844 m_t << "\\begin{quote}\n";
1846 visitChildren(q);
1847 m_t << "\\end{quote}\n";
1849}

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

◆ operator()() [12/58]

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

Definition at line 1321 of file latexdocvisitor.cpp.

1322{
1323 if (m_hide) return;
1324 visitChildren(c);
1325}

References m_hide, and visitChildren().

◆ operator()() [13/58]

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

Definition at line 1357 of file latexdocvisitor.cpp.

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

1233{
1235 if (!m_insideItem) m_t << "\\hfill";
1236 m_t << " \\\\\n";
1237 visitChildren(dd);
1239}

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

◆ operator()() [15/58]

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

Definition at line 1198 of file latexdocvisitor.cpp.

1199{
1200 if (m_hide) return;
1201 bool eq = classEqualsReflist(dl);
1202 if (eq)
1203 {
1204 m_t << "\n\\begin{DoxyRefList}";
1205 }
1206 else
1207 {
1208 if (listIsNested(dl)) m_t << "\n\\hfill";
1209 m_t << "\n\\begin{DoxyDescription}";
1210 }
1211 visitChildren(dl);
1212 if (eq)
1213 {
1214 m_t << "\n\\end{DoxyRefList}";
1215 }
1216 else
1217 {
1218 m_t << "\n\\end{DoxyDescription}";
1219 }
1220}
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 1222 of file latexdocvisitor.cpp.

1223{
1224 if (m_hide) return;
1225 m_t << "\n\\item[{\\parbox[t]{\\linewidth}{";
1227 visitChildren(dt);
1229 m_t << "}}]";
1230}
#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 1494 of file latexdocvisitor.cpp.

1495{
1496 if (m_hide) return;
1497 m_t << "\n\n";
1498 auto summary = d.summary();
1499 if (summary)
1500 {
1501 std::visit(*this,*summary);
1502 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1503 }
1504 visitChildren(d);
1505 if (summary)
1506 {
1507 m_t << "\\end{adjustwidth}\n";
1508 }
1509 else
1510 {
1511 m_t << "\n\n";
1512 }
1513}
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 1515 of file latexdocvisitor.cpp.

1516{
1517 if (m_hide) return;
1518 m_t << "\\" << getSectionName(header.level()) << "*{";
1519 visitChildren(header);
1520 m_t << "}";
1521}
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 1082 of file latexdocvisitor.cpp.

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

1150{
1151 if (m_hide) return;
1152 if (m_listItemInfo[indentLevel()].isEnum)
1153 {
1154 for (const auto &opt : l.attribs())
1155 {
1156 if (opt.name=="value")
1157 {
1158 bool ok = false;
1159 int val = opt.value.toInt(&ok);
1160 if (ok)
1161 {
1162 m_t << "\n\\setcounter{DoxyEnumerate" << integerToRoman(indentLevel()+1,false) << "}{" << (val - 1) << "}";
1163 }
1164 }
1165 }
1166 }
1167 m_t << "\n\\item ";
1169 visitChildren(l);
1171}
const HtmlAttribList & attribs() const
Definition docnode.h:1170
QCString integerToRoman(int n, bool upper)
Definition util.cpp:6635

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

1328{
1329 if (m_hide) return;
1331
1332 visitChildren(row);
1333
1334 m_t << "\\\\";
1335
1336 size_t col = 1;
1337 for (auto &span : rowSpans())
1338 {
1339 if (span.rowSpan>0) span.rowSpan--;
1340 if (span.rowSpan<=0)
1341 {
1342 // inactive span
1343 }
1344 else if (span.column>col)
1345 {
1346 col = span.column+span.colSpan;
1347 }
1348 else
1349 {
1350 col = span.column+span.colSpan;
1351 }
1352 }
1353
1354 m_t << "\n";
1355}

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

◆ operator()() [22/58]

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

Definition at line 1486 of file latexdocvisitor.cpp.

1487{
1488 if (m_hide) return;
1489 m_t << "{\\bfseries{";
1490 visitChildren(d);
1491 m_t << "}}";
1492}

References m_hide, m_t, and visitChildren().

◆ operator()() [23/58]

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

Definition at line 1276 of file latexdocvisitor.cpp.

1277{
1278 if (m_hide) return;
1280 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1281 if (c)
1282 {
1283 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1284 if (!c->file().isEmpty() && pdfHyperLinks)
1285 {
1286 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1287 << "}{}";
1288 }
1289 m_t << "\n";
1290 }
1291
1293 if (!isTableNested(t.parent()))
1294 {
1295 // write caption
1296 m_t << "{";
1297 if (c)
1298 {
1299 std::visit(*this, *t.caption());
1300 }
1301 m_t << "}";
1302 // write label
1303 m_t << "{";
1304 if (c && (!stripPath(c->file()).isEmpty() || !c->anchor().isEmpty()))
1305 {
1306 m_t << stripPath(c->file()) << "_" << c->anchor();
1307 }
1308 m_t << "}";
1309 }
1310
1311 // write head row(s)
1312 m_t << "{" << t.numberHeaderRows() << "}\n";
1313
1315
1316 visitChildren(t);
1318 popTableState();
1319}
QCString anchor() const
Definition docnode.h:1235
QCString file() const
Definition docnode.h:1234
size_t numberHeaderRows() const
Definition docnode.cpp:2186
size_t numColumns() const
Definition docnode.h:1278
const DocNodeVariant * caption() const
Definition docnode.cpp:2181
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 1523 of file latexdocvisitor.cpp.

1524{
1525 if (img.type()==DocImage::Latex)
1526 {
1527 if (m_hide) return;
1528 QCString gfxName = img.name();
1529 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1530 {
1531 gfxName=gfxName.left(gfxName.length()-4);
1532 }
1533
1534 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1535 visitChildren(img);
1537 }
1538 else // other format -> skip
1539 {
1540 }
1541}
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 inc.isExample(),
582 inc.exampleFile(),
583 fd.get(), // fileDef,
584 -1, // start line
585 -1, // end line
586 FALSE, // inline fragment
587 nullptr, // memberDef
588 TRUE // show line numbers
589 );
590 m_ci.endCodeFragment("DoxyCodeInclude");
591 }
592 break;
594 {
595 m_ci.startCodeFragment("DoxyCodeInclude");
597 inc.text(),langExt,
598 inc.stripCodeComments(),
599 inc.isExample(),
600 inc.exampleFile(),
601 nullptr, // fileDef
602 -1, // startLine
603 -1, // endLine
604 TRUE, // inlineFragment
605 nullptr, // memberDef
606 FALSE
607 );
608 m_ci.endCodeFragment("DoxyCodeInclude");
609 }
610 break;
618 break;
620 m_t << inc.text();
621 break;
623 if (isTableNested(inc.parent())) // in table
624 {
625 m_t << "\\begin{DoxyCode}{0}";
626 filter(inc.text(), true);
627 m_t << "\\end{DoxyCode}\n";
628 }
629 else
630 {
631 m_t << "\n\\begin{DoxyVerbInclude}\n";
632 m_t << inc.text();
633 m_t << "\\end{DoxyVerbInclude}\n";
634 }
635 break;
638 {
639 m_ci.startCodeFragment("DoxyCodeInclude");
641 inc.file(),
642 inc.blockId(),
643 inc.context(),
645 inc.trimLeft(),
647 );
648 m_ci.endCodeFragment("DoxyCodeInclude");
649 }
650 break;
651 }
652}
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, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXRefs=TRUE)=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:5134

References DocInclude::blockId(), DocInclude::context(), createFileDef(), FileInfo::dirPath(), DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::DontIncWithLines, DocInclude::exampleFile(), DocInclude::extension(), FALSE, 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, DocInclude::Snippet, DocInclude::SnippetWithLines, QCString::str(), DocInclude::stripCodeComments(), DocInclude::text(), DocInclude::trimLeft(), TRUE, DocInclude::type(), DocInclude::VerbInclude, and DocInclude::XmlInclude.

◆ operator()() [26/58]

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

Definition at line 654 of file latexdocvisitor.cpp.

655{
656 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
657 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
658 if (op.isFirst())
659 {
660 if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
662 m_hide = TRUE;
663 }
664 QCString locLangExt = getFileNameExtension(op.includeFileName());
665 if (locLangExt.isEmpty()) locLangExt = m_langExt;
666 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
667 if (op.type()!=DocIncOperator::Skip)
668 {
669 m_hide = popHidden();
670 if (!m_hide)
671 {
672 std::unique_ptr<FileDef> fd;
673 if (!op.includeFileName().isEmpty())
674 {
675 FileInfo cfi( op.includeFileName().str() );
676 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
677 }
678
679 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
681 op.isExample(),op.exampleFile(),
682 fd.get(), // fileDef
683 op.line(), // startLine
684 -1, // endLine
685 FALSE, // inline fragment
686 nullptr, // memberDef
687 op.showLineNo() // show line numbers
688 );
689 }
691 m_hide=TRUE;
692 }
693 if (op.isLast())
694 {
696 if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
697 }
698 else
699 {
700 if (!m_hide) m_t << "\n";
701 }
702}
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:5176

References DocIncOperator::context(), createFileDef(), FileInfo::dirPath(), DocIncOperator::exampleFile(), FALSE, 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(), 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 723 of file latexdocvisitor.cpp.

724{
725 if (m_hide) return;
726 m_t << "\\index{";
728 m_t << "@{";
730 m_t << "}}";
731}
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 1466 of file latexdocvisitor.cpp.

1467{
1468 if (m_hide) return;
1469 visitChildren(i);
1470}

References m_hide, and visitChildren().

◆ operator()() [29/58]

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

Definition at line 1827 of file latexdocvisitor.cpp.

1828{
1829 if (m_hide) return;
1830 startLink(QCString(),ref.file(),ref.anchor());
1831 visitChildren(ref);
1832 endLink(QCString(),ref.file(),ref.anchor());
1833}
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 1579 of file latexdocvisitor.cpp.

1580{
1581 if (m_hide) return;
1582 startLink(lnk.ref(),lnk.file(),lnk.anchor());
1583 visitChildren(lnk);
1584 endLink(lnk.ref(),lnk.file(),lnk.anchor());
1585}

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

1553{
1554 if (m_hide) return;
1555 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1556 startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1557 visitChildren(df);
1558 endMscFile(df.hasCaption());
1559}
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 846 of file latexdocvisitor.cpp.

847{
848 if (m_hide) return;
849 visitChildren(p);
850 if (!p.isLast() && // omit <p> for last paragraph
851 !(p.parent() && // and for parameter sections
852 std::get_if<DocParamSect>(p.parent())
853 )
854 )
855 {
856 if (insideTable())
857 {
858 m_t << "~\\newline\n";
859 }
860 else
861 {
862 m_t << "\n\n";
863 }
864 }
865}
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 1719 of file latexdocvisitor.cpp.

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

1661{
1662 if (m_hide) return;
1663 bool hasInOutSpecs = s.hasInOutSpecifier();
1664 bool hasTypeSpecs = s.hasTypeSpecifier();
1665 m_lcg.incUsedTableLevel();
1666 switch(s.type())
1667 {
1669 m_t << "\n\\begin{DoxyParams}";
1670 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1671 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1672 m_t << "{";
1674 break;
1676 m_t << "\n\\begin{DoxyRetVals}{";
1678 break;
1680 m_t << "\n\\begin{DoxyExceptions}{";
1682 break;
1684 m_t << "\n\\begin{DoxyTemplParams}{";
1686 break;
1687 default:
1688 ASSERT(0);
1690 }
1691 m_t << "}\n";
1692 visitChildren(s);
1693 m_lcg.decUsedTableLevel();
1694 switch(s.type())
1695 {
1697 m_t << "\\end{DoxyParams}\n";
1698 break;
1700 m_t << "\\end{DoxyRetVals}\n";
1701 break;
1703 m_t << "\\end{DoxyExceptions}\n";
1704 break;
1706 m_t << "\\end{DoxyTemplParams}\n";
1707 break;
1708 default:
1709 ASSERT(0);
1711 }
1712}
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 1855 of file latexdocvisitor.cpp.

1856{
1857 if (m_hide) return;
1858 visitChildren(pb);
1859}

References m_hide, and visitChildren().

◆ operator()() [38/58]

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

Definition at line 1570 of file latexdocvisitor.cpp.

1571{
1572 if (m_hide) return;
1573 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1574 startPlantUmlFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1575 visitChildren(df);
1577}
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 1587 of file latexdocvisitor.cpp.

1588{
1589 if (m_hide) return;
1590 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1591 // ref.anchor() for LaTeX/RTF
1592 if (ref.isSubPage())
1593 {
1594 startLink(ref.ref(),QCString(),ref.anchor());
1595 }
1596 else
1597 {
1598 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1599 }
1600 if (!ref.hasLinkText())
1601 {
1602 filter(ref.targetTitle());
1603 }
1604 visitChildren(ref);
1605 if (ref.isSubPage())
1606 {
1607 endLink(ref.ref(),QCString(),ref.anchor());
1608 }
1609 else
1610 {
1611 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1612 }
1613}
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 867 of file latexdocvisitor.cpp.

868{
869 visitChildren(r);
870}

References visitChildren().

◆ operator()() [41/58]

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

Definition at line 1615 of file latexdocvisitor.cpp.

1616{
1617 if (m_hide) return;
1618 m_t << "\\item \\contentsline{section}{";
1619 if (ref.isSubPage())
1620 {
1621 startLink(ref.ref(),QCString(),ref.anchor());
1622 }
1623 else
1624 {
1625 if (!ref.file().isEmpty())
1626 {
1627 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1628 }
1629 }
1630 visitChildren(ref);
1631 if (ref.isSubPage())
1632 {
1633 endLink(ref.ref(),QCString(),ref.anchor());
1634 }
1635 else
1636 {
1637 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1638 }
1639 m_t << "}{\\ref{";
1640 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1641 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1642 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1643 m_t << "}}{}\n";
1644}
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 1646 of file latexdocvisitor.cpp.

1647{
1648 if (m_hide) return;
1649 m_t << "\\footnotesize\n";
1650 m_t << "\\begin{multicols}{2}\n";
1651 m_t << "\\begin{DoxyCompactList}\n";
1653 visitChildren(l);
1655 m_t << "\\end{DoxyCompactList}\n";
1656 m_t << "\\end{multicols}\n";
1657 m_t << "\\normalsize\n";
1658}

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

◆ operator()() [43/58]

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

Definition at line 1048 of file latexdocvisitor.cpp.

1049{
1050 if (m_hide) return;
1051 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1052 if (pdfHyperlinks)
1053 {
1054 m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
1055 }
1056 m_t << "\\" << getSectionName(s.level()) << "{";
1057 if (pdfHyperlinks)
1058 {
1059 m_t << "\\texorpdfstring{";
1060 }
1061 if (s.title())
1062 {
1063 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::TEX;
1064 std::visit(*this,*s.title());
1066 }
1067 if (pdfHyperlinks)
1068 {
1069 m_t << "}{";
1070 if (s.title())
1071 {
1072 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::PDF;
1073 std::visit(*this,*s.title());
1075 }
1076 m_t << "}";
1077 }
1078 m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
1079 visitChildren(s);
1080}
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 1714 of file latexdocvisitor.cpp.

1715{
1716 m_t << " " << sep.chars() << " ";
1717}
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 1027 of file latexdocvisitor.cpp.

1028{
1029 if (m_hide) return;
1030 m_t << "\\begin{DoxyItemize}\n";
1031 m_listItemInfo[indentLevel()].isEnum = false;
1032 visitChildren(l);
1033 m_t << "\\end{DoxyItemize}\n";
1034}

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

◆ operator()() [46/58]

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

Definition at line 1036 of file latexdocvisitor.cpp.

1037{
1038 if (m_hide) return;
1039 m_t << "\\item ";
1041 if (li.paragraph())
1042 {
1043 visit(*this,*li.paragraph());
1044 }
1046}
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 872 of file latexdocvisitor.cpp.

873{
874 if (m_hide) return;
875 switch(s.type())
876 {
878 m_t << "\\begin{DoxySeeAlso}{";
880 break;
882 m_t << "\\begin{DoxyReturn}{";
884 break;
886 m_t << "\\begin{DoxyAuthor}{";
888 break;
890 m_t << "\\begin{DoxyAuthor}{";
892 break;
894 m_t << "\\begin{DoxyVersion}{";
896 break;
898 m_t << "\\begin{DoxySince}{";
900 break;
902 m_t << "\\begin{DoxyDate}{";
904 break;
906 m_t << "\\begin{DoxyNote}{";
908 break;
910 m_t << "\\begin{DoxyWarning}{";
912 break;
914 m_t << "\\begin{DoxyPrecond}{";
916 break;
918 m_t << "\\begin{DoxyPostcond}{";
920 break;
922 m_t << "\\begin{DoxyCopyright}{";
924 break;
926 m_t << "\\begin{DoxyInvariant}{";
928 break;
930 m_t << "\\begin{DoxyRemark}{";
932 break;
934 m_t << "\\begin{DoxyAttention}{";
936 break;
938 m_t << "\\begin{DoxyImportant}{";
940 break;
942 m_t << "\\begin{DoxyParagraph}{";
943 break;
945 m_t << "\\begin{DoxyParagraph}{";
946 break;
947 case DocSimpleSect::Unknown: break;
948 }
949
950 if (s.title())
951 {
953 std::visit(*this,*s.title());
955 }
956 m_t << "}\n";
958 visitChildren(s);
959 switch(s.type())
960 {
962 m_t << "\n\\end{DoxySeeAlso}\n";
963 break;
965 m_t << "\n\\end{DoxyReturn}\n";
966 break;
968 m_t << "\n\\end{DoxyAuthor}\n";
969 break;
971 m_t << "\n\\end{DoxyAuthor}\n";
972 break;
974 m_t << "\n\\end{DoxyVersion}\n";
975 break;
977 m_t << "\n\\end{DoxySince}\n";
978 break;
980 m_t << "\n\\end{DoxyDate}\n";
981 break;
983 m_t << "\n\\end{DoxyNote}\n";
984 break;
986 m_t << "\n\\end{DoxyWarning}\n";
987 break;
989 m_t << "\n\\end{DoxyPrecond}\n";
990 break;
992 m_t << "\n\\end{DoxyPostcond}\n";
993 break;
995 m_t << "\n\\end{DoxyCopyright}\n";
996 break;
998 m_t << "\n\\end{DoxyInvariant}\n";
999 break;
1001 m_t << "\n\\end{DoxyRemark}\n";
1002 break;
1004 m_t << "\n\\end{DoxyAttention}\n";
1005 break;
1007 m_t << "\n\\end{DoxyImportant}\n";
1008 break;
1010 m_t << "\n\\end{DoxyParagraph}\n";
1011 break;
1012 case DocSimpleSect::Rcs:
1013 m_t << "\n\\end{DoxyParagraph}\n";
1014 break;
1015 default:
1016 break;
1017 }
1019}
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 733 of file latexdocvisitor.cpp.

734{
735}

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

1836{
1837 if (m_hide) return;
1838 visitChildren(t);
1839}

References m_hide, and visitChildren().

◆ operator()() [52/58]

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

Definition at line 1021 of file latexdocvisitor.cpp.

1022{
1023 if (m_hide) return;
1024 visitChildren(t);
1025}

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 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:5152

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

1852{
1853}

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

1795{
1796 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1797 if (m_hide) return;
1798 if (x.title().isEmpty()) return;
1800 m_t << "\\begin{DoxyRefDesc}{";
1801 filter(x.title());
1802 m_t << "}\n";
1803 bool anonymousEnum = x.file()=="@";
1804 m_t << "\\item[";
1805 if (pdfHyperlinks && !anonymousEnum)
1806 {
1807 m_t << "\\mbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1808 }
1809 else
1810 {
1811 m_t << "\\textbf{ ";
1812 }
1814 filter(x.title());
1816 if (pdfHyperlinks && !anonymousEnum)
1817 {
1818 m_t << "}";
1819 }
1820 m_t << "}]";
1821 visitChildren(x);
1822 if (x.title().isEmpty()) return;
1824 m_t << "\\end{DoxyRefDesc}\n";
1825}
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 2002 of file latexdocvisitor.cpp.

2009{
2010 QCString baseName=makeBaseName(fileName);
2011 baseName.prepend("dia_");
2012
2013 QCString outDir = Config_getString(LATEX_OUTPUT);
2014 writeDiaGraphFromFile(fileName,outDir,baseName,DiaOutputFormat::EPS,srcFile,srcLine);
2015 visitPreStart(m_t,hasCaption, baseName, width, height);
2016}
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 1946 of file latexdocvisitor.cpp.

1953{
1954 QCString baseName=makeBaseName(fileName);
1955 baseName.prepend("dot_");
1956 QCString outDir = Config_getString(LATEX_OUTPUT);
1957 QCString name = fileName;
1958 writeDotGraphFromFile(name,outDir,baseName,GraphOutputFormat::EPS,srcFile,srcLine);
1959 visitPreStart(m_t,hasCaption, baseName, width, height);
1960}
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 1874 of file latexdocvisitor.cpp.

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

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

1975{
1976 QCString baseName=makeBaseName(fileName);
1977 baseName.prepend("msc_");
1978
1979 QCString outDir = Config_getString(LATEX_OUTPUT);
1980 writeMscGraphFromFile(fileName,outDir,baseName,MscOutputFormat::EPS,srcFile,srcLine);
1981 visitPreStart(m_t,hasCaption, baseName, width, height);
1982}
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 2039 of file latexdocvisitor.cpp.

2046{
2047 QCString outDir = Config_getString(LATEX_OUTPUT);
2048 std::string inBuf;
2049 readInputFile(fileName,inBuf);
2050
2051 bool useBitmap = inBuf.find("@startditaa") != std::string::npos;
2052 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
2053 outDir,QCString(),inBuf,
2055 QCString(),srcFile,srcLine,false);
2056 bool first = true;
2057 for (const auto &bName: baseNameVector)
2058 {
2059 QCString baseName = makeBaseName(bName);
2060 QCString shortName = makeShortName(baseName);
2061 if (useBitmap)
2062 {
2063 if (shortName.find('.')==-1) shortName += ".png";
2064 }
2067 if (!first) endPlantUmlFile(hasCaption);
2068 first = false;
2069 visitPreStart(m_t,hasCaption, shortName, width, height);
2070 }
2071}
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:5473

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

1265{
1266 if (isTableNested(n))
1267 {
1268 m_t << "\\end{DoxyTableNested}\n";
1269 }
1270 else
1271 {
1272 m_t << "\\end{DoxyTable}\n";
1273 }
1274}

References isTableNested(), and m_t.

Referenced by operator()().

◆ writeMscFile()

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

Definition at line 1991 of file latexdocvisitor.cpp.

1992{
1993 QCString shortName = makeShortName(baseName);
1994 QCString outDir = Config_getString(LATEX_OUTPUT);
1995 writeMscGraphFromFile(baseName+".msc",outDir,shortName,MscOutputFormat::EPS,s.srcFile(),s.srcLine());
1996 visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
1999}
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 1252 of file latexdocvisitor.cpp.

1253{
1254 if (isTableNested(n))
1255 {
1256 m_t << "\\begin{DoxyTableNested}{" << cols << "}";
1257 }
1258 else
1259 {
1260 m_t << "\n\\begin{DoxyTable}{" << cols << "}";
1261 }
1262}

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: