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

Concrete visitor implementation for LaTeX output. More...

#include <src/latexdocvisitor.h>

Inheritance diagram for LatexDocVisitor:
Collaboration diagram for LatexDocVisitor:

Classes

struct  ActiveRowSpan
struct  TableState
struct  LatexListItemInfo

Public Member Functions

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

Private Types

typedef std::vector< ActiveRowSpanRowSpanList

Private Member Functions

template<class T>
void visitChildren (const T &t)
void filter (const QCString &str, const bool retainNewLine=false)
void startLink (const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=false, bool refToSection=false)
void endLink (const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=false, bool refToSection=false, SectionType sectionType=SectionType::Anchor)
void startDotFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)
void endDotFile (bool hasCaption)
void startMscFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)
void endMscFile (bool hasCaption)
void writeMscFile (const QCString &fileName, const DocVerbatim &s, bool newFile=true)
void startDiaFile (const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)
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 217 of file latexdocvisitor.cpp.

219 : m_t(t), m_ci(ci), m_lcg(lcg), m_insidePre(FALSE),
221 m_langExt(langExt), m_hierarchyLevel(hierarchyLevel)
222{
223}
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 2058 of file latexdocvisitor.cpp.

2059{
2060 if (m_indentLevel>0)
2061 {
2062 m_indentLevel--;
2063 }
2064}

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

1984{
1985 if (m_hide) return;
1986 visitPostEnd(m_t,hasCaption);
1987}
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 1928 of file latexdocvisitor.cpp.

1929{
1930 if (m_hide) return;
1931 visitPostEnd(m_t,hasCaption);
1932}

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

1889{
1890 m_t << "}";
1891 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1892 if (ref.isEmpty() && !pdfHyperLinks)
1893 {
1894 m_t << "{";
1896 m_t << "}{" << file;
1897 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1898 m_t << anchor << "}";
1899 if (refToSection)
1900 {
1901 m_t << "{" << sectionType.level() << "}";
1902 }
1903 }
1904 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1905 {
1906 if (refToSection)
1907 {
1908 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1909 }
1910 }
1911}
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:46
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 1950 of file latexdocvisitor.cpp.

1951{
1952 if (m_hide) return;
1953 visitPostEnd(m_t,hasCaption);
1954}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endPlantUmlFile()

void LatexDocVisitor::endPlantUmlFile ( bool hasCaption)
private

Definition at line 2038 of file latexdocvisitor.cpp.

2039{
2040 if (m_hide) return;
2041 visitPostEnd(m_t,hasCaption);
2042}

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

1829{
1830 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
1832 m_lcg.insideTabbing(),
1835 m_lcg.usedTableLevel()>0, // insideTable
1836 false, // keepSpaces
1837 retainNewLine
1838 );
1839}
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 2049 of file latexdocvisitor.cpp.

2050{
2051 m_indentLevel++;
2053 {
2054 err("Maximum indent level ({}) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2055 }
2056}
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 2044 of file latexdocvisitor.cpp.

2045{
2046 return std::min(m_indentLevel,maxIndentLevels-1);
2047}

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

1176{
1177 bool isNested=m_lcg.usedTableLevel()>0;
1178 while (n && !isNested)
1179 {
1181 n = ::parent(n);
1182 }
1183 return isNested;
1184}
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
Definition docnode.h:1363
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:1327

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

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

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

735{
736 if (m_hide) return;
737 if (m_indentLevel>=maxIndentLevels-1) return;
738 if (l.isEnumList())
739 {
740 m_t << "\n\\begin{DoxyEnumerate}";
741 m_listItemInfo[indentLevel()].isEnum = true;
742 }
743 else
744 {
745 m_listItemInfo[indentLevel()].isEnum = false;
746 m_t << "\n\\begin{DoxyItemize}";
747 }
748 visitChildren(l);
749 if (l.isEnumList())
750 {
751 m_t << "\n\\end{DoxyEnumerate}";
752 }
753 else
754 {
755 m_t << "\n\\end{DoxyItemize}";
756 }
757}
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 759 of file latexdocvisitor.cpp.

760{
761 if (m_hide) return;
762 switch (li.itemNumber())
763 {
764 case DocAutoList::Unchecked: // unchecked
765 m_t << "\n\\item[\\DoxyUnchecked] ";
766 break;
767 case DocAutoList::Checked_x: // checked with x
768 case DocAutoList::Checked_X: // checked with X
769 m_t << "\n\\item[\\DoxyChecked] ";
770 break;
771 default:
772 m_t << "\n\\item ";
773 break;
774 }
776 visitChildren(li);
778}
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 671 of file latexdocvisitor.cpp.

672{
673 if (m_hide) return;
674 auto opt = cite.option();
675 QCString txt;
676 if (opt.noCite())
677 {
678 if (!cite.file().isEmpty())
679 {
680 txt = cite.getText();
681 }
682 else
683 {
684 if (!opt.noPar()) txt += "[";
685 txt += cite.target();
686 if (!opt.noPar()) txt += "]";
687 }
688 m_t << "{\\bfseries ";
689 filter(txt);
690 m_t << "}";
691 }
692 else
693 {
694 if (!cite.file().isEmpty())
695 {
696 QCString anchor = cite.anchor();
697 QCString anchorPrefix = CitationManager::instance().anchorPrefix();
698 anchor = anchor.mid(anchorPrefix.length()); // strip prefix
699
700 txt = "\\DoxyCite{" + anchor + "}";
701 if (opt.isNumber())
702 {
703 txt += "{number}";
704 }
705 else if (opt.isShortAuthor())
706 {
707 txt += "{shortauthor}";
708 }
709 else if (opt.isYear())
710 {
711 txt += "{year}";
712 }
713 if (!opt.noPar()) txt += "{1}";
714 else txt += "{0}";
715
716 m_t << txt;
717 }
718 else
719 {
720 if (!opt.noPar()) txt += "[";
721 txt += cite.target();
722 if (!opt.noPar()) txt += "]";
723 m_t << "{\\bfseries ";
724 filter(txt);
725 m_t << "}";
726 }
727 }
728}
QCString anchorPrefix() const
Definition cite.cpp:126
static CitationManager & instance()
Definition cite.cpp:85
QCString getText() const
Definition docnode.cpp:972
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 1517 of file latexdocvisitor.cpp.

1518{
1519 if (m_hide) return;
1520 bool exists = false;
1521 std::string inBuf;
1522 if (readInputFile(df.file(),inBuf))
1523 {
1524 auto fileName = writeFileContents(Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file())+"_", // baseName
1525 ".dia", // extension
1526 inBuf, // contents
1527 exists);
1528 if (!fileName.isEmpty())
1529 {
1530 startDiaFile(fileName,df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine(),!exists);
1531 visitChildren(df);
1532 endDiaFile(df.hasCaption());
1533 }
1534 }
1535}
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 startDiaFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)
void endDiaFile(bool hasCaption)
#define Config_getString(name)
Definition config.h:32
QCString writeFileContents(const QCString &baseName, const QCString &extension, const QCString &content, bool &exists)
Thread-safe function to write a string to a file.
Definition util.cpp:6982
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:5553

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

◆ operator()() [6/58]

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

Definition at line 1477 of file latexdocvisitor.cpp.

1478{
1479 if (m_hide) return;
1480 bool exists = false;
1481 std::string inBuf;
1482 if (readInputFile(df.file(),inBuf))
1483 {
1484 auto fileName = writeFileContents(Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file())+"_", // baseName
1485 ".dot", // extension
1486 inBuf, // contents
1487 exists);
1488 if (!fileName.isEmpty())
1489 {
1490 startDotFile(fileName,df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine(),!exists);
1491 visitChildren(df);
1492 endDotFile(df.hasCaption());
1493 }
1494 }
1495}
void endDotFile(bool hasCaption)
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)

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

◆ operator()() [7/58]

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

Definition at line 296 of file latexdocvisitor.cpp.

297{
298 if (m_hide) return;
299 QCString emojiName = EmojiEntityMapper::instance().name(s.index());
300 if (!emojiName.isEmpty())
301 {
302 QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
303 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxygenemoji{";
304 filter(emojiName);
305 if (m_texOrPdf != TexOrPdf::PDF) m_t << "}{" << imageName << "}";
306 }
307 else
308 {
309 m_t << s.name();
310 }
311}
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 642 of file latexdocvisitor.cpp.

643{
644 if (m_hide) return;
645 QCString s = f.text();
646 const char *p = s.data();
647 char c = 0;
648 if (p)
649 {
650 while ((c=*p++))
651 {
652 switch (c)
653 {
654 case '\'': m_t << "\\textnormal{\\textquotesingle}"; break;
655 default: m_t << c; break;
656 }
657 }
658 }
659}
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 340 of file latexdocvisitor.cpp.

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

References insideTable(), m_hide, and m_t.

◆ operator()() [10/58]

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

Definition at line 1406 of file latexdocvisitor.cpp.

1407{
1408 if (m_hide) return;
1409 if (Config_getBool(PDF_HYPERLINKS))
1410 {
1411 m_t << "\\href{";
1412 m_t << latexFilterURL(href.url());
1413 m_t << "}";
1414 }
1415 m_t << "{\\texttt{";
1416 visitChildren(href);
1417 m_t << "}}";
1418}
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 1808 of file latexdocvisitor.cpp.

1809{
1810 if (m_hide) return;
1811 m_t << "\\begin{quote}\n";
1813 visitChildren(q);
1814 m_t << "\\end{quote}\n";
1816}

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

◆ operator()() [12/58]

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

Definition at line 1255 of file latexdocvisitor.cpp.

1256{
1257 if (m_hide) return;
1258 visitChildren(c);
1259}

References m_hide, and visitChildren().

◆ operator()() [13/58]

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

Definition at line 1291 of file latexdocvisitor.cpp.

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

1167{
1169 if (!m_insideItem) m_t << "\\hfill";
1170 m_t << " \\\\\n";
1171 visitChildren(dd);
1173}

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

◆ operator()() [15/58]

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

Definition at line 1132 of file latexdocvisitor.cpp.

1133{
1134 if (m_hide) return;
1135 bool eq = classEqualsReflist(dl);
1136 if (eq)
1137 {
1138 m_t << "\n\\begin{DoxyRefList}";
1139 }
1140 else
1141 {
1142 if (listIsNested(dl)) m_t << "\n\\hfill";
1143 m_t << "\n\\begin{DoxyDescription}";
1144 }
1145 visitChildren(dl);
1146 if (eq)
1147 {
1148 m_t << "\n\\end{DoxyRefList}";
1149 }
1150 else
1151 {
1152 m_t << "\n\\end{DoxyDescription}";
1153 }
1154}
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 1156 of file latexdocvisitor.cpp.

1157{
1158 if (m_hide) return;
1159 m_t << "\n\\item[{\\parbox[t]{\\linewidth}{";
1161 visitChildren(dt);
1163 m_t << "}}]";
1164}
#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 1428 of file latexdocvisitor.cpp.

1429{
1430 if (m_hide) return;
1431 m_t << "\n\n";
1432 auto summary = d.summary();
1433 if (summary)
1434 {
1435 std::visit(*this,*summary);
1436 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1437 }
1438 visitChildren(d);
1439 if (summary)
1440 {
1441 m_t << "\\end{adjustwidth}\n";
1442 }
1443 else
1444 {
1445 m_t << "\n\n";
1446 }
1447}
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 1449 of file latexdocvisitor.cpp.

1450{
1451 if (m_hide) return;
1452 m_t << "\\" << getSectionName(header.level()) << "*{";
1453 visitChildren(header);
1454 m_t << "}";
1455}
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 1016 of file latexdocvisitor.cpp.

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

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

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

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

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

◆ operator()() [22/58]

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

Definition at line 1420 of file latexdocvisitor.cpp.

1421{
1422 if (m_hide) return;
1423 m_t << "{\\bfseries{";
1424 visitChildren(d);
1425 m_t << "}}";
1426}

References m_hide, m_t, and visitChildren().

◆ operator()() [23/58]

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

Definition at line 1210 of file latexdocvisitor.cpp.

1211{
1212 if (m_hide) return;
1214 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1215 if (c)
1216 {
1217 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1218 if (!c->file().isEmpty() && pdfHyperLinks)
1219 {
1220 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1221 << "}{}";
1222 }
1223 m_t << "\n";
1224 }
1225
1227 if (!isTableNested(t.parent()))
1228 {
1229 // write caption
1230 m_t << "{";
1231 if (c)
1232 {
1233 std::visit(*this, *t.caption());
1234 }
1235 m_t << "}";
1236 // write label
1237 m_t << "{";
1238 if (c && (!stripPath(c->file()).isEmpty() || !c->anchor().isEmpty()))
1239 {
1240 m_t << stripPath(c->file()) << "_" << c->anchor();
1241 }
1242 m_t << "}";
1243 }
1244
1245 // write head row(s)
1246 m_t << "{" << t.numberHeaderRows() << "}\n";
1247
1249
1250 visitChildren(t);
1252 popTableState();
1253}
QCString anchor() const
Definition docnode.h:1232
QCString file() const
Definition docnode.h:1231
size_t numberHeaderRows() const
Definition docnode.cpp:2213
size_t numColumns() const
Definition docnode.h:1275
const DocNodeVariant * caption() const
Definition docnode.cpp:2208
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 1457 of file latexdocvisitor.cpp.

1458{
1459 if (img.type()==DocImage::Latex)
1460 {
1461 if (m_hide) return;
1462 QCString gfxName = img.name();
1463 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1464 {
1465 gfxName=gfxName.left(gfxName.length()-4);
1466 }
1467
1468 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1469 visitChildren(img);
1471 }
1472 else // other format -> skip
1473 {
1474 }
1475}
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 514 of file latexdocvisitor.cpp.

515{
516 if (m_hide) return;
518 switch(inc.type())
519 {
521 {
522 m_ci.startCodeFragment("DoxyCodeInclude");
523 FileInfo cfi( inc.file().str() );
524 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
526 inc.text(),
527 langExt,
528 inc.stripCodeComments(),
529 CodeParserOptions()
530 .setExample(inc.isExample(), inc.exampleFile())
531 .setFileDef(fd.get())
532 .setInlineFragment(true)
533 );
534 m_ci.endCodeFragment("DoxyCodeInclude");
535 }
536 break;
538 {
539 m_ci.startCodeFragment("DoxyCodeInclude");
541 inc.text(),langExt,
542 inc.stripCodeComments(),
543 CodeParserOptions()
544 .setExample(inc.isExample(), inc.exampleFile())
545 .setInlineFragment(true)
546 .setShowLineNumbers(false)
547 );
548 m_ci.endCodeFragment("DoxyCodeInclude");
549 }
550 break;
558 break;
560 m_t << inc.text();
561 break;
563 if (isTableNested(inc.parent())) // in table
564 {
565 m_t << "\\begin{DoxyCode}{0}";
566 filter(inc.text(), true);
567 m_t << "\\end{DoxyCode}\n";
568 }
569 else
570 {
571 m_t << "\n\\begin{DoxyVerbInclude}\n";
572 m_t << inc.text();
573 m_t << "\\end{DoxyVerbInclude}\n";
574 }
575 break;
578 {
579 m_ci.startCodeFragment("DoxyCodeInclude");
581 inc.file(),
582 inc.blockId(),
583 inc.context(),
585 inc.trimLeft(),
587 );
588 m_ci.endCodeFragment("DoxyCodeInclude");
589 }
590 break;
591 }
592}
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:5214

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

595{
596 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
597 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
598 if (op.isFirst())
599 {
600 if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
602 m_hide = TRUE;
603 }
604 QCString locLangExt = getFileNameExtension(op.includeFileName());
605 if (locLangExt.isEmpty()) locLangExt = m_langExt;
606 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
607 if (op.type()!=DocIncOperator::Skip)
608 {
609 m_hide = popHidden();
610 if (!m_hide)
611 {
612 std::unique_ptr<FileDef> fd;
613 if (!op.includeFileName().isEmpty())
614 {
615 FileInfo cfi( op.includeFileName().str() );
616 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
617 }
618
619 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
621 CodeParserOptions()
622 .setExample(op.isExample(),op.exampleFile())
623 .setFileDef(fd.get())
624 .setStartLine(op.line())
625 .setShowLineNumbers(op.showLineNo())
626 );
627 }
629 m_hide=TRUE;
630 }
631 if (op.isLast())
632 {
634 if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
635 }
636 else
637 {
638 if (!m_hide) m_t << "\n";
639 }
640}
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:5256

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

662{
663 if (m_hide) return;
665}
QCString entry() const
Definition docnode.h:559
void latexWriteIndexItem(TextStream &m_t, const QCString &s1, const QCString &s2)

References DocIndexEntry::entry(), latexWriteIndexItem(), m_hide, and m_t.

◆ operator()() [28/58]

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

Definition at line 1400 of file latexdocvisitor.cpp.

1401{
1402 if (m_hide) return;
1403 visitChildren(i);
1404}

References m_hide, and visitChildren().

◆ operator()() [29/58]

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

Definition at line 1794 of file latexdocvisitor.cpp.

1795{
1796 if (m_hide) return;
1797 startLink(QCString(),ref.file(),ref.anchor());
1798 visitChildren(ref);
1799 endLink(QCString(),ref.file(),ref.anchor());
1800}
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 327 of file latexdocvisitor.cpp.

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

References m_hide, m_insideItem, and m_t.

◆ operator()() [31/58]

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

Definition at line 1546 of file latexdocvisitor.cpp.

1547{
1548 if (m_hide) return;
1549 startLink(lnk.ref(),lnk.file(),lnk.anchor());
1550 visitChildren(lnk);
1551 endLink(lnk.ref(),lnk.file(),lnk.anchor());
1552}

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

236{
237 if (m_hide) return;
238 startLink(w.ref(),w.file(),w.anchor());
239 filter(w.word());
240 endLink(w.ref(),w.file(),w.anchor());
241}
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 1497 of file latexdocvisitor.cpp.

1498{
1499 if (m_hide) return;
1500 bool exists = false;
1501 std::string inBuf;
1502 if (readInputFile(df.file(),inBuf))
1503 {
1504 auto fileName = writeFileContents(Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file())+"_", // baseName
1505 ".msc", // extension
1506 inBuf, // contents
1507 exists);
1508 if (!fileName.isEmpty())
1509 {
1510 startMscFile(fileName,df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine(),!exists);
1511 visitChildren(df);
1512 endMscFile(df.hasCaption());
1513 }
1514 }
1515}
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine, bool newFile=true)
void endMscFile(bool hasCaption)

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

◆ operator()() [34/58]

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

Definition at line 780 of file latexdocvisitor.cpp.

781{
782 if (m_hide) return;
783 visitChildren(p);
784 if (!p.isLast() && // omit <p> for last paragraph
785 !(p.parent() && // and for parameter sections
786 std::get_if<DocParamSect>(p.parent())
787 )
788 )
789 {
790 if (insideTable())
791 {
792 m_t << "~\\newline\n";
793 }
794 else
795 {
796 m_t << "\n\n";
797 }
798 }
799}
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 1686 of file latexdocvisitor.cpp.

1687{
1688 if (m_hide) return;
1690 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1691 if (sect)
1692 {
1693 parentType = sect->type();
1694 }
1695 bool useTable = parentType==DocParamSect::Param ||
1696 parentType==DocParamSect::RetVal ||
1697 parentType==DocParamSect::Exception ||
1698 parentType==DocParamSect::TemplateParam;
1699 if (!useTable)
1700 {
1701 m_t << "\\item[";
1702 }
1703 if (sect && sect->hasInOutSpecifier())
1704 {
1706 {
1707 m_t << "\\doxymbox{\\texttt{";
1708 if (pl.direction()==DocParamSect::In)
1709 {
1710 m_t << "in";
1711 }
1712 else if (pl.direction()==DocParamSect::Out)
1713 {
1714 m_t << "out";
1715 }
1716 else if (pl.direction()==DocParamSect::InOut)
1717 {
1718 m_t << "in,out";
1719 }
1720 m_t << "}} ";
1721 }
1722 if (useTable) m_t << " & ";
1723 }
1724 if (sect && sect->hasTypeSpecifier())
1725 {
1726 for (const auto &type : pl.paramTypes())
1727 {
1728 std::visit(*this,type);
1729 }
1730 if (useTable) m_t << " & ";
1731 }
1732 m_t << "{\\em ";
1733 bool first=TRUE;
1734 for (const auto &param : pl.parameters())
1735 {
1736 if (!first) m_t << ","; else first=FALSE;
1738 std::visit(*this,param);
1740 }
1741 m_t << "}";
1742 if (useTable)
1743 {
1744 m_t << " & ";
1745 }
1746 else
1747 {
1748 m_t << "]";
1749 }
1750 for (const auto &par : pl.paragraphs())
1751 {
1752 std::visit(*this,par);
1753 }
1754 if (useTable)
1755 {
1756 m_t << "\\\\\n"
1757 << "\\hline\n";
1758 }
1759}
const DocNodeList & parameters() const
Definition docnode.h:1126
const DocNodeList & paramTypes() const
Definition docnode.h:1127
DocParamSect::Direction direction() const
Definition docnode.h:1130
const DocNodeList & paragraphs() const
Definition docnode.h:1128
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 1627 of file latexdocvisitor.cpp.

1628{
1629 if (m_hide) return;
1630 bool hasInOutSpecs = s.hasInOutSpecifier();
1631 bool hasTypeSpecs = s.hasTypeSpecifier();
1632 m_lcg.incUsedTableLevel();
1633 switch(s.type())
1634 {
1636 m_t << "\n\\begin{DoxyParams}";
1637 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1638 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1639 m_t << "{";
1641 break;
1643 m_t << "\n\\begin{DoxyRetVals}{";
1645 break;
1647 m_t << "\n\\begin{DoxyExceptions}{";
1649 break;
1651 m_t << "\n\\begin{DoxyTemplParams}{";
1653 break;
1654 default:
1655 ASSERT(0);
1657 }
1658 m_t << "}\n";
1659 visitChildren(s);
1660 m_lcg.decUsedTableLevel();
1661 switch(s.type())
1662 {
1664 m_t << "\\end{DoxyParams}\n";
1665 break;
1667 m_t << "\\end{DoxyRetVals}\n";
1668 break;
1670 m_t << "\\end{DoxyExceptions}\n";
1671 break;
1673 m_t << "\\end{DoxyTemplParams}\n";
1674 break;
1675 default:
1676 ASSERT(0);
1678 }
1679}
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 1822 of file latexdocvisitor.cpp.

1823{
1824 if (m_hide) return;
1825 visitChildren(pb);
1826}

References m_hide, and visitChildren().

◆ operator()() [38/58]

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

Definition at line 1537 of file latexdocvisitor.cpp.

1538{
1539 if (m_hide) return;
1540 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1541 startPlantUmlFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1542 visitChildren(df);
1544}
void startPlantUmlFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
void endPlantUmlFile(bool hasCaption)
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:5880

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

1555{
1556 if (m_hide) return;
1557 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1558 // ref.anchor() for LaTeX/RTF
1559 if (ref.isSubPage())
1560 {
1561 startLink(ref.ref(),QCString(),ref.anchor());
1562 }
1563 else
1564 {
1565 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1566 }
1567 if (!ref.hasLinkText())
1568 {
1569 filter(ref.targetTitle());
1570 }
1571 visitChildren(ref);
1572 if (ref.isSubPage())
1573 {
1574 endLink(ref.ref(),QCString(),ref.anchor());
1575 }
1576 else
1577 {
1578 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1579 }
1580}
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 801 of file latexdocvisitor.cpp.

802{
803 visitChildren(r);
804}

References visitChildren().

◆ operator()() [41/58]

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

Definition at line 1582 of file latexdocvisitor.cpp.

1583{
1584 if (m_hide) return;
1585 m_t << "\\item \\contentsline{section}{";
1586 if (ref.isSubPage())
1587 {
1588 startLink(ref.ref(),QCString(),ref.anchor());
1589 }
1590 else
1591 {
1592 if (!ref.file().isEmpty())
1593 {
1594 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1595 }
1596 }
1597 visitChildren(ref);
1598 if (ref.isSubPage())
1599 {
1600 endLink(ref.ref(),QCString(),ref.anchor());
1601 }
1602 else
1603 {
1604 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1605 }
1606 m_t << "}{\\ref{";
1607 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1608 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1609 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1610 m_t << "}}{}\n";
1611}
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 1613 of file latexdocvisitor.cpp.

1614{
1615 if (m_hide) return;
1616 m_t << "\\footnotesize\n";
1617 m_t << "\\begin{multicols}{2}\n";
1618 m_t << "\\begin{DoxyCompactList}\n";
1620 visitChildren(l);
1622 m_t << "\\end{DoxyCompactList}\n";
1623 m_t << "\\end{multicols}\n";
1624 m_t << "\\normalsize\n";
1625}

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

◆ operator()() [43/58]

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

Definition at line 982 of file latexdocvisitor.cpp.

983{
984 if (m_hide) return;
985 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
986 if (pdfHyperlinks)
987 {
988 m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
989 }
990 m_t << "\\" << getSectionName(s.level()) << "{";
991 if (pdfHyperlinks)
992 {
993 m_t << "\\texorpdfstring{";
994 }
995 if (s.title())
996 {
997 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::TEX;
998 std::visit(*this,*s.title());
1000 }
1001 if (pdfHyperlinks)
1002 {
1003 m_t << "}{";
1004 if (s.title())
1005 {
1006 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::PDF;
1007 std::visit(*this,*s.title());
1009 }
1010 m_t << "}";
1011 }
1012 m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
1013 visitChildren(s);
1014}
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 1681 of file latexdocvisitor.cpp.

1682{
1683 m_t << " " << sep.chars() << " ";
1684}
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 961 of file latexdocvisitor.cpp.

962{
963 if (m_hide) return;
964 m_t << "\\begin{DoxyItemize}\n";
965 m_listItemInfo[indentLevel()].isEnum = false;
966 visitChildren(l);
967 m_t << "\\end{DoxyItemize}\n";
968}

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

◆ operator()() [46/58]

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

Definition at line 970 of file latexdocvisitor.cpp.

971{
972 if (m_hide) return;
973 m_t << "\\item ";
975 if (li.paragraph())
976 {
977 visit(*this,*li.paragraph());
978 }
980}
const DocNodeVariant * paragraph() const
Definition docnode.h:1154

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

◆ operator()() [47/58]

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

Definition at line 806 of file latexdocvisitor.cpp.

807{
808 if (m_hide) return;
809 switch(s.type())
810 {
812 m_t << "\\begin{DoxySeeAlso}{";
814 break;
816 m_t << "\\begin{DoxyReturn}{";
818 break;
820 m_t << "\\begin{DoxyAuthor}{";
822 break;
824 m_t << "\\begin{DoxyAuthor}{";
826 break;
828 m_t << "\\begin{DoxyVersion}{";
830 break;
832 m_t << "\\begin{DoxySince}{";
834 break;
836 m_t << "\\begin{DoxyDate}{";
838 break;
840 m_t << "\\begin{DoxyNote}{";
842 break;
844 m_t << "\\begin{DoxyWarning}{";
846 break;
848 m_t << "\\begin{DoxyPrecond}{";
850 break;
852 m_t << "\\begin{DoxyPostcond}{";
854 break;
856 m_t << "\\begin{DoxyCopyright}{";
858 break;
860 m_t << "\\begin{DoxyInvariant}{";
862 break;
864 m_t << "\\begin{DoxyRemark}{";
866 break;
868 m_t << "\\begin{DoxyAttention}{";
870 break;
872 m_t << "\\begin{DoxyImportant}{";
874 break;
876 m_t << "\\begin{DoxyParagraph}{";
877 break;
879 m_t << "\\begin{DoxyParagraph}{";
880 break;
881 case DocSimpleSect::Unknown: break;
882 }
883
884 if (s.title())
885 {
887 std::visit(*this,*s.title());
889 }
890 m_t << "}\n";
892 visitChildren(s);
893 switch(s.type())
894 {
896 m_t << "\n\\end{DoxySeeAlso}\n";
897 break;
899 m_t << "\n\\end{DoxyReturn}\n";
900 break;
902 m_t << "\n\\end{DoxyAuthor}\n";
903 break;
905 m_t << "\n\\end{DoxyAuthor}\n";
906 break;
908 m_t << "\n\\end{DoxyVersion}\n";
909 break;
911 m_t << "\n\\end{DoxySince}\n";
912 break;
914 m_t << "\n\\end{DoxyDate}\n";
915 break;
917 m_t << "\n\\end{DoxyNote}\n";
918 break;
920 m_t << "\n\\end{DoxyWarning}\n";
921 break;
923 m_t << "\n\\end{DoxyPrecond}\n";
924 break;
926 m_t << "\n\\end{DoxyPostcond}\n";
927 break;
929 m_t << "\n\\end{DoxyCopyright}\n";
930 break;
932 m_t << "\n\\end{DoxyInvariant}\n";
933 break;
935 m_t << "\n\\end{DoxyRemark}\n";
936 break;
938 m_t << "\n\\end{DoxyAttention}\n";
939 break;
941 m_t << "\n\\end{DoxyImportant}\n";
942 break;
944 m_t << "\n\\end{DoxyParagraph}\n";
945 break;
947 m_t << "\n\\end{DoxyParagraph}\n";
948 break;
949 default:
950 break;
951 }
953}
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 667 of file latexdocvisitor.cpp.

668{
669}

◆ operator()() [49/58]

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

Definition at line 349 of file latexdocvisitor.cpp.

350{
351 if (m_hide) return;
352 switch (s.style())
353 {
355 if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
356 break;
360 if (s.enable()) m_t << "\\sout{"; else m_t << "}";
361 break;
364 if (s.enable()) m_t << "\\uline{"; else m_t << "}";
365 break;
367 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
368 break;
372 if (s.enable()) m_t << "{\\ttfamily "; else m_t << "}";
373 break;
375 if (s.enable()) m_t << "\\textsubscript{"; else m_t << "}";
376 break;
378 if (s.enable()) m_t << "\\textsuperscript{"; else m_t << "}";
379 break;
381 if (s.enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
382 break;
384 if (s.enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
385 break;
387 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
388 break;
390 if (s.enable())
391 {
392 m_t << "\n\\begin{DoxyPre}";
394 }
395 else
396 {
398 m_t << "\\end{DoxyPre}\n";
399 }
400 break;
401 case DocStyleChange::Div: /* HTML only */ break;
402 case DocStyleChange::Span: /* HTML only */ break;
403 }
404}
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 256 of file latexdocvisitor.cpp.

257{
258 if (m_hide) return;
259 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
260 const char *res = HtmlEntityMapper::instance().latex(s.symbol());
261 if (res)
262 {
264 {
265 if (pdfHyperlinks)
266 {
267 m_t << "\\texorpdfstring{$<$}{<}";
268 }
269 else
270 {
271 m_t << "$<$";
272 }
273 }
275 {
276 if (pdfHyperlinks)
277 {
278 m_t << "\\texorpdfstring{$>$}{>}";
279 }
280 else
281 {
282 m_t << "$>$";
283 }
284 }
285 else
286 {
287 m_t << res;
288 }
289 }
290 else
291 {
292 err("LaTeX: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(s.symbol(),TRUE));
293 }
294}
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 1802 of file latexdocvisitor.cpp.

1803{
1804 if (m_hide) return;
1805 visitChildren(t);
1806}

References m_hide, and visitChildren().

◆ operator()() [52/58]

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

Definition at line 955 of file latexdocvisitor.cpp.

956{
957 if (m_hide) return;
958 visitChildren(t);
959}

References m_hide, and visitChildren().

◆ operator()() [53/58]

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

Definition at line 313 of file latexdocvisitor.cpp.

314{
315 if (m_hide) return;
316 if (Config_getBool(PDF_HYPERLINKS))
317 {
318 m_t << "\\href{";
319 if (u.isEmail()) m_t << "mailto:";
320 m_t << latexFilterURL(u.url()) << "}";
321 }
322 m_t << "{\\texttt{";
323 filter(u.url());
324 m_t << "}}";
325}
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 406 of file latexdocvisitor.cpp.

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

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

◆ operator()() [55/58]

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

Definition at line 1818 of file latexdocvisitor.cpp.

1819{
1820}

◆ operator()() [56/58]

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

Definition at line 243 of file latexdocvisitor.cpp.

244{
245 if (m_hide) return;
246 if (m_insidePre)
247 {
248 m_t << w.chars();
249 }
250 else
251 {
252 m_t << " ";
253 }
254}
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 229 of file latexdocvisitor.cpp.

230{
231 if (m_hide) return;
232 filter(w.word());
233}
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 1761 of file latexdocvisitor.cpp.

1762{
1763 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1764 if (m_hide) return;
1765 if (x.title().isEmpty()) return;
1767 m_t << "\\begin{DoxyRefDesc}{";
1768 filter(x.title());
1769 m_t << "}\n";
1770 bool anonymousEnum = x.file()=="@";
1771 m_t << "\\item[";
1772 if (pdfHyperlinks && !anonymousEnum)
1773 {
1774 m_t << "\\doxymbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1775 }
1776 else
1777 {
1778 m_t << "\\textbf{ ";
1779 }
1781 filter(x.title());
1783 if (pdfHyperlinks && !anonymousEnum)
1784 {
1785 m_t << "}";
1786 }
1787 m_t << "}]";
1788 visitChildren(x);
1789 if (x.title().isEmpty()) return;
1791 m_t << "\\end{DoxyRefDesc}\n";
1792}
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,
bool newFile = true )
private

Definition at line 1967 of file latexdocvisitor.cpp.

1974{
1975 QCString baseName=makeBaseName(fileName,".dia");
1976 baseName.prepend("dia_");
1977
1978 QCString outDir = Config_getString(LATEX_OUTPUT);
1979 if (newFile) writeDiaGraphFromFile(fileName,outDir,baseName,DiaOutputFormat::EPS,srcFile,srcLine);
1980 visitPreStart(m_t,hasCaption, baseName, width, height);
1981}
QCString & prepend(const char *s)
Definition qcstring.h:422
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
Definition dia.cpp:26
QCString makeBaseName(const QCString &name, const QCString &ext)
Definition util.cpp:4968

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

Referenced by operator()().

◆ startDotFile()

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

Definition at line 1913 of file latexdocvisitor.cpp.

1920{
1921 QCString baseName=makeBaseName(fileName,".dot");
1922 baseName.prepend("dot_");
1923 QCString outDir = Config_getString(LATEX_OUTPUT);
1924 if (newFile) writeDotGraphFromFile(fileName,outDir,baseName,GraphOutputFormat::EPS,srcFile,srcLine);
1925 visitPreStart(m_t,hasCaption, baseName, width, height);
1926}
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 1841 of file latexdocvisitor.cpp.

1843{
1844 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1845 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1846 {
1847 if (refToTable)
1848 {
1849 m_t << "\\doxytablelink{";
1850 }
1851 else if (refToSection)
1852 {
1853 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1854 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxysectlink{";
1855 }
1856 else
1857 {
1858 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1859 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxylink{";
1860 }
1861 if (refToTable || m_texOrPdf != TexOrPdf::PDF)
1862 {
1863 if (!file.isEmpty()) m_t << stripPath(file);
1864 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1865 if (!anchor.isEmpty()) m_t << anchor;
1866 m_t << "}";
1867 }
1868 m_t << "{";
1869 }
1870 else if (ref.isEmpty() && refToSection)
1871 {
1872 m_t << "\\doxysectref{";
1873 }
1874 else if (ref.isEmpty() && refToTable)
1875 {
1876 m_t << "\\doxytableref{";
1877 }
1878 else if (ref.isEmpty()) // internal non-PDF link
1879 {
1880 m_t << "\\doxyref{";
1881 }
1882 else // external link
1883 {
1884 m_t << "\\textbf{ ";
1885 }
1886}

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,
bool newFile = true )
private

Definition at line 1934 of file latexdocvisitor.cpp.

1941{
1942 QCString baseName=makeBaseName(fileName,".msc");
1943 baseName.prepend("msc_");
1944
1945 QCString outDir = Config_getString(LATEX_OUTPUT);
1946 if (newFile) writeMscGraphFromFile(fileName,outDir,baseName,MscOutputFormat::EPS,srcFile,srcLine);
1947 visitPreStart(m_t,hasCaption, baseName, width, height);
1948}
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 2004 of file latexdocvisitor.cpp.

2011{
2012 QCString outDir = Config_getString(LATEX_OUTPUT);
2013 std::string inBuf;
2014 readInputFile(fileName,inBuf);
2015
2016 bool useBitmap = inBuf.find("@startditaa") != std::string::npos;
2017 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
2018 outDir,QCString(),inBuf,
2020 QCString(),srcFile,srcLine,false);
2021 bool first = true;
2022 for (const auto &bName: baseNameVector)
2023 {
2024 QCString baseName = makeBaseName(bName,".pu");
2025 QCString shortName = stripPath(baseName);
2026 if (useBitmap)
2027 {
2028 if (shortName.find('.')==-1) shortName += ".png";
2029 }
2032 if (!first) endPlantUmlFile(hasCaption);
2033 first = false;
2034 visitPreStart(m_t,hasCaption, shortName, width, height);
2035 }
2036}
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

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

Referenced by operator()().

◆ visitCaption()

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

Definition at line 209 of file latexdocvisitor.cpp.

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

Referenced by writeMscFile(), and writePlantUMLFile().

◆ visitChildren()

◆ writeEndTableCommand()

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

Definition at line 1198 of file latexdocvisitor.cpp.

1199{
1200 if (isTableNested(n))
1201 {
1202 m_t << "\\end{DoxyTableNested}\n";
1203 }
1204 else
1205 {
1206 m_t << "\\end{DoxyTable}\n";
1207 }
1208}

References isTableNested(), and m_t.

Referenced by operator()().

◆ writeMscFile()

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

Definition at line 1957 of file latexdocvisitor.cpp.

1958{
1959 QCString shortName=makeBaseName(fileName,".msc");
1960 QCString outDir = Config_getString(LATEX_OUTPUT);
1961 if (newFile) writeMscGraphFromFile(fileName,outDir,shortName,MscOutputFormat::EPS,s.srcFile(),s.srcLine());
1962 visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
1965}
const DocNodeList & children() const
Definition docnode.h:395
void visitCaption(const DocNodeList &children)

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

Referenced by operator()().

◆ writePlantUMLFile()

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

◆ writeStartTableCommand()

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

Definition at line 1186 of file latexdocvisitor.cpp.

1187{
1188 if (isTableNested(n))
1189 {
1190 m_t << "\\begin{DoxyTableNested}{" << cols << "}";
1191 }
1192 else
1193 {
1194 m_t << "\n\\begin{DoxyTable}{" << cols << "}";
1195 }
1196}

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: