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  LatexListItemInfo
 
struct  TableState
 

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 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)
 
QCString escapeMakeIndexChars (const char *s)
 
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 writeDiaFile (const QCString &fileName, const DocVerbatim &s)
 
void writePlantUMLFile (const QCString &fileName, const DocVerbatim &s)
 
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)
 
size_t numCols () const
 
void setNumCols (size_t num)
 
bool inRowSpan () const
 
void setInRowSpan (bool b)
 
bool inColSpan () const
 
void setInColSpan (bool b)
 
bool firstRow () const
 
void setFirstRow (bool b)
 
RowSpanListrowSpans ()
 
void addRowSpan (ActiveRowSpan &&span)
 
bool insideTable () const
 

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

269 : m_t(t), m_ci(ci), m_lcg(lcg), m_insidePre(FALSE),
271 m_langExt(langExt), m_hierarchyLevel(hierarchyLevel)
272{
273}
OutputCodeList & m_ci
LatexCodeGenerator & m_lcg
#define FALSE
Definition qcstring.h:34

Member Function Documentation

◆ addRowSpan()

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

Definition at line 254 of file latexdocvisitor.h.

255 {
256 if (!m_tableStateStack.empty()) m_tableStateStack.top().rowSpans.push_back(std::move(span));
257 }
std::stack< TableState > m_tableStateStack

References m_tableStateStack.

Referenced by operator()().

◆ currentColumn()

size_t LatexDocVisitor::currentColumn ( ) const
inlineprivate

Definition at line 210 of file latexdocvisitor.h.

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

References m_tableStateStack.

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

◆ decIndentLevel()

void LatexDocVisitor::decIndentLevel ( )
private

Definition at line 2056 of file latexdocvisitor.cpp.

2057{
2058 if (m_indentLevel>0)
2059 {
2060 m_indentLevel--;
2061 }
2062}

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

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

1955{
1956 if (m_hide) return;
1957 visitPostEnd(m_t,hasCaption);
1958}

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

1914{
1915 m_t << "}";
1916 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1917 if (ref.isEmpty() && !pdfHyperLinks)
1918 {
1919 m_t << "{";
1921 m_t << "}{" << file;
1922 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1923 m_t << anchor << "}";
1924 if (refToSection)
1925 {
1926 m_t << "{" << sectionType.level() << "}";
1927 }
1928 }
1929 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1930 {
1931 if (refToSection)
1932 {
1933 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1934 }
1935 }
1936}
void filter(const QCString &str, const bool retainNewLine=false)
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:143
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, theTranslator, and Translator::trPageAbbreviation().

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

◆ endMscFile()

void LatexDocVisitor::endMscFile ( bool hasCaption)
private

Definition at line 1976 of file latexdocvisitor.cpp.

1977{
1978 if (m_hide) return;
1979 visitPostEnd(m_t,hasCaption);
1980}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ escapeMakeIndexChars()

QCString LatexDocVisitor::escapeMakeIndexChars ( const char * s)
private

Definition at line 239 of file latexdocvisitor.cpp.

240{
241 QCString result;
242 const char *p=s;
243 char str[2]; str[1]=0;
244 char c = 0;
245 if (p)
246 {
247 while ((c=*p++))
248 {
249 switch (c)
250 {
251 case '!': m_t << "\"!"; break;
252 case '"': m_t << "\"\""; break;
253 case '@': m_t << "\"@"; break;
254 case '|': m_t << "\\texttt{\"|}"; break;
255 case '[': m_t << "["; break;
256 case ']': m_t << "]"; break;
257 case '{': m_t << "\\lcurly{}"; break;
258 case '}': m_t << "\\rcurly{}"; break;
259 default: str[0]=c; filter(str); break;
260 }
261 }
262 }
263 return result;
264}
This is an alternative implementation of QCString.
Definition qcstring.h:94

References filter(), and m_t.

◆ filter()

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

Definition at line 1853 of file latexdocvisitor.cpp.

1854{
1855 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d\n",qPrint(str),m_ci.insideTabbing());
1860 m_lcg.usedTableLevel()>0, // insideTable
1861 false, // keepSpaces
1862 retainNewLine
1863 );
1864}
int usedTableLevel() const
Definition latexgen.h:62
bool insideTabbing() const
Definition latexgen.h:67
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline)

References filterLatexString(), LatexCodeGenerator::insideTabbing(), m_insideItem, m_insidePre, m_lcg, m_t, and LatexCodeGenerator::usedTableLevel().

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

◆ firstRow()

bool LatexDocVisitor::firstRow ( ) const
inlineprivate

Definition at line 242 of file latexdocvisitor.h.

243 {
244 return !m_tableStateStack.empty() ? m_tableStateStack.top().firstRow : FALSE;
245 }

References FALSE, and m_tableStateStack.

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

◆ getSectionName()

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

Definition at line 58 of file latexdocvisitor.cpp.

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

2048{
2049 m_indentLevel++;
2051 {
2052 err("Maximum indent level (%d) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2053 }
2054}
static const int maxIndentLevels
#define err(fmt,...)
Definition message.h:84

References err, m_indentLevel, and maxIndentLevels.

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

◆ inColSpan()

bool LatexDocVisitor::inColSpan ( ) const
inlineprivate

Definition at line 234 of file latexdocvisitor.h.

235 {
236 return !m_tableStateStack.empty() ? m_tableStateStack.top().inColSpan : FALSE;
237 }

References FALSE, and m_tableStateStack.

Referenced by operator()().

◆ indentLevel()

int LatexDocVisitor::indentLevel ( ) const
private

Definition at line 2042 of file latexdocvisitor.cpp.

2043{
2044 return std::min(m_indentLevel,maxIndentLevels-1);
2045}

References m_indentLevel, and maxIndentLevels.

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

◆ inRowSpan()

bool LatexDocVisitor::inRowSpan ( ) const
inlineprivate

Definition at line 226 of file latexdocvisitor.h.

227 {
228 return !m_tableStateStack.empty() ? m_tableStateStack.top().inRowSpan : FALSE;
229 }

References FALSE, and m_tableStateStack.

Referenced by operator()().

◆ insideTable()

bool LatexDocVisitor::insideTable ( ) const
inlineprivate

Definition at line 258 of file latexdocvisitor.h.

259 {
260 return !m_tableStateStack.empty();
261 }

References m_tableStateStack.

Referenced by operator()().

◆ numCols()

size_t LatexDocVisitor::numCols ( ) const
inlineprivate

Definition at line 218 of file latexdocvisitor.h.

219 {
220 return !m_tableStateStack.empty() ? m_tableStateStack.top().numCols : 0;
221 }

References m_tableStateStack.

Referenced by operator()().

◆ operator()() [1/57]

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

Definition at line 560 of file latexdocvisitor.cpp.

561{
562 if (m_hide) return;
563 m_t << "\\label{" << stripPath(anc.file()) << "_" << anc.anchor() << "}%\n";
564 if (!anc.file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
565 {
566 m_t << "\\Hypertarget{" << stripPath(anc.file()) << "_" << anc.anchor()
567 << "}%\n";
568 }
569}
QCString anchor() const
Definition docnode.h:230
QCString file() const
Definition docnode.h:231
QCString stripPath(const QCString &s)
Definition util.cpp:5216

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

◆ operator()() [2/57]

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

Definition at line 752 of file latexdocvisitor.cpp.

753{
754 if (m_hide) return;
755 if (m_indentLevel>=maxIndentLevels-1) return;
756 if (l.isEnumList())
757 {
758 m_t << "\n\\begin{DoxyEnumerate}";
760 }
761 else
762 {
764 m_t << "\n\\begin{DoxyItemize}";
765 }
766 visitChildren(l);
767 if (l.isEnumList())
768 {
769 m_t << "\n\\end{DoxyEnumerate}";
770 }
771 else
772 {
773 m_t << "\n\\end{DoxyItemize}";
774 }
775}
bool isEnumList() const
Definition docnode.h:552
LatexListItemInfo m_listItemInfo[maxIndentLevels]
void visitChildren(const T &t)

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

◆ operator()() [3/57]

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

Definition at line 777 of file latexdocvisitor.cpp.

778{
779 if (m_hide) return;
780 switch (li.itemNumber())
781 {
782 case DocAutoList::Unchecked: // unchecked
783 m_t << "\n\\item[\\DoxyUnchecked] ";
784 break;
785 case DocAutoList::Checked_x: // checked with x
786 case DocAutoList::Checked_X: // checked with X
787 m_t << "\n\\item[\\DoxyChecked] ";
788 break;
789 default:
790 m_t << "\n\\item ";
791 break;
792 }
794 visitChildren(li);
796}
int itemNumber() const
Definition docnode.h:570

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

◆ operator()() [4/57]

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

Definition at line 729 of file latexdocvisitor.cpp.

730{
731 if (m_hide) return;
732 if (!cite.file().isEmpty())
733 {
734 //startLink(cite.ref(),cite.file(),cite.anchor());
735 QCString anchor = cite.anchor();
737 anchor = anchor.mid(anchorPrefix.length()); // strip prefix
738 m_t << "\\cite{" << anchor << "}";
739 }
740 else
741 {
742 m_t << "{\\bfseries [";
743 filter(cite.text());
744 m_t << "]}";
745 }
746}
QCString anchorPrefix() const
Definition cite.cpp:113
static CitationManager & instance()
Definition cite.cpp:68
QCString text() const
Definition docnode.h:250
QCString anchor() const
Definition docnode.h:249
QCString file() const
Definition docnode.h:246
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:146
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:219

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

◆ operator()() [5/57]

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

Definition at line 1562 of file latexdocvisitor.cpp.

1563{
1564 if (m_hide) return;
1565 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1566 startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1567 visitChildren(df);
1568 endDiaFile(df.hasCaption());
1569}
QCString height() const
Definition docnode.h:660
QCString srcFile() const
Definition docnode.h:662
QCString file() const
Definition docnode.h:656
int srcLine() const
Definition docnode.h:663
bool hasCaption() const
Definition docnode.h:658
QCString width() const
Definition docnode.h:659
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:6092

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/57]

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

Definition at line 1544 of file latexdocvisitor.cpp.

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

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

Definition at line 346 of file latexdocvisitor.cpp.

347{
348 if (m_hide) return;
350 if (!emojiName.isEmpty())
351 {
352 QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
353 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxygenemoji{";
354 filter(emojiName);
355 if (m_texOrPdf != TexOrPdf::PDF) m_t << "}{" << imageName << "}";
356 }
357 else
358 {
359 m_t << s.name();
360 }
361}
int index() const
Definition docnode.h:324
QCString name() const
Definition docnode.h:323
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:1968
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1920

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/57]

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

Definition at line 696 of file latexdocvisitor.cpp.

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

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

◆ operator()() [9/57]

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

Definition at line 383 of file latexdocvisitor.cpp.

384{
385 if (m_hide) return;
386 if (insideTable())
387 m_t << "\\DoxyHorRuler{1}\n";
388 else
389 m_t << "\\DoxyHorRuler{0}\n";
390}
bool insideTable() const

References insideTable(), m_hide, and m_t.

◆ operator()() [10/57]

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

Definition at line 1473 of file latexdocvisitor.cpp.

1474{
1475 if (m_hide) return;
1476 if (Config_getBool(PDF_HYPERLINKS))
1477 {
1478 m_t << "\\href{";
1479 m_t << latexFilterURL(href.url());
1480 m_t << "}";
1481 }
1482 m_t << "{\\texttt{ ";
1483 visitChildren(href);
1484 m_t << "}}";
1485}
QCString url() const
Definition docnode.h:792
QCString latexFilterURL(const QCString &s)

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

◆ operator()() [11/57]

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

Definition at line 1833 of file latexdocvisitor.cpp.

1834{
1835 if (m_hide) return;
1836 m_t << "\\begin{quote}\n";
1838 visitChildren(q);
1839 m_t << "\\end{quote}\n";
1841}

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

◆ operator()() [12/57]

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

Definition at line 1268 of file latexdocvisitor.cpp.

1269{
1270 if (m_hide) return;
1271 visitChildren(c);
1272}

References m_hide, and visitChildren().

◆ operator()() [13/57]

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

Definition at line 1352 of file latexdocvisitor.cpp.

1353{
1354 if (m_hide) return;
1355
1356 const DocHtmlRow *row = std::get_if<DocHtmlRow>(c.parent());
1357
1359
1360 //Skip columns that span from above.
1361 for (const auto &span : rowSpans())
1362 {
1363 if (span.rowSpan>0 && span.column==currentColumn())
1364 {
1365 if (row && span.colSpan>1)
1366 {
1367 m_t << "\\multicolumn{" << span.colSpan << "}{";
1368 if (currentColumn() /*c.columnIndex()*/==1) // add extra | for first column
1369 {
1370 m_t << "|";
1371 }
1372 m_t << "l|}{" << (c.isHeading()? "\\columncolor{\\tableheadbgcolor}" : "") << "}"; // alignment not relevant, empty column
1373 setCurrentColumn(currentColumn()+span.colSpan);
1374 }
1375 else
1376 {
1378 }
1379 m_t << "&";
1380 }
1381 }
1382
1383 int cs = c.colSpan();
1384 int a = c.alignment();
1385 if (cs>1 && row)
1386 {
1388 m_t << "\\multicolumn{" << cs << "}{";
1389 if (c.columnIndex()==1) // add extra | for first column
1390 {
1391 m_t << "|";
1392 }
1393 switch (a)
1394 {
1395 case DocHtmlCell::Right:
1396 m_t << "r|}{";
1397 break;
1399 m_t << "c|}{";
1400 break;
1401 default:
1402 m_t << "l|}{";
1403 break;
1404 }
1405 }
1406 int rs = c.rowSpan();
1407 int va = c.valignment();
1408 if (rs>0)
1409 {
1411 m_t << "\\multirow";
1412 switch(va)
1413 {
1414 case DocHtmlCell::Top:
1415 m_t << "[t]";
1416 break;
1418 m_t << "[b]";
1419 break;
1421 break; // No alignment option needed
1422 default:
1423 break;
1424 }
1425 //printf("adding row span: cell={r=%d c=%d rs=%d cs=%d} curCol=%d\n",
1426 // c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),
1427 // currentColumn());
1429 m_t << "{" << rs << "}{*}{";
1430 }
1431 if (a==DocHtmlCell::Center)
1432 {
1433 m_t << "\\PBS\\centering ";
1434 }
1435 else if (a==DocHtmlCell::Right)
1436 {
1437 m_t << "\\PBS\\raggedleft ";
1438 }
1439 if (c.isHeading())
1440 {
1441 m_t << "\\cellcolor{\\tableheadbgcolor}\\textbf{ ";
1442 }
1443 if (cs>1)
1444 {
1446 }
1447
1448 visitChildren(c);
1449
1450 if (c.isHeading())
1451 {
1452 m_t << "}";
1453 }
1454 if (inRowSpan())
1455 {
1457 m_t << "}";
1458 }
1459 if (inColSpan())
1460 {
1462 m_t << "}";
1463 }
1464 if (!c.isLast()) m_t << "&";
1465}
Valignment valignment() const
Definition docnode.cpp:1781
uint32_t columnIndex() const
Definition docnode.h:1171
uint32_t rowSpan() const
Definition docnode.cpp:1719
Alignment alignment() const
Definition docnode.cpp:1743
bool isLast() const
Definition docnode.h:1164
bool isHeading() const
Definition docnode.h:1162
uint32_t colSpan() const
Definition docnode.cpp:1731
Node representing a HTML table row.
Definition docnode.h:1208
DocNodeVariant * parent()
Definition docnode.h:88
RowSpanList & rowSpans()
void setCurrentColumn(size_t col)
void setInColSpan(bool b)
void addRowSpan(ActiveRowSpan &&span)
size_t currentColumn() const
bool inRowSpan() const
bool inColSpan() const
void setInRowSpan(bool b)
#define TRUE
Definition qcstring.h:37
Helper class to compute the grid for an HTML style table.
Definition docnode.cpp:2085

References addRowSpan(), DocHtmlCell::alignment(), DocHtmlCell::Bottom, DocHtmlCell::Center, DocHtmlCell::colSpan(), DocHtmlCell::columnIndex(), currentColumn(), FALSE, inColSpan(), inRowSpan(), DocHtmlCell::isHeading(), DocHtmlCell::isLast(), m_hide, m_t, DocHtmlCell::Middle, DocNode::parent(), DocHtmlCell::Right, DocHtmlCell::rowSpan(), rowSpans(), setCurrentColumn(), setInColSpan(), setInRowSpan(), DocHtmlCell::Top, TRUE, DocHtmlCell::valignment(), and visitChildren().

◆ operator()() [14/57]

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

Definition at line 1174 of file latexdocvisitor.cpp.

1175{
1177 if (!m_insideItem) m_t << "\\hfill";
1178 m_t << " \\\\\n";
1179 visitChildren(dd);
1181}

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

◆ operator()() [15/57]

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

Definition at line 1140 of file latexdocvisitor.cpp.

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

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

◆ operator()() [16/57]

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

Definition at line 1164 of file latexdocvisitor.cpp.

1165{
1166 if (m_hide) return;
1167 m_t << "\n\\item[";
1169 visitChildren(dt);
1171 m_t << "]";
1172}

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

◆ operator()() [17/57]

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

Definition at line 1495 of file latexdocvisitor.cpp.

1496{
1497 if (m_hide) return;
1498 m_t << "\n\n";
1499 auto summary = d.summary();
1500 if (summary)
1501 {
1502 std::visit(*this,*summary);
1503 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1504 }
1505 visitChildren(d);
1506 if (summary)
1507 {
1508 m_t << "\\end{adjustwidth}\n";
1509 }
1510 else
1511 {
1512 m_t << "\n\n";
1513 }
1514}
const DocNodeVariant * summary() const
Definition docnode.h:826

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

◆ operator()() [18/57]

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

Definition at line 1516 of file latexdocvisitor.cpp.

1517{
1518 if (m_hide) return;
1519 m_t << "\\" << getSectionName(header.level()) << "*{";
1520 visitChildren(header);
1521 m_t << "}";
1522}
int level() const
Definition docnode.h:839
const char * getSectionName(int level) const

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

◆ operator()() [19/57]

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

Definition at line 1024 of file latexdocvisitor.cpp.

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

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

◆ operator()() [20/57]

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

Definition at line 1091 of file latexdocvisitor.cpp.

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

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

◆ operator()() [21/57]

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

Definition at line 1274 of file latexdocvisitor.cpp.

1275{
1276 if (m_hide) return;
1278
1279 visitChildren(row);
1280
1281 size_t c=currentColumn();
1282 while (c<=numCols()) // end of row while inside a row span?
1283 {
1284 for (const auto &span : rowSpans())
1285 {
1286 //printf(" found row span: column=%d rs=%d cs=%d rowIdx=%d cell->rowIdx=%d i=%d c=%d\n",
1287 // span->column, span->rowSpan,span->colSpan,row.rowIndex(),span->cell->rowIndex(),i,c);
1288 if (span.rowSpan>0 && span.column==c && // we are at a cell in a row span
1289 row.rowIndex()>span.cell.rowIndex() // but not the row that started the span
1290 )
1291 {
1292 m_t << "&";
1293 if (span.colSpan>1) // row span is also part of a column span
1294 {
1295 m_t << "\\multicolumn{" << span.colSpan << "}{";
1296 m_t << "}|}{}";
1297 }
1298 else // solitary row span
1299 {
1300 m_t << "\\multicolumn{1}{c|}{}";
1301 }
1302 }
1303 }
1304 c++;
1305 }
1306
1307 m_t << "\\\\";
1308
1309 size_t col = 1;
1310 for (auto &span : rowSpans())
1311 {
1312 if (span.rowSpan>0) span.rowSpan--;
1313 if (span.rowSpan<=0)
1314 {
1315 // inactive span
1316 }
1317 else if (span.column>col)
1318 {
1319 m_t << "\\cline{" << col << "-" << (span.column-1) << "}";
1320 col = span.column+span.colSpan;
1321 }
1322 else
1323 {
1324 col = span.column+span.colSpan;
1325 }
1326 }
1327
1328 if (col <= numCols())
1329 {
1330 m_t << "\\cline{" << col << "-" << numCols() << "}";
1331 }
1332
1333 m_t << "\n";
1334
1335 const DocNodeVariant *n = ::parent(row.parent());
1336 if (row.isHeading() && row.rowIndex()==1 && !tableIsNested(n))
1337 {
1338 if (firstRow())
1339 {
1340 m_t << "\\endfirsthead\n";
1341 m_t << "\\hline\n";
1342 m_t << "\\endfoot\n";
1343 m_t << "\\hline\n";
1344 }
1345 else
1346 {
1347 m_t << "\\endhead\n";
1348 }
1349 }
1350}
bool isHeading() const
Definition docnode.cpp:1803
uint32_t rowIndex() const
Definition docnode.h:1220
bool firstRow() const
size_t numCols() const
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:1292
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary > DocNodeVariant
Definition docnode.h:65
static bool tableIsNested(const DocNodeVariant *n)

References currentColumn(), firstRow(), DocHtmlRow::isHeading(), m_hide, m_t, numCols(), DocNode::parent(), parent(), DocHtmlRow::rowIndex(), rowSpans(), setCurrentColumn(), tableIsNested(), and visitChildren().

◆ operator()() [22/57]

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

Definition at line 1487 of file latexdocvisitor.cpp.

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

References m_hide, m_t, and visitChildren().

◆ operator()() [23/57]

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

Definition at line 1220 of file latexdocvisitor.cpp.

1221{
1222 if (m_hide) return;
1224 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1225 if (c)
1226 {
1227 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1228 if (!c->file().isEmpty() && pdfHyperLinks)
1229 {
1230 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1231 << "}{}";
1232 }
1233 m_t << "\n";
1234 }
1235
1237
1238 if (c)
1239 {
1240 m_t << "\\caption{";
1241 std::visit(*this, *t.caption());
1242 m_t << "}";
1243 m_t << "\\label{" << stripPath(c->file()) << "_" << c->anchor() << "}";
1244 m_t << "\\\\\n";
1245 }
1246
1248 m_t << "\\hline\n";
1249
1250 // check if first row is a heading and then render the row already here
1251 // and end it with \endfirsthead (triggered via m_firstRow==TRUE)
1252 // then repeat the row as normal and end it with \endhead (m_firstRow==FALSE)
1253 const DocHtmlRow *firstRow = std::get_if<DocHtmlRow>(t.firstRow());
1254 if (firstRow && firstRow->isHeading())
1255 {
1257 if (!tableIsNested(t.parent()))
1258 {
1259 std::visit(*this,*t.firstRow());
1260 }
1262 }
1263 visitChildren(t);
1265 popTableState();
1266}
Node representing a HTML table caption.
Definition docnode.h:1190
QCString anchor() const
Definition docnode.h:1197
QCString file() const
Definition docnode.h:1196
size_t numColumns() const
Definition docnode.h:1240
const DocNodeVariant * caption() const
Definition docnode.cpp:1949
const DocNodeVariant * firstRow() const
Definition docnode.cpp:1954
void setFirstRow(bool b)
void setNumCols(size_t num)
static void writeStartTableCommand(TextStream &t, const DocNodeVariant *n, size_t cols)
static void writeEndTableCommand(TextStream &t, const DocNodeVariant *n)

References DocHtmlCaption::anchor(), DocHtmlTable::caption(), Config_getBool, FALSE, DocHtmlCaption::file(), DocHtmlTable::firstRow(), firstRow(), QCString::isEmpty(), m_hide, m_t, DocHtmlTable::numColumns(), DocNode::parent(), popTableState(), pushTableState(), setFirstRow(), setNumCols(), stripPath(), tableIsNested(), TRUE, visitChildren(), writeEndTableCommand(), and writeStartTableCommand().

◆ operator()() [24/57]

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

Definition at line 1524 of file latexdocvisitor.cpp.

1525{
1526 if (img.type()==DocImage::Latex)
1527 {
1528 if (m_hide) return;
1529 QCString gfxName = img.name();
1530 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1531 {
1532 gfxName=gfxName.left(gfxName.length()-4);
1533 }
1534
1535 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1536 visitChildren(img);
1538 }
1539 else // other format -> skip
1540 {
1541 }
1542}
QCString name() const
Definition docnode.h:619
QCString height() const
Definition docnode.h:622
Type type() const
Definition docnode.h:618
QCString width() const
Definition docnode.h:621
bool isInlineImage() const
Definition docnode.h:625
bool hasCaption() const
Definition docnode.h:620
bool endsWith(const char *s) const
Definition qcstring.h:495
QCString left(size_t len) const
Definition qcstring.h:207
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/57]

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

Definition at line 571 of file latexdocvisitor.cpp.

572{
573 if (m_hide) return;
575 switch(inc.type())
576 {
578 {
579 m_ci.startCodeFragment("DoxyCodeInclude");
580 FileInfo cfi( inc.file().str() );
581 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
583 inc.text(),
584 langExt,
585 inc.isExample(),
586 inc.exampleFile(),
587 fd.get(), // fileDef,
588 -1, // start line
589 -1, // end line
590 FALSE, // inline fragment
591 nullptr, // memberDef
592 TRUE // show line numbers
593 );
594 m_ci.endCodeFragment("DoxyCodeInclude");
595 }
596 break;
598 {
599 m_ci.startCodeFragment("DoxyCodeInclude");
601 inc.text(),langExt,inc.isExample(),
602 inc.exampleFile(),
603 nullptr, // fileDef
604 -1, // startLine
605 -1, // endLine
606 TRUE, // inlineFragment
607 nullptr, // memberDef
608 FALSE
609 );
610 m_ci.endCodeFragment("DoxyCodeInclude");
611 }
612 break;
620 break;
622 m_t << inc.text();
623 break;
625 m_t << "\n\\begin{DoxyVerbInclude}\n";
626 m_t << inc.text();
627 m_t << "\\end{DoxyVerbInclude}\n";
628 break;
632 {
633 m_ci.startCodeFragment("DoxyCodeInclude");
635 inc.file(),
636 inc.blockId(),
637 inc.context(),
640 );
641 m_ci.endCodeFragment("DoxyCodeInclude");
642 }
643 break;
644 }
645}
void parseCodeFragment(OutputCodeList &codeOutList, const QCString &fileName, const QCString &blockId, const QCString &scopeName, bool showLineNumbers, bool trimLeft)
static CodeFragmentManager & instance()
virtual void parseCode(OutputCodeList &codeOutList, const QCString &scopeName, const QCString &input, SrcLangExt lang, 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:432
QCString extension() const
Definition docnode.h:428
@ LatexInclude
Definition docnode.h:416
@ SnippetTrimLeft
Definition docnode.h:419
@ SnippetWithLines
Definition docnode.h:417
@ DontIncWithLines
Definition docnode.h:418
@ IncWithLines
Definition docnode.h:417
@ HtmlInclude
Definition docnode.h:416
@ VerbInclude
Definition docnode.h:416
@ DontInclude
Definition docnode.h:416
@ DocbookInclude
Definition docnode.h:418
Type type() const
Definition docnode.h:429
QCString exampleFile() const
Definition docnode.h:434
QCString text() const
Definition docnode.h:430
QCString file() const
Definition docnode.h:427
bool isExample() const
Definition docnode.h:433
QCString context() const
Definition docnode.h:431
CodeParserInterface & getCodeParser(const QCString &langExt)
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
void endCodeFragment(const QCString &style)
Definition outputlist.h:258
void startCodeFragment(const QCString &style)
Definition outputlist.h:255
const std::string & str() const
Definition qcstring.h:517
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:263
SrcLangExt
Language as given by extension.
Definition types.h:42
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5472

References DocInclude::blockId(), DocInclude::context(), createFileDef(), FileInfo::dirPath(), DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::DontIncWithLines, OutputCodeList::endCodeFragment(), DocInclude::exampleFile(), DocInclude::extension(), FALSE, DocInclude::file(), FileInfo::fileName(), DocVisitor::getCodeParser(), getLanguageFromFileName(), DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncWithLines, CodeFragmentManager::instance(), DocInclude::isExample(), DocInclude::LatexInclude, m_ci, m_hide, m_t, DocInclude::ManInclude, CodeParserInterface::parseCode(), CodeFragmentManager::parseCodeFragment(), DocInclude::RtfInclude, DocInclude::Snippet, DocInclude::SnippetTrimLeft, DocInclude::SnippetWithLines, OutputCodeList::startCodeFragment(), QCString::str(), DocInclude::text(), TRUE, DocInclude::type(), DocInclude::VerbInclude, and DocInclude::XmlInclude.

◆ operator()() [26/57]

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

Definition at line 647 of file latexdocvisitor.cpp.

648{
649 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
650 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
651 if (op.isFirst())
652 {
653 if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
655 m_hide = TRUE;
656 }
658 if (locLangExt.isEmpty()) locLangExt = m_langExt;
659 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
660 if (op.type()!=DocIncOperator::Skip)
661 {
662 m_hide = popHidden();
663 if (!m_hide)
664 {
665 std::unique_ptr<FileDef> fd;
666 if (!op.includeFileName().isEmpty())
667 {
668 FileInfo cfi( op.includeFileName().str() );
669 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
670 }
671
672 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
673 op.isExample(),op.exampleFile(),
674 fd.get(), // fileDef
675 op.line(), // startLine
676 -1, // endLine
677 FALSE, // inline fragment
678 nullptr, // memberDef
679 op.showLineNo() // show line numbers
680 );
681 }
683 m_hide=TRUE;
684 }
685 if (op.isLast())
686 {
688 if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
689 }
690 else
691 {
692 if (!m_hide) m_t << "\n";
693 }
694}
bool isLast() const
Definition docnode.h:477
QCString includeFileName() const
Definition docnode.h:482
QCString text() const
Definition docnode.h:473
QCString context() const
Definition docnode.h:475
QCString exampleFile() const
Definition docnode.h:481
int line() const
Definition docnode.h:471
Type type() const
Definition docnode.h:459
bool isFirst() const
Definition docnode.h:476
bool showLineNo() const
Definition docnode.h:472
bool isExample() const
Definition docnode.h:480
void pushHidden(bool hide)
bool popHidden()
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5514

References DocIncOperator::context(), createFileDef(), FileInfo::dirPath(), OutputCodeList::endCodeFragment(), 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, OutputCodeList::startCodeFragment(), QCString::str(), DocIncOperator::text(), TRUE, and DocIncOperator::type().

◆ operator()() [27/57]

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

Definition at line 715 of file latexdocvisitor.cpp.

716{
717 if (m_hide) return;
718 m_t << "\\index{";
720 m_t << "@{";
722 m_t << "}}";
723}
QCString entry() const
Definition docnode.h:531
QCString latexEscapeIndexChars(const QCString &s)
QCString latexEscapeLabelName(const QCString &s)

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

◆ operator()() [28/57]

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

Definition at line 1467 of file latexdocvisitor.cpp.

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

References m_hide, and visitChildren().

◆ operator()() [29/57]

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

Definition at line 1819 of file latexdocvisitor.cpp.

1820{
1821 if (m_hide) return;
1822 startLink(QCString(),ref.file(),ref.anchor());
1823 visitChildren(ref);
1824 endLink(QCString(),ref.file(),ref.anchor());
1825}
QCString file() const
Definition docnode.h:773
QCString anchor() const
Definition docnode.h:775
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/57]

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

Definition at line 377 of file latexdocvisitor.cpp.

378{
379 if (m_hide) return;
380 m_t << "~\\newline\n";
381}

References m_hide, and m_t.

◆ operator()() [31/57]

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

Definition at line 1571 of file latexdocvisitor.cpp.

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

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

◆ operator()() [32/57]

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

Definition at line 285 of file latexdocvisitor.cpp.

286{
287 if (m_hide) return;
288 startLink(w.ref(),w.file(),w.anchor());
289 filter(w.word());
290 endLink(w.ref(),w.file(),w.anchor());
291}
QCString file() const
Definition docnode.h:169
QCString ref() const
Definition docnode.h:171
QCString word() const
Definition docnode.h:168
QCString anchor() const
Definition docnode.h:172

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

◆ operator()() [33/57]

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

Definition at line 1553 of file latexdocvisitor.cpp.

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

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

Definition at line 798 of file latexdocvisitor.cpp.

799{
800 if (m_hide) return;
801 visitChildren(p);
802 if (!p.isLast() && // omit <p> for last paragraph
803 !(p.parent() && // and for parameter sections
804 std::get_if<DocParamSect>(p.parent())
805 )
806 ) m_t << "\n\n";
807}
bool isLast() const
Definition docnode.h:1050

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

◆ operator()() [35/57]

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

Definition at line 1711 of file latexdocvisitor.cpp.

1712{
1713 if (m_hide) return;
1715 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1716 if (sect)
1717 {
1718 parentType = sect->type();
1719 }
1720 bool useTable = parentType==DocParamSect::Param ||
1721 parentType==DocParamSect::RetVal ||
1722 parentType==DocParamSect::Exception ||
1723 parentType==DocParamSect::TemplateParam;
1724 if (!useTable)
1725 {
1726 m_t << "\\item[";
1727 }
1728 if (sect && sect->hasInOutSpecifier())
1729 {
1731 {
1732 m_t << "\\mbox{\\texttt{ ";
1733 if (pl.direction()==DocParamSect::In)
1734 {
1735 m_t << "in";
1736 }
1737 else if (pl.direction()==DocParamSect::Out)
1738 {
1739 m_t << "out";
1740 }
1741 else if (pl.direction()==DocParamSect::InOut)
1742 {
1743 m_t << "in,out";
1744 }
1745 m_t << "}} ";
1746 }
1747 if (useTable) m_t << " & ";
1748 }
1749 if (sect && sect->hasTypeSpecifier())
1750 {
1751 for (const auto &type : pl.paramTypes())
1752 {
1753 std::visit(*this,type);
1754 }
1755 if (useTable) m_t << " & ";
1756 }
1757 m_t << "{\\em ";
1758 bool first=TRUE;
1759 for (const auto &param : pl.parameters())
1760 {
1761 if (!first) m_t << ","; else first=FALSE;
1763 std::visit(*this,param);
1765 }
1766 m_t << "}";
1767 if (useTable)
1768 {
1769 m_t << " & ";
1770 }
1771 else
1772 {
1773 m_t << "]";
1774 }
1775 for (const auto &par : pl.paragraphs())
1776 {
1777 std::visit(*this,par);
1778 }
1779 if (useTable)
1780 {
1781 m_t << "\\\\\n"
1782 << "\\hline\n";
1783 }
1784}
DocParamSect::Direction direction() const
Definition docnode.h:1095
Node representing a parameter section.
Definition docnode.h:1015
bool hasInOutSpecifier() const
Definition docnode.h:1031
bool hasTypeSpecifier() const
Definition docnode.h:1032
Type type() const
Definition docnode.h:1030

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/57]

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

Definition at line 1652 of file latexdocvisitor.cpp.

1653{
1654 if (m_hide) return;
1655 bool hasInOutSpecs = s.hasInOutSpecifier();
1656 bool hasTypeSpecs = s.hasTypeSpecifier();
1658 switch(s.type())
1659 {
1661 m_t << "\n\\begin{DoxyParams}";
1662 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1663 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1664 m_t << "{";
1666 break;
1668 m_t << "\n\\begin{DoxyRetVals}{";
1670 break;
1672 m_t << "\n\\begin{DoxyExceptions}{";
1674 break;
1676 m_t << "\n\\begin{DoxyTemplParams}{";
1678 break;
1679 default:
1680 ASSERT(0);
1682 }
1683 m_t << "}\n";
1684 visitChildren(s);
1686 switch(s.type())
1687 {
1689 m_t << "\\end{DoxyParams}\n";
1690 break;
1692 m_t << "\\end{DoxyRetVals}\n";
1693 break;
1695 m_t << "\\end{DoxyExceptions}\n";
1696 break;
1698 m_t << "\\end{DoxyTemplParams}\n";
1699 break;
1700 default:
1701 ASSERT(0);
1703 }
1704}
void decUsedTableLevel()
Definition latexgen.h:61
void incUsedTableLevel()
Definition latexgen.h:60
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(), LatexCodeGenerator::decUsedTableLevel(), DocParamSect::Exception, filter(), DocParamSect::hasInOutSpecifier(), DocParamSect::hasTypeSpecifier(), incIndentLevel(), LatexCodeGenerator::incUsedTableLevel(), m_hide, m_lcg, m_t, DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, theTranslator, Translator::trExceptions(), Translator::trParameters(), Translator::trReturnValues(), Translator::trTemplateParameters(), DocParamSect::type(), and visitChildren().

◆ operator()() [37/57]

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

Definition at line 1847 of file latexdocvisitor.cpp.

1848{
1849 if (m_hide) return;
1850 visitChildren(pb);
1851}

References m_hide, and visitChildren().

◆ operator()() [38/57]

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

Definition at line 1579 of file latexdocvisitor.cpp.

1580{
1581 if (m_hide) return;
1582 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1583 // ref.anchor() for LaTeX/RTF
1584 if (ref.isSubPage())
1585 {
1586 startLink(ref.ref(),QCString(),ref.anchor());
1587 }
1588 else
1589 {
1590 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1591 }
1592 if (!ref.hasLinkText())
1593 {
1594 filter(ref.targetTitle());
1595 }
1596 visitChildren(ref);
1597 if (ref.isSubPage())
1598 {
1599 endLink(ref.ref(),QCString(),ref.anchor());
1600 }
1601 else
1602 {
1603 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1604 }
1605}
QCString anchor() const
Definition docnode.h:747
SectionType sectionType() const
Definition docnode.h:749
QCString targetTitle() const
Definition docnode.h:748
bool isSubPage() const
Definition docnode.h:754
bool refToTable() const
Definition docnode.h:753
QCString file() const
Definition docnode.h:744
QCString ref() const
Definition docnode.h:746
bool refToSection() const
Definition docnode.h:752
bool hasLinkText() const
Definition docnode.h:750

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()() [39/57]

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

Definition at line 809 of file latexdocvisitor.cpp.

810{
811 visitChildren(r);
812}

References visitChildren().

◆ operator()() [40/57]

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

Definition at line 1607 of file latexdocvisitor.cpp.

1608{
1609 if (m_hide) return;
1610 m_t << "\\item \\contentsline{section}{";
1611 if (ref.isSubPage())
1612 {
1613 startLink(ref.ref(),QCString(),ref.anchor());
1614 }
1615 else
1616 {
1617 if (!ref.file().isEmpty())
1618 {
1619 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1620 }
1621 }
1622 visitChildren(ref);
1623 if (ref.isSubPage())
1624 {
1625 endLink(ref.ref(),QCString(),ref.anchor());
1626 }
1627 else
1628 {
1629 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1630 }
1631 m_t << "}{\\ref{";
1632 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1633 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1634 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1635 m_t << "}}{}\n";
1636}
bool refToTable() const
Definition docnode.h:905
QCString file() const
Definition docnode.h:901
QCString anchor() const
Definition docnode.h:902
QCString ref() const
Definition docnode.h:904
bool isSubPage() const
Definition docnode.h:906

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

◆ operator()() [41/57]

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

Definition at line 1638 of file latexdocvisitor.cpp.

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

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

◆ operator()() [42/57]

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

Definition at line 990 of file latexdocvisitor.cpp.

991{
992 if (m_hide) return;
993 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
994 if (pdfHyperlinks)
995 {
996 m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
997 }
998 m_t << "\\" << getSectionName(s.level()) << "{";
999 if (pdfHyperlinks)
1000 {
1001 m_t << "\\texorpdfstring{";
1002 }
1003 if (s.title())
1004 {
1005 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::TEX;
1006 std::visit(*this,*s.title());
1008 }
1009 if (pdfHyperlinks)
1010 {
1011 m_t << "}{";
1012 if (s.title())
1013 {
1014 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::PDF;
1015 std::visit(*this,*s.title());
1017 }
1018 m_t << "}";
1019 }
1020 m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
1021 visitChildren(s);
1022}
QCString file() const
Definition docnode.h:884
int level() const
Definition docnode.h:880
QCString anchor() const
Definition docnode.h:882
const DocNodeVariant * title() const
Definition docnode.h:881
@ 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()() [43/57]

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

Definition at line 1706 of file latexdocvisitor.cpp.

1707{
1708 m_t << " " << sep.chars() << " ";
1709}
QCString chars() const
Definition docnode.h:348

References DocSeparator::chars(), and m_t.

◆ operator()() [44/57]

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

Definition at line 969 of file latexdocvisitor.cpp.

970{
971 if (m_hide) return;
972 m_t << "\\begin{DoxyItemize}\n";
974 visitChildren(l);
975 m_t << "\\end{DoxyItemize}\n";
976}

References indentLevel(), LatexDocVisitor::LatexListItemInfo::isEnum, m_hide, m_listItemInfo, m_t, and visitChildren().

◆ operator()() [45/57]

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

Definition at line 978 of file latexdocvisitor.cpp.

979{
980 if (m_hide) return;
981 m_t << "\\item ";
983 if (li.paragraph())
984 {
985 visit(*this,*li.paragraph());
986 }
988}
const DocNodeVariant * paragraph() const
Definition docnode.h:1119

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

◆ operator()() [46/57]

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

Definition at line 814 of file latexdocvisitor.cpp.

815{
816 if (m_hide) return;
817 switch(s.type())
818 {
820 m_t << "\\begin{DoxySeeAlso}{";
822 break;
824 m_t << "\\begin{DoxyReturn}{";
826 break;
828 m_t << "\\begin{DoxyAuthor}{";
830 break;
832 m_t << "\\begin{DoxyAuthor}{";
834 break;
836 m_t << "\\begin{DoxyVersion}{";
838 break;
840 m_t << "\\begin{DoxySince}{";
842 break;
844 m_t << "\\begin{DoxyDate}{";
846 break;
848 m_t << "\\begin{DoxyNote}{";
850 break;
852 m_t << "\\begin{DoxyWarning}{";
854 break;
856 m_t << "\\begin{DoxyPrecond}{";
858 break;
860 m_t << "\\begin{DoxyPostcond}{";
862 break;
864 m_t << "\\begin{DoxyCopyright}{";
866 break;
868 m_t << "\\begin{DoxyInvariant}{";
870 break;
872 m_t << "\\begin{DoxyRemark}{";
874 break;
876 m_t << "\\begin{DoxyAttention}{";
878 break;
880 m_t << "\\begin{DoxyImportant}{";
882 break;
884 m_t << "\\begin{DoxyParagraph}{";
885 break;
887 m_t << "\\begin{DoxyParagraph}{";
888 break;
889 case DocSimpleSect::Unknown: break;
890 }
891
892 if (s.title())
893 {
895 std::visit(*this,*s.title());
897 }
898 m_t << "}\n";
900 visitChildren(s);
901 switch(s.type())
902 {
904 m_t << "\n\\end{DoxySeeAlso}\n";
905 break;
907 m_t << "\n\\end{DoxyReturn}\n";
908 break;
910 m_t << "\n\\end{DoxyAuthor}\n";
911 break;
913 m_t << "\n\\end{DoxyAuthor}\n";
914 break;
916 m_t << "\n\\end{DoxyVersion}\n";
917 break;
919 m_t << "\n\\end{DoxySince}\n";
920 break;
922 m_t << "\n\\end{DoxyDate}\n";
923 break;
925 m_t << "\n\\end{DoxyNote}\n";
926 break;
928 m_t << "\n\\end{DoxyWarning}\n";
929 break;
931 m_t << "\n\\end{DoxyPrecond}\n";
932 break;
934 m_t << "\n\\end{DoxyPostcond}\n";
935 break;
937 m_t << "\n\\end{DoxyCopyright}\n";
938 break;
940 m_t << "\n\\end{DoxyInvariant}\n";
941 break;
943 m_t << "\n\\end{DoxyRemark}\n";
944 break;
946 m_t << "\n\\end{DoxyAttention}\n";
947 break;
949 m_t << "\n\\end{DoxyImportant}\n";
950 break;
952 m_t << "\n\\end{DoxyParagraph}\n";
953 break;
955 m_t << "\n\\end{DoxyParagraph}\n";
956 break;
957 default:
958 break;
959 }
961}
Type type() const
Definition docnode.h:988
const DocNodeVariant * title() const
Definition docnode.h:995
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(), Translator::trAttention(), Translator::trAuthor(), Translator::trCopyright(), Translator::trDate(), Translator::trImportant(), Translator::trInvariant(), Translator::trNote(), Translator::trPostcondition(), Translator::trPrecondition(), Translator::trRemarks(), Translator::trReturns(), Translator::trSeeAlso(), Translator::trSince(), TRUE, Translator::trVersion(), Translator::trWarning(), DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, visitChildren(), and DocSimpleSect::Warning.

◆ operator()() [47/57]

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

Definition at line 725 of file latexdocvisitor.cpp.

726{
727}

◆ operator()() [48/57]

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

Definition at line 392 of file latexdocvisitor.cpp.

393{
394 if (m_hide) return;
395 switch (s.style())
396 {
398 if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
399 break;
403 if (s.enable()) m_t << "\\sout{"; else m_t << "}";
404 break;
407 if (s.enable()) m_t << "\\uline{"; else m_t << "}";
408 break;
410 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
411 break;
413 if (s.enable()) m_t << "{\\ttfamily "; else m_t << "}";
414 break;
416 if (s.enable()) m_t << "\\textsubscript{"; else m_t << "}";
417 break;
419 if (s.enable()) m_t << "\\textsuperscript{"; else m_t << "}";
420 break;
422 if (s.enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
423 break;
425 if (s.enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
426 break;
428 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
429 break;
431 if (s.enable())
432 {
433 m_t << "\n\\begin{DoxyPre}";
435 }
436 else
437 {
439 m_t << "\\end{DoxyPre}\n";
440 }
441 break;
442 case DocStyleChange::Div: /* HTML only */ break;
443 case DocStyleChange::Span: /* HTML only */ break;
444 }
445}
Style style() const
Definition docnode.h:290
bool enable() const
Definition docnode.h:292

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

◆ operator()() [49/57]

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

Definition at line 306 of file latexdocvisitor.cpp.

307{
308 if (m_hide) return;
309 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
310 const char *res = HtmlEntityMapper::instance().latex(s.symbol());
311 if (res)
312 {
314 {
315 if (pdfHyperlinks)
316 {
317 m_t << "\\texorpdfstring{$<$}{<}";
318 }
319 else
320 {
321 m_t << "$<$";
322 }
323 }
325 {
326 if (pdfHyperlinks)
327 {
328 m_t << "\\texorpdfstring{$>$}{>}";
329 }
330 else
331 {
332 m_t << "$>$";
333 }
334 }
335 else
336 {
337 m_t << res;
338 }
339 }
340 else
341 {
342 err("LaTeX: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance().html(s.symbol(),TRUE));
343 }
344}
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:311
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()() [50/57]

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

Definition at line 1827 of file latexdocvisitor.cpp.

1828{
1829 if (m_hide) return;
1830 visitChildren(t);
1831}

References m_hide, and visitChildren().

◆ operator()() [51/57]

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

Definition at line 963 of file latexdocvisitor.cpp.

964{
965 if (m_hide) return;
966 visitChildren(t);
967}

References m_hide, and visitChildren().

◆ operator()() [52/57]

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

Definition at line 363 of file latexdocvisitor.cpp.

364{
365 if (m_hide) return;
366 if (Config_getBool(PDF_HYPERLINKS))
367 {
368 m_t << "\\href{";
369 if (u.isEmail()) m_t << "mailto:";
370 m_t << latexFilterURL(u.url()) << "}";
371 }
372 m_t << "{\\texttt{ ";
373 filter(u.url());
374 m_t << "}}";
375}
QCString url() const
Definition docnode.h:190
bool isEmail() const
Definition docnode.h:191

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

◆ operator()() [53/57]

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

Definition at line 447 of file latexdocvisitor.cpp.

448{
449 if (m_hide) return;
450 QCString lang = m_langExt;
451 if (!s.language().isEmpty()) // explicit language setting
452 {
453 lang = s.language();
454 }
455 SrcLangExt langExt = getLanguageFromCodeLang(lang);
456 switch(s.type())
457 {
459 {
460 m_ci.startCodeFragment("DoxyCode");
461 getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
462 s.isExample(),s.exampleFile());
463 m_ci.endCodeFragment("DoxyCode");
464 }
465 break;
467 filter(s.text(), true);
468 break;
470 m_t << "{\\ttfamily ";
471 filter(s.text(), true);
472 m_t << "}";
473 break;
475 m_t << "\\begin{DoxyVerb}";
476 m_t << s.text();
477 m_t << "\\end{DoxyVerb}\n";
478 break;
484 /* nothing */
485 break;
487 m_t << s.text();
488 break;
489 case DocVerbatim::Dot:
490 {
491 static int dotindex = 1;
492 QCString fileName(4096, QCString::ExplicitSize);
493
494 fileName.sprintf("%s%d%s",
495 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_"),
496 dotindex++,
497 ".dot"
498 );
499 std::ofstream file = Portable::openOutputStream(fileName);
500 if (!file.is_open())
501 {
502 err("Could not open file %s for writing\n",qPrint(fileName));
503 }
504 else
505 {
506 file.write( s.text().data(), s.text().length() );
507 file.close();
508
509 startDotFile(fileName,s.width(),s.height(),s.hasCaption(),s.srcFile(),s.srcLine());
510 visitChildren(s);
512
513 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
514 }
515 }
516 break;
517 case DocVerbatim::Msc:
518 {
519 static int mscindex = 1;
520 QCString baseName(4096, QCString::ExplicitSize);
521
522 baseName.sprintf("%s%d",
523 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_"),
524 mscindex++
525 );
526 QCString fileName = baseName+".msc";
527 std::ofstream file = Portable::openOutputStream(fileName);
528 if (!file.is_open())
529 {
530 err("Could not open file %s for writing\n",qPrint(fileName));
531 }
532 else
533 {
534 QCString text = "msc {";
535 text+=s.text();
536 text+="}";
537 file.write( text.data(), text.length() );
538 file.close();
539
540 writeMscFile(baseName, s);
541
542 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
543 }
544 }
545 break;
547 {
548 QCString latexOutput = Config_getString(LATEX_OUTPUT);
550 latexOutput,s.exampleFile(),s.text(),
552 s.engine(),s.srcFile(),s.srcLine());
553
554 writePlantUMLFile(baseName, s);
555 }
556 break;
557 }
558}
Class representing a directory in the file system.
Definition dir.h:75
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Definition dir.cpp:314
QCString srcFile() const
Definition docnode.h:376
int srcLine() const
Definition docnode.h:377
QCString height() const
Definition docnode.h:371
bool hasCaption() const
Definition docnode.h:369
QCString language() const
Definition docnode.h:367
bool isExample() const
Definition docnode.h:364
QCString context() const
Definition docnode.h:363
Type type() const
Definition docnode.h:361
QCString text() const
Definition docnode.h:362
QCString exampleFile() const
Definition docnode.h:365
bool useBitmap() const
Definition docnode.h:373
@ JavaDocLiteral
Definition docnode.h:357
QCString width() const
Definition docnode.h:370
void writePlantUMLFile(const QCString &fileName, const DocVerbatim &s)
void writeMscFile(const QCString &fileName, const DocVerbatim &s)
Singleton that manages plantuml relation actions.
Definition plantuml.h:41
QCString writePlantUMLSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine)
Write a PlantUML compatible file.
Definition plantuml.cpp:27
static PlantumlManager & instance()
Definition plantuml.cpp:155
@ ExplicitSize
Definition qcstring.h:126
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:638
const char * qPrint(const char *s)
Definition qcstring.h:652
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5490

References DocVerbatim::Code, Config_getBool, Config_getString, DocVerbatim::context(), QCString::data(), DocVerbatim::DocbookOnly, DocVerbatim::Dot, OutputCodeList::endCodeFragment(), endDotFile(), DocVerbatim::engine(), err, DocVerbatim::exampleFile(), QCString::ExplicitSize, filter(), DocVisitor::getCodeParser(), getLanguageFromCodeLang(), DocVerbatim::hasCaption(), DocVerbatim::height(), DocVerbatim::HtmlOnly, PlantumlManager::instance(), QCString::isEmpty(), DocVerbatim::isExample(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocVerbatim::language(), DocVerbatim::LatexOnly, QCString::length(), m_ci, m_hide, m_langExt, m_t, DocVerbatim::ManOnly, DocVerbatim::Msc, Portable::openOutputStream(), CodeParserInterface::parseCode(), DocVerbatim::PlantUML, PlantumlManager::PUML_BITMAP, PlantumlManager::PUML_EPS, qPrint(), Dir::remove(), DocVerbatim::RtfOnly, QCString::sprintf(), DocVerbatim::srcFile(), DocVerbatim::srcLine(), OutputCodeList::startCodeFragment(), startDotFile(), QCString::str(), DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::useBitmap(), DocVerbatim::Verbatim, visitChildren(), DocVerbatim::width(), writeMscFile(), writePlantUMLFile(), PlantumlManager::writePlantUMLSource(), and DocVerbatim::XmlOnly.

◆ operator()() [54/57]

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

Definition at line 1843 of file latexdocvisitor.cpp.

1844{
1845}

◆ operator()() [55/57]

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

Definition at line 293 of file latexdocvisitor.cpp.

294{
295 if (m_hide) return;
296 if (m_insidePre)
297 {
298 m_t << w.chars();
299 }
300 else
301 {
302 m_t << " ";
303 }
304}
QCString chars() const
Definition docnode.h:337

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

◆ operator()() [56/57]

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

Definition at line 279 of file latexdocvisitor.cpp.

280{
281 if (m_hide) return;
282 filter(w.word());
283}
QCString word() const
Definition docnode.h:154

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

◆ operator()() [57/57]

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

Definition at line 1786 of file latexdocvisitor.cpp.

1787{
1788 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1789 if (m_hide) return;
1790 if (x.title().isEmpty()) return;
1792 m_t << "\\begin{DoxyRefDesc}{";
1793 filter(x.title());
1794 m_t << "}\n";
1795 bool anonymousEnum = x.file()=="@";
1796 m_t << "\\item[";
1797 if (pdfHyperlinks && !anonymousEnum)
1798 {
1799 m_t << "\\mbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1800 }
1801 else
1802 {
1803 m_t << "\\textbf{ ";
1804 }
1806 filter(x.title());
1808 if (pdfHyperlinks && !anonymousEnum)
1809 {
1810 m_t << "}";
1811 }
1812 m_t << "}]";
1813 visitChildren(x);
1814 if (x.title().isEmpty()) return;
1816 m_t << "\\end{DoxyRefDesc}\n";
1817}
QCString anchor() const
Definition docnode.h:596
QCString file() const
Definition docnode.h:595
QCString title() const
Definition docnode.h:597

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 206 of file latexdocvisitor.h.

207 {
208 m_tableStateStack.pop();
209 }

References m_tableStateStack.

Referenced by operator()().

◆ pushTableState()

void LatexDocVisitor::pushTableState ( )
inlineprivate

Definition at line 202 of file latexdocvisitor.h.

203 {
204 m_tableStateStack.emplace();
205 }

References m_tableStateStack.

Referenced by operator()().

◆ rowSpans()

RowSpanList & LatexDocVisitor::rowSpans ( )
inlineprivate

Definition at line 250 of file latexdocvisitor.h.

251 {
252 return !m_tableStateStack.empty() ? m_tableStateStack.top().rowSpans : m_emptyRowSpanList;
253 }
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 214 of file latexdocvisitor.h.

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

References m_tableStateStack.

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

◆ setFirstRow()

void LatexDocVisitor::setFirstRow ( bool b)
inlineprivate

Definition at line 246 of file latexdocvisitor.h.

247 {
248 if (!m_tableStateStack.empty()) m_tableStateStack.top().firstRow = b;
249 }

References m_tableStateStack.

Referenced by operator()().

◆ setInColSpan()

void LatexDocVisitor::setInColSpan ( bool b)
inlineprivate

Definition at line 238 of file latexdocvisitor.h.

239 {
240 if (!m_tableStateStack.empty()) m_tableStateStack.top().inColSpan = b;
241 }

References m_tableStateStack.

Referenced by operator()().

◆ setInRowSpan()

void LatexDocVisitor::setInRowSpan ( bool b)
inlineprivate

Definition at line 230 of file latexdocvisitor.h.

231 {
232 if (!m_tableStateStack.empty()) m_tableStateStack.top().inRowSpan = b;
233 }

References m_tableStateStack.

Referenced by operator()().

◆ setNumCols()

void LatexDocVisitor::setNumCols ( size_t num)
inlineprivate

Definition at line 222 of file latexdocvisitor.h.

223 {
224 if (!m_tableStateStack.empty()) m_tableStateStack.top().numCols = num;
225 }

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

2001{
2002 QCString baseName=makeBaseName(fileName);
2003 baseName.prepend("dia_");
2004
2005 QCString outDir = Config_getString(LATEX_OUTPUT);
2006 writeDiaGraphFromFile(fileName,outDir,baseName,DIA_EPS,srcFile,srcLine);
2007 visitPreStart(m_t,hasCaption, baseName, width, height);
2008}
QCString & prepend(const char *s)
Definition qcstring.h:398
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
Definition dia.cpp:26
@ DIA_EPS
Definition dia.h:23
static QCString makeBaseName(const QCString &name)

References Config_getString, DIA_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 1938 of file latexdocvisitor.cpp.

1945{
1946 QCString baseName=makeBaseName(fileName);
1947 baseName.prepend("dot_");
1948 QCString outDir = Config_getString(LATEX_OUTPUT);
1949 QCString name = fileName;
1950 writeDotGraphFromFile(name,outDir,baseName,GOF_EPS,srcFile,srcLine);
1951 visitPreStart(m_t,hasCaption, baseName, width, height);
1952}
void writeDotGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine)
Definition dot.cpp:230
@ GOF_EPS
Definition dotgraph.h:29

References Config_getString, GOF_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 1866 of file latexdocvisitor.cpp.

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

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

1967{
1968 QCString baseName=makeBaseName(fileName);
1969 baseName.prepend("msc_");
1970
1971 QCString outDir = Config_getString(LATEX_OUTPUT);
1972 writeMscGraphFromFile(fileName,outDir,baseName,MSC_EPS,srcFile,srcLine);
1973 visitPreStart(m_t,hasCaption, baseName, width, height);
1974}
void writeMscGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, MscOutputFormat format, const QCString &srcFile, int srcLine)
Definition msc.cpp:156
@ MSC_EPS
Definition msc.h:22

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

Referenced by operator()().

◆ visitCaption()

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

Definition at line 231 of file latexdocvisitor.cpp.

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

Referenced by writeDiaFile(), writeMscFile(), and writePlantUMLFile().

◆ visitChildren()

◆ writeDiaFile()

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

Definition at line 2017 of file latexdocvisitor.cpp.

2018{
2019 QCString shortName = makeShortName(baseName);
2020 QCString outDir = Config_getString(LATEX_OUTPUT);
2021 writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS,s.srcFile(),s.srcLine());
2022 visitPreStart(m_t, s.hasCaption(), shortName, s.width(), s.height());
2025}
const DocNodeList & children() const
Definition docnode.h:374
void visitCaption(const DocNodeList &children)
static QCString makeShortName(const QCString &baseName)

References DocVerbatim::children(), Config_getString, DIA_EPS, DocVerbatim::hasCaption(), DocVerbatim::height(), m_t, makeShortName(), DocVerbatim::srcFile(), DocVerbatim::srcLine(), visitCaption(), visitPostEnd(), visitPreStart(), DocVerbatim::width(), and writeDiaGraphFromFile().

◆ writeMscFile()

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

◆ writePlantUMLFile()

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

Definition at line 2027 of file latexdocvisitor.cpp.

2028{
2029 QCString shortName = makeShortName(baseName);
2030 if (s.useBitmap())
2031 {
2032 if (shortName.find('.')==-1) shortName += ".png";
2033 }
2034 QCString outDir = Config_getString(LATEX_OUTPUT);
2037 visitPreStart(m_t, s.hasCaption(), shortName, s.width(), s.height());
2040}
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition plantuml.cpp:126
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43

References DocVerbatim::children(), Config_getString, QCString::find(), PlantumlManager::generatePlantUMLOutput(), DocVerbatim::hasCaption(), DocVerbatim::height(), PlantumlManager::instance(), m_t, makeShortName(), PlantumlManager::PUML_BITMAP, PlantumlManager::PUML_EPS, DocVerbatim::useBitmap(), visitCaption(), visitPostEnd(), visitPreStart(), and DocVerbatim::width().

Referenced by operator()().

Member Data Documentation

◆ m_ci

OutputCodeList& LatexDocVisitor::m_ci
private

Definition at line 171 of file latexdocvisitor.h.

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

◆ m_emptyRowSpanList

RowSpanList LatexDocVisitor::m_emptyRowSpanList
private

Definition at line 190 of file latexdocvisitor.h.

Referenced by rowSpans().

◆ m_hide

◆ m_hierarchyLevel

int LatexDocVisitor::m_hierarchyLevel
private

Definition at line 177 of file latexdocvisitor.h.

Referenced by getSectionName().

◆ m_indentLevel

int LatexDocVisitor::m_indentLevel = 0
private

◆ m_insideItem

bool LatexDocVisitor::m_insideItem
private

Definition at line 174 of file latexdocvisitor.h.

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

◆ m_insidePre

bool LatexDocVisitor::m_insidePre
private

Definition at line 173 of file latexdocvisitor.h.

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

◆ m_langExt

QCString LatexDocVisitor::m_langExt
private

Definition at line 176 of file latexdocvisitor.h.

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

◆ m_lcg

LatexCodeGenerator& LatexDocVisitor::m_lcg
private

Definition at line 172 of file latexdocvisitor.h.

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

◆ m_listItemInfo

LatexListItemInfo LatexDocVisitor::m_listItemInfo[maxIndentLevels]
private

Definition at line 200 of file latexdocvisitor.h.

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

◆ m_t

◆ m_tableStateStack

◆ m_texOrPdf

TexOrPdf LatexDocVisitor::m_texOrPdf = TexOrPdf::NO
private

Definition at line 178 of file latexdocvisitor.h.

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

◆ maxIndentLevels

const int LatexDocVisitor::maxIndentLevels = 13
staticprivate

Definition at line 192 of file latexdocvisitor.h.

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


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