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)
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 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)
size_t numCols () const
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 268 of file latexdocvisitor.cpp.

270 : m_t(t), m_ci(ci), m_lcg(lcg), m_insidePre(FALSE),
272 m_langExt(langExt), m_hierarchyLevel(hierarchyLevel)
273{
274}
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 233 of file latexdocvisitor.h.

234 {
235 if (!m_tableStateStack.empty()) m_tableStateStack.top().rowSpans.push_back(std::move(span));
236 }
std::stack< TableState > m_tableStateStack

References m_tableStateStack.

Referenced by operator()().

◆ currentColumn()

size_t LatexDocVisitor::currentColumn ( ) const
inlineprivate

Definition at line 213 of file latexdocvisitor.h.

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

References m_tableStateStack.

Referenced by operator()().

◆ decIndentLevel()

void LatexDocVisitor::decIndentLevel ( )
private

Definition at line 2125 of file latexdocvisitor.cpp.

2126{
2127 if (m_indentLevel>0)
2128 {
2129 m_indentLevel--;
2130 }
2131}

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

2040{
2041 if (m_hide) return;
2042 visitPostEnd(m_t,hasCaption);
2043}
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 1983 of file latexdocvisitor.cpp.

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

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

1943{
1944 m_t << "}";
1945 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1946 if (ref.isEmpty() && !pdfHyperLinks)
1947 {
1948 m_t << "{";
1950 m_t << "}{" << file;
1951 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1952 m_t << anchor << "}";
1953 if (refToSection)
1954 {
1955 m_t << "{" << sectionType.level() << "}";
1956 }
1957 }
1958 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1959 {
1960 if (refToSection)
1961 {
1962 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1963 }
1964 }
1965}
void filter(const QCString &str, const bool retainNewLine=false)
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
constexpr int level() const
Definition section.h:45
virtual QCString trPageAbbreviation()=0
#define Config_getBool(name)
Definition config.h:33
Translator * theTranslator
Definition language.cpp:71
@ PDF
called through texorpdf as PDF (second) part

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

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

◆ endMscFile()

void LatexDocVisitor::endMscFile ( bool hasCaption)
private

Definition at line 2005 of file latexdocvisitor.cpp.

2006{
2007 if (m_hide) return;
2008 visitPostEnd(m_t,hasCaption);
2009}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endPlantUmlFile()

void LatexDocVisitor::endPlantUmlFile ( bool hasCaption)
private

Definition at line 2105 of file latexdocvisitor.cpp.

2106{
2107 if (m_hide) return;
2108 visitPostEnd(m_t,hasCaption);
2109}

References m_hide, m_t, and visitPostEnd().

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

◆ escapeMakeIndexChars()

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

Definition at line 240 of file latexdocvisitor.cpp.

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

References filter(), and m_t.

◆ filter()

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

Definition at line 1882 of file latexdocvisitor.cpp.

1883{
1884 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
1886 m_lcg.insideTabbing(),
1889 m_lcg.usedTableLevel()>0, // insideTable
1890 false, // keepSpaces
1891 retainNewLine
1892 );
1893}
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(), escapeMakeIndexChars(), 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 2116 of file latexdocvisitor.cpp.

2117{
2118 m_indentLevel++;
2120 {
2121 err("Maximum indent level ({}) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2122 }
2123}
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 2111 of file latexdocvisitor.cpp.

2112{
2113 return std::min(m_indentLevel,maxIndentLevels-1);
2114}

References m_indentLevel, and maxIndentLevels.

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

◆ insideTable()

bool LatexDocVisitor::insideTable ( ) const
inlineprivate

Definition at line 237 of file latexdocvisitor.h.

238 {
239 return !m_tableStateStack.empty();
240 }

References m_tableStateStack.

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

◆ isTableNested()

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

Definition at line 1262 of file latexdocvisitor.cpp.

1263{
1264 bool isNested=m_lcg.usedTableLevel()>0;
1265 while (n && !isNested)
1266 {
1268 n = ::parent(n);
1269 }
1270 return isNested;
1271}
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
Definition docnode.h:1366
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
Definition docnode.h:1330

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

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

◆ numCols()

size_t LatexDocVisitor::numCols ( ) const
inlineprivate

Definition at line 221 of file latexdocvisitor.h.

222 {
223 return !m_tableStateStack.empty() ? m_tableStateStack.top().numCols : 0;
224 }

References m_tableStateStack.

◆ operator()() [1/58]

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

Definition at line 576 of file latexdocvisitor.cpp.

577{
578 if (m_hide) return;
579 m_t << "\\label{" << stripPath(anc.file()) << "_" << anc.anchor() << "}%\n";
580 if (!anc.file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
581 {
582 m_t << "\\Hypertarget{" << stripPath(anc.file()) << "_" << anc.anchor()
583 << "}%\n";
584 }
585}
QCString anchor() const
Definition docnode.h:232
QCString file() const
Definition docnode.h:233
QCString stripPath(const QCString &s)
Definition util.cpp:5467

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

822{
823 if (m_hide) return;
824 if (m_indentLevel>=maxIndentLevels-1) return;
825 if (l.isEnumList())
826 {
827 m_t << "\n\\begin{DoxyEnumerate}";
828 m_listItemInfo[indentLevel()].isEnum = true;
829 }
830 else
831 {
832 m_listItemInfo[indentLevel()].isEnum = false;
833 m_t << "\n\\begin{DoxyItemize}";
834 }
835 visitChildren(l);
836 if (l.isEnumList())
837 {
838 m_t << "\n\\end{DoxyEnumerate}";
839 }
840 else
841 {
842 m_t << "\n\\end{DoxyItemize}";
843 }
844}
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 846 of file latexdocvisitor.cpp.

847{
848 if (m_hide) return;
849 switch (li.itemNumber())
850 {
851 case DocAutoList::Unchecked: // unchecked
852 m_t << "\n\\item[\\DoxyUnchecked] ";
853 break;
854 case DocAutoList::Checked_x: // checked with x
855 case DocAutoList::Checked_X: // checked with X
856 m_t << "\n\\item[\\DoxyChecked] ";
857 break;
858 default:
859 m_t << "\n\\item ";
860 break;
861 }
863 visitChildren(li);
865}
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 758 of file latexdocvisitor.cpp.

759{
760 if (m_hide) return;
761 auto opt = cite.option();
762 QCString txt;
763 if (opt.noCite())
764 {
765 if (!cite.file().isEmpty())
766 {
767 txt = cite.getText();
768 }
769 else
770 {
771 if (!opt.noPar()) txt += "[";
772 txt += cite.target();
773 if (!opt.noPar()) txt += "]";
774 }
775 m_t << "{\\bfseries ";
776 filter(txt);
777 m_t << "}";
778 }
779 else
780 {
781 if (!cite.file().isEmpty())
782 {
783 QCString anchor = cite.anchor();
784 QCString anchorPrefix = CitationManager::instance().anchorPrefix();
785 anchor = anchor.mid(anchorPrefix.length()); // strip prefix
786
787 txt = "\\DoxyCite{" + anchor + "}";
788 if (opt.isNumber())
789 {
790 txt += "{number}";
791 }
792 else if (opt.isShortAuthor())
793 {
794 txt += "{shortauthor}";
795 }
796 else if (opt.isYear())
797 {
798 txt += "{year}";
799 }
800 if (!opt.noPar()) txt += "{1}";
801 else txt += "{0}";
802
803 m_t << txt;
804 }
805 else
806 {
807 if (!opt.noPar()) txt += "[";
808 txt += cite.target();
809 if (!opt.noPar()) txt += "]";
810 m_t << "{\\bfseries ";
811 filter(txt);
812 m_t << "}";
813 }
814 }
815}
QCString anchorPrefix() const
Definition cite.cpp:128
static CitationManager & instance()
Definition cite.cpp:86
QCString getText() const
Definition docnode.cpp:951
CiteInfoOption option() const
Definition docnode.h:253
QCString target() const
Definition docnode.h:252
QCString anchor() const
Definition docnode.h:251
QCString file() const
Definition docnode.h:248
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241

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

◆ operator()() [5/58]

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

Definition at line 1582 of file latexdocvisitor.cpp.

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

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

◆ operator()() [6/58]

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

Definition at line 1564 of file latexdocvisitor.cpp.

1565{
1566 if (m_hide) return;
1567 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1568 startDotFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1569 visitChildren(df);
1570 endDotFile(df.hasCaption());
1571}
void endDotFile(bool hasCaption)
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)

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

◆ operator()() [7/58]

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

Definition at line 347 of file latexdocvisitor.cpp.

348{
349 if (m_hide) return;
350 QCString emojiName = EmojiEntityMapper::instance().name(s.index());
351 if (!emojiName.isEmpty())
352 {
353 QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
354 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxygenemoji{";
355 filter(emojiName);
356 if (m_texOrPdf != TexOrPdf::PDF) m_t << "}{" << imageName << "}";
357 }
358 else
359 {
360 m_t << s.name();
361 }
362}
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 725 of file latexdocvisitor.cpp.

726{
727 if (m_hide) return;
728 QCString s = f.text();
729 const char *p = s.data();
730 char c = 0;
731 if (p)
732 {
733 while ((c=*p++))
734 {
735 switch (c)
736 {
737 case '\'': m_t << "\\textnormal{\\textquotesingle}"; break;
738 default: m_t << c; break;
739 }
740 }
741 }
742}
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 384 of file latexdocvisitor.cpp.

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

References insideTable(), m_hide, and m_t.

◆ operator()() [10/58]

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

Definition at line 1493 of file latexdocvisitor.cpp.

1494{
1495 if (m_hide) return;
1496 if (Config_getBool(PDF_HYPERLINKS))
1497 {
1498 m_t << "\\href{";
1499 m_t << latexFilterURL(href.url());
1500 m_t << "}";
1501 }
1502 m_t << "{\\texttt{";
1503 visitChildren(href);
1504 m_t << "}}";
1505}
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 1862 of file latexdocvisitor.cpp.

1863{
1864 if (m_hide) return;
1865 m_t << "\\begin{quote}\n";
1867 visitChildren(q);
1868 m_t << "\\end{quote}\n";
1870}

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

◆ operator()() [12/58]

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

Definition at line 1342 of file latexdocvisitor.cpp.

1343{
1344 if (m_hide) return;
1345 visitChildren(c);
1346}

References m_hide, and visitChildren().

◆ operator()() [13/58]

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

Definition at line 1378 of file latexdocvisitor.cpp.

1379{
1380 if (m_hide) return;
1381 //printf("Cell(r=%u,c=%u) rowSpan=%d colSpan=%d currentColumn()=%zu\n",c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),currentColumn());
1382
1384
1385 QCString cellOpts;
1386 QCString cellSpec;
1387 auto appendOpt = [&cellOpts](const QCString &s)
1388 {
1389 if (!cellOpts.isEmpty()) cellOpts+=",";
1390 cellOpts+=s;
1391 };
1392 auto appendSpec = [&cellSpec](const QCString &s)
1393 {
1394 if (!cellSpec.isEmpty()) cellSpec+=",";
1395 cellSpec+=s;
1396 };
1397 auto writeCell = [this,&cellOpts,&cellSpec]()
1398 {
1399 if (!cellOpts.isEmpty() || !cellSpec.isEmpty())
1400 {
1401 m_t << "\\SetCell";
1402 if (!cellOpts.isEmpty())
1403 {
1404 m_t << "[" << cellOpts << "]";
1405 }
1406 m_t << "{" << cellSpec << "}";
1407 }
1408 };
1409
1410 // skip over columns that have a row span starting at an earlier row
1411 for (const auto &span : rowSpans())
1412 {
1413 //printf("span(r=%u,c=%u): column=%zu colSpan=%zu,rowSpan=%zu currentColumn()=%zu\n",
1414 // span.cell.rowIndex(),span.cell.columnIndex(),
1415 // span.column,span.colSpan,span.rowSpan,
1416 // currentColumn());
1417 if (span.rowSpan>0 && span.column==currentColumn())
1418 {
1419 setCurrentColumn(currentColumn()+span.colSpan);
1420 for (size_t i=0;i<span.colSpan;i++)
1421 {
1422 m_t << "&";
1423 }
1424 }
1425 }
1426
1427 int cs = c.colSpan();
1428 int ha = c.alignment();
1429 int rs = c.rowSpan();
1430 int va = c.valignment();
1431
1432 switch (ha) // horizontal alignment
1433 {
1434 case DocHtmlCell::Right:
1435 appendSpec("r");
1436 break;
1438 appendSpec("c");
1439 break;
1440 default:
1441 // default
1442 break;
1443 }
1444 if (rs>0) // row span
1445 {
1446 appendOpt("r="+QCString().setNum(rs));
1447 //printf("adding row span: cell={r=%d c=%d rs=%d cs=%d} curCol=%zu\n",
1448 // c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),
1449 // currentColumn());
1451 }
1452 if (cs>1) // column span
1453 {
1454 // update column to the end of the span, needs to be done *after* calling addRowSpan()
1456 appendOpt("c="+QCString().setNum(cs));
1457 }
1458 if (c.isHeading())
1459 {
1460 appendSpec("bg=\\tableheadbgcolor");
1461 appendSpec("font=\\bfseries");
1462 }
1463 switch(va) // vertical alignment
1464 {
1465 case DocHtmlCell::Top:
1466 appendSpec("h");
1467 break;
1469 appendSpec("f");
1470 break;
1472 // default
1473 break;
1474 }
1475 writeCell();
1476
1477 visitChildren(c);
1478
1479 for (int i=0;i<cs-1;i++)
1480 {
1481 m_t << "&"; // placeholder for invisible cell
1482 }
1483
1484 if (!c.isLast()) m_t << "&";
1485}
Valignment valignment() const
Definition docnode.cpp:1912
uint32_t rowSpan() const
Definition docnode.cpp:1850
Alignment alignment() const
Definition docnode.cpp:1874
bool isLast() const
Definition docnode.h:1202
bool isHeading() const
Definition docnode.h:1200
uint32_t colSpan() const
Definition docnode.cpp:1862
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 1253 of file latexdocvisitor.cpp.

1254{
1256 if (!m_insideItem) m_t << "\\hfill";
1257 m_t << " \\\\\n";
1258 visitChildren(dd);
1260}

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

◆ operator()() [15/58]

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

Definition at line 1219 of file latexdocvisitor.cpp.

1220{
1221 if (m_hide) return;
1222 bool eq = classEqualsReflist(dl);
1223 if (eq)
1224 {
1225 m_t << "\n\\begin{DoxyRefList}";
1226 }
1227 else
1228 {
1229 if (listIsNested(dl)) m_t << "\n\\hfill";
1230 m_t << "\n\\begin{DoxyDescription}";
1231 }
1232 visitChildren(dl);
1233 if (eq)
1234 {
1235 m_t << "\n\\end{DoxyRefList}";
1236 }
1237 else
1238 {
1239 m_t << "\n\\end{DoxyDescription}";
1240 }
1241}
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 1243 of file latexdocvisitor.cpp.

1244{
1245 if (m_hide) return;
1246 m_t << "\n\\item[";
1248 visitChildren(dt);
1250 m_t << "]";
1251}
#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 1515 of file latexdocvisitor.cpp.

1516{
1517 if (m_hide) return;
1518 m_t << "\n\n";
1519 auto summary = d.summary();
1520 if (summary)
1521 {
1522 std::visit(*this,*summary);
1523 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1524 }
1525 visitChildren(d);
1526 if (summary)
1527 {
1528 m_t << "\\end{adjustwidth}\n";
1529 }
1530 else
1531 {
1532 m_t << "\n\n";
1533 }
1534}
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 1536 of file latexdocvisitor.cpp.

1537{
1538 if (m_hide) return;
1539 m_t << "\\" << getSectionName(header.level()) << "*{";
1540 visitChildren(header);
1541 m_t << "}";
1542}
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 1103 of file latexdocvisitor.cpp.

1104{
1105 if (m_hide) return;
1106 if (m_indentLevel>=maxIndentLevels-1) return;
1108 if (s.type()==DocHtmlList::Ordered)
1109 {
1110 bool first = true;
1111 m_t << "\n\\begin{DoxyEnumerate}";
1112 for (const auto &opt : s.attribs())
1113 {
1114 if (opt.name=="type")
1115 {
1116 if (opt.value=="1")
1117 {
1118 m_t << (first ? "[": ",");
1119 m_t << "label=\\arabic*";
1120 first = false;
1121 }
1122 else if (opt.value=="a")
1123 {
1124 m_t << (first ? "[": ",");
1125 m_t << "label=\\enumalphalphcnt*";
1126 first = false;
1127 }
1128 else if (opt.value=="A")
1129 {
1130 m_t << (first ? "[": ",");
1131 m_t << "label=\\enumAlphAlphcnt*";
1132 first = false;
1133 }
1134 else if (opt.value=="i")
1135 {
1136 m_t << (first ? "[": ",");
1137 m_t << "label=\\roman*";
1138 first = false;
1139 }
1140 else if (opt.value=="I")
1141 {
1142 m_t << (first ? "[": ",");
1143 m_t << "label=\\Roman*";
1144 first = false;
1145 }
1146 }
1147 else if (opt.name=="start")
1148 {
1149 m_t << (first ? "[": ",");
1150 bool ok = false;
1151 int val = opt.value.toInt(&ok);
1152 if (ok) m_t << "start=" << val;
1153 first = false;
1154 }
1155 }
1156 if (!first) m_t << "]\n";
1157 }
1158 else
1159 {
1160 m_t << "\n\\begin{DoxyItemize}";
1161 }
1162 visitChildren(s);
1163 if (m_indentLevel>=maxIndentLevels-1) return;
1164 if (s.type()==DocHtmlList::Ordered)
1165 m_t << "\n\\end{DoxyEnumerate}";
1166 else
1167 m_t << "\n\\end{DoxyItemize}";
1168}
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 1170 of file latexdocvisitor.cpp.

1171{
1172 if (m_hide) return;
1173 if (m_listItemInfo[indentLevel()].isEnum)
1174 {
1175 for (const auto &opt : l.attribs())
1176 {
1177 if (opt.name=="value")
1178 {
1179 bool ok = false;
1180 int val = opt.value.toInt(&ok);
1181 if (ok)
1182 {
1183 m_t << "\n\\setcounter{DoxyEnumerate" << integerToRoman(indentLevel()+1,false) << "}{" << (val - 1) << "}";
1184 }
1185 }
1186 }
1187 }
1188 m_t << "\n\\item ";
1190 visitChildren(l);
1192}
const HtmlAttribList & attribs() const
Definition docnode.h:1170
QCString integerToRoman(int n, bool upper)
Definition util.cpp:7215

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

1349{
1350 if (m_hide) return;
1352
1353 visitChildren(row);
1354
1355 m_t << "\\\\";
1356
1357 size_t col = 1;
1358 for (auto &span : rowSpans())
1359 {
1360 if (span.rowSpan>0) span.rowSpan--;
1361 if (span.rowSpan<=0)
1362 {
1363 // inactive span
1364 }
1365 else if (span.column>col)
1366 {
1367 col = span.column+span.colSpan;
1368 }
1369 else
1370 {
1371 col = span.column+span.colSpan;
1372 }
1373 }
1374
1375 m_t << "\n";
1376}

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

◆ operator()() [22/58]

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

Definition at line 1507 of file latexdocvisitor.cpp.

1508{
1509 if (m_hide) return;
1510 m_t << "{\\bfseries{";
1511 visitChildren(d);
1512 m_t << "}}";
1513}

References m_hide, m_t, and visitChildren().

◆ operator()() [23/58]

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

Definition at line 1297 of file latexdocvisitor.cpp.

1298{
1299 if (m_hide) return;
1301 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1302 if (c)
1303 {
1304 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1305 if (!c->file().isEmpty() && pdfHyperLinks)
1306 {
1307 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1308 << "}{}";
1309 }
1310 m_t << "\n";
1311 }
1312
1314 if (!isTableNested(t.parent()))
1315 {
1316 // write caption
1317 m_t << "{";
1318 if (c)
1319 {
1320 std::visit(*this, *t.caption());
1321 }
1322 m_t << "}";
1323 // write label
1324 m_t << "{";
1325 if (c && (!stripPath(c->file()).isEmpty() || !c->anchor().isEmpty()))
1326 {
1327 m_t << stripPath(c->file()) << "_" << c->anchor();
1328 }
1329 m_t << "}";
1330 }
1331
1332 // write head row(s)
1333 m_t << "{" << t.numberHeaderRows() << "}\n";
1334
1336
1337 visitChildren(t);
1339 popTableState();
1340}
QCString anchor() const
Definition docnode.h:1235
QCString file() const
Definition docnode.h:1234
size_t numberHeaderRows() const
Definition docnode.cpp:2187
size_t numColumns() const
Definition docnode.h:1278
const DocNodeVariant * caption() const
Definition docnode.cpp:2182
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 1544 of file latexdocvisitor.cpp.

1545{
1546 if (img.type()==DocImage::Latex)
1547 {
1548 if (m_hide) return;
1549 QCString gfxName = img.name();
1550 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1551 {
1552 gfxName=gfxName.left(gfxName.length()-4);
1553 }
1554
1555 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1556 visitChildren(img);
1558 }
1559 else // other format -> skip
1560 {
1561 }
1562}
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 587 of file latexdocvisitor.cpp.

588{
589 if (m_hide) return;
591 switch(inc.type())
592 {
594 {
595 m_ci.startCodeFragment("DoxyCodeInclude");
596 FileInfo cfi( inc.file().str() );
597 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
599 inc.text(),
600 langExt,
601 inc.stripCodeComments(),
602 inc.isExample(),
603 inc.exampleFile(),
604 fd.get(), // fileDef,
605 -1, // start line
606 -1, // end line
607 FALSE, // inline fragment
608 nullptr, // memberDef
609 TRUE // show line numbers
610 );
611 m_ci.endCodeFragment("DoxyCodeInclude");
612 }
613 break;
615 {
616 m_ci.startCodeFragment("DoxyCodeInclude");
618 inc.text(),langExt,
619 inc.stripCodeComments(),
620 inc.isExample(),
621 inc.exampleFile(),
622 nullptr, // fileDef
623 -1, // startLine
624 -1, // endLine
625 TRUE, // inlineFragment
626 nullptr, // memberDef
627 FALSE
628 );
629 m_ci.endCodeFragment("DoxyCodeInclude");
630 }
631 break;
639 break;
641 m_t << inc.text();
642 break;
644 if (isTableNested(inc.parent())) // in table
645 {
646 m_t << "\\begin{DoxyCode}{0}";
647 filter(inc.text(), true);
648 m_t << "\\end{DoxyCode}\n";
649 }
650 else
651 {
652 m_t << "\n\\begin{DoxyVerbInclude}\n";
653 m_t << inc.text();
654 m_t << "\\end{DoxyVerbInclude}\n";
655 }
656 break;
659 {
660 m_ci.startCodeFragment("DoxyCodeInclude");
662 inc.file(),
663 inc.blockId(),
664 inc.context(),
666 inc.trimLeft(),
668 );
669 m_ci.endCodeFragment("DoxyCodeInclude");
670 }
671 break;
672 }
673}
void parseCodeFragment(OutputCodeList &codeOutList, const QCString &fileName, const QCString &blockId, const QCString &scopeName, bool showLineNumbers, bool trimLeft, bool stripCodeComments)
static CodeFragmentManager & instance()
virtual void parseCode(OutputCodeList &codeOutList, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
QCString blockId() const
Definition docnode.h:454
QCString extension() const
Definition docnode.h:450
bool stripCodeComments() const
Definition docnode.h:455
@ LatexInclude
Definition docnode.h:437
@ SnippetWithLines
Definition docnode.h:438
@ DontIncWithLines
Definition docnode.h:439
@ IncWithLines
Definition docnode.h:438
@ HtmlInclude
Definition docnode.h:437
@ VerbInclude
Definition docnode.h:437
@ DontInclude
Definition docnode.h:437
@ DocbookInclude
Definition docnode.h:439
Type type() const
Definition docnode.h:451
QCString exampleFile() const
Definition docnode.h:457
QCString text() const
Definition docnode.h:452
QCString file() const
Definition docnode.h:449
bool trimLeft() const
Definition docnode.h:459
bool isExample() const
Definition docnode.h:456
QCString context() const
Definition docnode.h:453
CodeParserInterface & getCodeParser(const QCString &langExt)
const std::string & str() const
Definition qcstring.h:552
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
SrcLangExt
Definition types.h:207
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5724

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

◆ operator()() [26/58]

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

Definition at line 675 of file latexdocvisitor.cpp.

676{
677 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
678 // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
679 if (op.isFirst())
680 {
681 if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
683 m_hide = TRUE;
684 }
685 QCString locLangExt = getFileNameExtension(op.includeFileName());
686 if (locLangExt.isEmpty()) locLangExt = m_langExt;
687 SrcLangExt langExt = getLanguageFromFileName(locLangExt);
688 if (op.type()!=DocIncOperator::Skip)
689 {
690 m_hide = popHidden();
691 if (!m_hide)
692 {
693 std::unique_ptr<FileDef> fd;
694 if (!op.includeFileName().isEmpty())
695 {
696 FileInfo cfi( op.includeFileName().str() );
697 fd = createFileDef( cfi.dirPath(), cfi.fileName() );
698 }
699
700 getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
702 op.isExample(),op.exampleFile(),
703 fd.get(), // fileDef
704 op.line(), // startLine
705 -1, // endLine
706 FALSE, // inline fragment
707 nullptr, // memberDef
708 op.showLineNo() // show line numbers
709 );
710 }
712 m_hide=TRUE;
713 }
714 if (op.isLast())
715 {
717 if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
718 }
719 else
720 {
721 if (!m_hide) m_t << "\n";
722 }
723}
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:5766

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

◆ operator()() [27/58]

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

Definition at line 744 of file latexdocvisitor.cpp.

745{
746 if (m_hide) return;
747 m_t << "\\index{";
749 m_t << "@{";
751 m_t << "}}";
752}
QCString entry() const
Definition docnode.h:559
QCString latexEscapeIndexChars(const QCString &s)
QCString latexEscapeLabelName(const QCString &s)

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

◆ operator()() [28/58]

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

Definition at line 1487 of file latexdocvisitor.cpp.

1488{
1489 if (m_hide) return;
1490 visitChildren(i);
1491}

References m_hide, and visitChildren().

◆ operator()() [29/58]

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

Definition at line 1848 of file latexdocvisitor.cpp.

1849{
1850 if (m_hide) return;
1851 startLink(QCString(),ref.file(),ref.anchor());
1852 visitChildren(ref);
1853 endLink(QCString(),ref.file(),ref.anchor());
1854}
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 378 of file latexdocvisitor.cpp.

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

References m_hide, and m_t.

◆ operator()() [31/58]

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

Definition at line 1600 of file latexdocvisitor.cpp.

1601{
1602 if (m_hide) return;
1603 startLink(lnk.ref(),lnk.file(),lnk.anchor());
1604 visitChildren(lnk);
1605 endLink(lnk.ref(),lnk.file(),lnk.anchor());
1606}

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

287{
288 if (m_hide) return;
289 startLink(w.ref(),w.file(),w.anchor());
290 filter(w.word());
291 endLink(w.ref(),w.file(),w.anchor());
292}
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 1573 of file latexdocvisitor.cpp.

1574{
1575 if (m_hide) return;
1576 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1577 startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1578 visitChildren(df);
1579 endMscFile(df.hasCaption());
1580}
void endMscFile(bool hasCaption)
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)

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

◆ operator()() [34/58]

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

Definition at line 867 of file latexdocvisitor.cpp.

868{
869 if (m_hide) return;
870 visitChildren(p);
871 if (!p.isLast() && // omit <p> for last paragraph
872 !(p.parent() && // and for parameter sections
873 std::get_if<DocParamSect>(p.parent())
874 )
875 )
876 {
877 if (insideTable())
878 {
879 m_t << "~\\newline\n";
880 }
881 else
882 {
883 m_t << "\n\n";
884 }
885 }
886}
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 1740 of file latexdocvisitor.cpp.

1741{
1742 if (m_hide) return;
1744 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1745 if (sect)
1746 {
1747 parentType = sect->type();
1748 }
1749 bool useTable = parentType==DocParamSect::Param ||
1750 parentType==DocParamSect::RetVal ||
1751 parentType==DocParamSect::Exception ||
1752 parentType==DocParamSect::TemplateParam;
1753 if (!useTable)
1754 {
1755 m_t << "\\item[";
1756 }
1757 if (sect && sect->hasInOutSpecifier())
1758 {
1760 {
1761 m_t << "\\mbox{\\texttt{";
1762 if (pl.direction()==DocParamSect::In)
1763 {
1764 m_t << "in";
1765 }
1766 else if (pl.direction()==DocParamSect::Out)
1767 {
1768 m_t << "out";
1769 }
1770 else if (pl.direction()==DocParamSect::InOut)
1771 {
1772 m_t << "in,out";
1773 }
1774 m_t << "}} ";
1775 }
1776 if (useTable) m_t << " & ";
1777 }
1778 if (sect && sect->hasTypeSpecifier())
1779 {
1780 for (const auto &type : pl.paramTypes())
1781 {
1782 std::visit(*this,type);
1783 }
1784 if (useTable) m_t << " & ";
1785 }
1786 m_t << "{\\em ";
1787 bool first=TRUE;
1788 for (const auto &param : pl.parameters())
1789 {
1790 if (!first) m_t << ","; else first=FALSE;
1792 std::visit(*this,param);
1794 }
1795 m_t << "}";
1796 if (useTable)
1797 {
1798 m_t << " & ";
1799 }
1800 else
1801 {
1802 m_t << "]";
1803 }
1804 for (const auto &par : pl.paragraphs())
1805 {
1806 std::visit(*this,par);
1807 }
1808 if (useTable)
1809 {
1810 m_t << "\\\\\n"
1811 << "\\hline\n";
1812 }
1813}
const DocNodeList & parameters() const
Definition docnode.h:1129
const DocNodeList & paramTypes() const
Definition docnode.h:1130
DocParamSect::Direction direction() const
Definition docnode.h:1133
const DocNodeList & paragraphs() const
Definition docnode.h:1131
bool hasInOutSpecifier() const
Definition docnode.h:1069
bool hasTypeSpecifier() const
Definition docnode.h:1070
Type type() const
Definition docnode.h:1068

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

◆ operator()() [36/58]

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

Definition at line 1681 of file latexdocvisitor.cpp.

1682{
1683 if (m_hide) return;
1684 bool hasInOutSpecs = s.hasInOutSpecifier();
1685 bool hasTypeSpecs = s.hasTypeSpecifier();
1686 m_lcg.incUsedTableLevel();
1687 switch(s.type())
1688 {
1690 m_t << "\n\\begin{DoxyParams}";
1691 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1692 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1693 m_t << "{";
1695 break;
1697 m_t << "\n\\begin{DoxyRetVals}{";
1699 break;
1701 m_t << "\n\\begin{DoxyExceptions}{";
1703 break;
1705 m_t << "\n\\begin{DoxyTemplParams}{";
1707 break;
1708 default:
1709 ASSERT(0);
1711 }
1712 m_t << "}\n";
1713 visitChildren(s);
1714 m_lcg.decUsedTableLevel();
1715 switch(s.type())
1716 {
1718 m_t << "\\end{DoxyParams}\n";
1719 break;
1721 m_t << "\\end{DoxyRetVals}\n";
1722 break;
1724 m_t << "\\end{DoxyExceptions}\n";
1725 break;
1727 m_t << "\\end{DoxyTemplParams}\n";
1728 break;
1729 default:
1730 ASSERT(0);
1732 }
1733}
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 1876 of file latexdocvisitor.cpp.

1877{
1878 if (m_hide) return;
1879 visitChildren(pb);
1880}

References m_hide, and visitChildren().

◆ operator()() [38/58]

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

Definition at line 1591 of file latexdocvisitor.cpp.

1592{
1593 if (m_hide) return;
1594 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1595 startPlantUmlFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1596 visitChildren(df);
1598}
void startPlantUmlFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption, const QCString &srcFile, int srcLine)
void endPlantUmlFile(bool hasCaption)

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

◆ operator()() [39/58]

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

Definition at line 1608 of file latexdocvisitor.cpp.

1609{
1610 if (m_hide) return;
1611 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1612 // ref.anchor() for LaTeX/RTF
1613 if (ref.isSubPage())
1614 {
1615 startLink(ref.ref(),QCString(),ref.anchor());
1616 }
1617 else
1618 {
1619 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1620 }
1621 if (!ref.hasLinkText())
1622 {
1623 filter(ref.targetTitle());
1624 }
1625 visitChildren(ref);
1626 if (ref.isSubPage())
1627 {
1628 endLink(ref.ref(),QCString(),ref.anchor());
1629 }
1630 else
1631 {
1632 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1633 }
1634}
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 888 of file latexdocvisitor.cpp.

889{
890 visitChildren(r);
891}

References visitChildren().

◆ operator()() [41/58]

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

Definition at line 1636 of file latexdocvisitor.cpp.

1637{
1638 if (m_hide) return;
1639 m_t << "\\item \\contentsline{section}{";
1640 if (ref.isSubPage())
1641 {
1642 startLink(ref.ref(),QCString(),ref.anchor());
1643 }
1644 else
1645 {
1646 if (!ref.file().isEmpty())
1647 {
1648 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1649 }
1650 }
1651 visitChildren(ref);
1652 if (ref.isSubPage())
1653 {
1654 endLink(ref.ref(),QCString(),ref.anchor());
1655 }
1656 else
1657 {
1658 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1659 }
1660 m_t << "}{\\ref{";
1661 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1662 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1663 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1664 m_t << "}}{}\n";
1665}
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 1667 of file latexdocvisitor.cpp.

1668{
1669 if (m_hide) return;
1670 m_t << "\\footnotesize\n";
1671 m_t << "\\begin{multicols}{2}\n";
1672 m_t << "\\begin{DoxyCompactList}\n";
1674 visitChildren(l);
1676 m_t << "\\end{DoxyCompactList}\n";
1677 m_t << "\\end{multicols}\n";
1678 m_t << "\\normalsize\n";
1679}

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

◆ operator()() [43/58]

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

Definition at line 1069 of file latexdocvisitor.cpp.

1070{
1071 if (m_hide) return;
1072 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1073 if (pdfHyperlinks)
1074 {
1075 m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
1076 }
1077 m_t << "\\" << getSectionName(s.level()) << "{";
1078 if (pdfHyperlinks)
1079 {
1080 m_t << "\\texorpdfstring{";
1081 }
1082 if (s.title())
1083 {
1084 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::TEX;
1085 std::visit(*this,*s.title());
1087 }
1088 if (pdfHyperlinks)
1089 {
1090 m_t << "}{";
1091 if (s.title())
1092 {
1093 if (pdfHyperlinks) m_texOrPdf = TexOrPdf::PDF;
1094 std::visit(*this,*s.title());
1096 }
1097 m_t << "}";
1098 }
1099 m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
1100 visitChildren(s);
1101}
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 1735 of file latexdocvisitor.cpp.

1736{
1737 m_t << " " << sep.chars() << " ";
1738}
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 1048 of file latexdocvisitor.cpp.

1049{
1050 if (m_hide) return;
1051 m_t << "\\begin{DoxyItemize}\n";
1052 m_listItemInfo[indentLevel()].isEnum = false;
1053 visitChildren(l);
1054 m_t << "\\end{DoxyItemize}\n";
1055}

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

◆ operator()() [46/58]

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

Definition at line 1057 of file latexdocvisitor.cpp.

1058{
1059 if (m_hide) return;
1060 m_t << "\\item ";
1062 if (li.paragraph())
1063 {
1064 visit(*this,*li.paragraph());
1065 }
1067}
const DocNodeVariant * paragraph() const
Definition docnode.h:1157

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

◆ operator()() [47/58]

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

Definition at line 893 of file latexdocvisitor.cpp.

894{
895 if (m_hide) return;
896 switch(s.type())
897 {
899 m_t << "\\begin{DoxySeeAlso}{";
901 break;
903 m_t << "\\begin{DoxyReturn}{";
905 break;
907 m_t << "\\begin{DoxyAuthor}{";
909 break;
911 m_t << "\\begin{DoxyAuthor}{";
913 break;
915 m_t << "\\begin{DoxyVersion}{";
917 break;
919 m_t << "\\begin{DoxySince}{";
921 break;
923 m_t << "\\begin{DoxyDate}{";
925 break;
927 m_t << "\\begin{DoxyNote}{";
929 break;
931 m_t << "\\begin{DoxyWarning}{";
933 break;
935 m_t << "\\begin{DoxyPrecond}{";
937 break;
939 m_t << "\\begin{DoxyPostcond}{";
941 break;
943 m_t << "\\begin{DoxyCopyright}{";
945 break;
947 m_t << "\\begin{DoxyInvariant}{";
949 break;
951 m_t << "\\begin{DoxyRemark}{";
953 break;
955 m_t << "\\begin{DoxyAttention}{";
957 break;
959 m_t << "\\begin{DoxyImportant}{";
961 break;
963 m_t << "\\begin{DoxyParagraph}{";
964 break;
966 m_t << "\\begin{DoxyParagraph}{";
967 break;
968 case DocSimpleSect::Unknown: break;
969 }
970
971 if (s.title())
972 {
974 std::visit(*this,*s.title());
976 }
977 m_t << "}\n";
979 visitChildren(s);
980 switch(s.type())
981 {
983 m_t << "\n\\end{DoxySeeAlso}\n";
984 break;
986 m_t << "\n\\end{DoxyReturn}\n";
987 break;
989 m_t << "\n\\end{DoxyAuthor}\n";
990 break;
992 m_t << "\n\\end{DoxyAuthor}\n";
993 break;
995 m_t << "\n\\end{DoxyVersion}\n";
996 break;
998 m_t << "\n\\end{DoxySince}\n";
999 break;
1001 m_t << "\n\\end{DoxyDate}\n";
1002 break;
1004 m_t << "\n\\end{DoxyNote}\n";
1005 break;
1007 m_t << "\n\\end{DoxyWarning}\n";
1008 break;
1009 case DocSimpleSect::Pre:
1010 m_t << "\n\\end{DoxyPrecond}\n";
1011 break;
1013 m_t << "\n\\end{DoxyPostcond}\n";
1014 break;
1016 m_t << "\n\\end{DoxyCopyright}\n";
1017 break;
1019 m_t << "\n\\end{DoxyInvariant}\n";
1020 break;
1022 m_t << "\n\\end{DoxyRemark}\n";
1023 break;
1025 m_t << "\n\\end{DoxyAttention}\n";
1026 break;
1028 m_t << "\n\\end{DoxyImportant}\n";
1029 break;
1031 m_t << "\n\\end{DoxyParagraph}\n";
1032 break;
1033 case DocSimpleSect::Rcs:
1034 m_t << "\n\\end{DoxyParagraph}\n";
1035 break;
1036 default:
1037 break;
1038 }
1040}
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 754 of file latexdocvisitor.cpp.

755{
756}

◆ operator()() [49/58]

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

Definition at line 393 of file latexdocvisitor.cpp.

394{
395 if (m_hide) return;
396 switch (s.style())
397 {
399 if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
400 break;
404 if (s.enable()) m_t << "\\sout{"; else m_t << "}";
405 break;
408 if (s.enable()) m_t << "\\uline{"; else m_t << "}";
409 break;
411 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
412 break;
416 if (s.enable()) m_t << "{\\ttfamily "; else m_t << "}";
417 break;
419 if (s.enable()) m_t << "\\textsubscript{"; else m_t << "}";
420 break;
422 if (s.enable()) m_t << "\\textsuperscript{"; else m_t << "}";
423 break;
425 if (s.enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
426 break;
428 if (s.enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
429 break;
431 if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
432 break;
434 if (s.enable())
435 {
436 m_t << "\n\\begin{DoxyPre}";
438 }
439 else
440 {
442 m_t << "\\end{DoxyPre}\n";
443 }
444 break;
445 case DocStyleChange::Div: /* HTML only */ break;
446 case DocStyleChange::Span: /* HTML only */ break;
447 }
448}
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 307 of file latexdocvisitor.cpp.

308{
309 if (m_hide) return;
310 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
311 const char *res = HtmlEntityMapper::instance().latex(s.symbol());
312 if (res)
313 {
315 {
316 if (pdfHyperlinks)
317 {
318 m_t << "\\texorpdfstring{$<$}{<}";
319 }
320 else
321 {
322 m_t << "$<$";
323 }
324 }
326 {
327 if (pdfHyperlinks)
328 {
329 m_t << "\\texorpdfstring{$>$}{>}";
330 }
331 else
332 {
333 m_t << "$>$";
334 }
335 }
336 else
337 {
338 m_t << res;
339 }
340 }
341 else
342 {
343 err("LaTeX: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(s.symbol(),TRUE));
344 }
345}
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 1856 of file latexdocvisitor.cpp.

1857{
1858 if (m_hide) return;
1859 visitChildren(t);
1860}

References m_hide, and visitChildren().

◆ operator()() [52/58]

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

Definition at line 1042 of file latexdocvisitor.cpp.

1043{
1044 if (m_hide) return;
1045 visitChildren(t);
1046}

References m_hide, and visitChildren().

◆ operator()() [53/58]

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

Definition at line 364 of file latexdocvisitor.cpp.

365{
366 if (m_hide) return;
367 if (Config_getBool(PDF_HYPERLINKS))
368 {
369 m_t << "\\href{";
370 if (u.isEmail()) m_t << "mailto:";
371 m_t << latexFilterURL(u.url()) << "}";
372 }
373 m_t << "{\\texttt{";
374 filter(u.url());
375 m_t << "}}";
376}
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 450 of file latexdocvisitor.cpp.

451{
452 if (m_hide) return;
453 QCString lang = m_langExt;
454 if (!s.language().isEmpty()) // explicit language setting
455 {
456 lang = s.language();
457 }
458 SrcLangExt langExt = getLanguageFromCodeLang(lang);
459 switch(s.type())
460 {
462 {
463 m_ci.startCodeFragment("DoxyCode");
464 getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
465 Config_getBool(STRIP_CODE_COMMENTS),
466 s.isExample(),s.exampleFile());
467 m_ci.endCodeFragment("DoxyCode");
468 }
469 break;
471 filter(s.text(), true);
472 break;
474 m_t << "{\\ttfamily ";
475 filter(s.text(), true);
476 m_t << "}";
477 break;
479 if (isTableNested(s.parent())) // in table
480 {
481 m_t << "\\begin{DoxyCode}{0}";
482 filter(s.text(), true);
483 m_t << "\\end{DoxyCode}\n";
484 }
485 else
486 {
487 m_t << "\\begin{DoxyVerb}";
488 m_t << s.text();
489 m_t << "\\end{DoxyVerb}\n";
490 }
491 break;
497 /* nothing */
498 break;
500 m_t << s.text();
501 break;
502 case DocVerbatim::Dot:
503 {
504 static int dotindex = 1;
505 QCString fileName(4096, QCString::ExplicitSize);
506
507 fileName.sprintf("%s%d%s",
508 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_"),
509 dotindex++,
510 ".dot"
511 );
512 std::ofstream file = Portable::openOutputStream(fileName);
513 if (!file.is_open())
514 {
515 err("Could not open file {} for writing\n",fileName);
516 }
517 else
518 {
519 file.write( s.text().data(), s.text().length() );
520 file.close();
521
522 startDotFile(fileName,s.width(),s.height(),s.hasCaption(),s.srcFile(),s.srcLine());
523 visitChildren(s);
525
526 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
527 }
528 }
529 break;
530 case DocVerbatim::Msc:
531 {
532 static int mscindex = 1;
533 QCString baseName(4096, QCString::ExplicitSize);
534
535 baseName.sprintf("%s%d",
536 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_"),
537 mscindex++
538 );
539 QCString fileName = baseName+".msc";
540 std::ofstream file = Portable::openOutputStream(fileName);
541 if (!file.is_open())
542 {
543 err("Could not open file {} for writing\n",fileName);
544 }
545 else
546 {
547 QCString text = "msc {";
548 text+=s.text();
549 text+="}";
550 file.write( text.data(), text.length() );
551 file.close();
552
553 writeMscFile(baseName, s);
554
555 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
556 }
557 }
558 break;
560 {
561 QCString latexOutput = Config_getString(LATEX_OUTPUT);
562 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
563 latexOutput,s.exampleFile(),s.text(),
565 s.engine(),s.srcFile(),s.srcLine(),true);
566
567 for (const auto &baseName: baseNameVector)
568 {
569 writePlantUMLFile(baseName, s);
570 }
571 }
572 break;
573 }
574}
QCString srcFile() const
Definition docnode.h:397
int srcLine() const
Definition docnode.h:398
QCString height() const
Definition docnode.h:392
bool hasCaption() const
Definition docnode.h:390
QCString language() const
Definition docnode.h:388
bool isExample() const
Definition docnode.h:385
QCString context() const
Definition docnode.h:384
Type type() const
Definition docnode.h:382
QCString text() const
Definition docnode.h:383
QCString exampleFile() const
Definition docnode.h:386
QCString engine() const
Definition docnode.h:393
bool useBitmap() const
Definition docnode.h:394
@ JavaDocLiteral
Definition docnode.h:378
QCString width() const
Definition docnode.h:391
void writePlantUMLFile(const QCString &fileName, const DocVerbatim &s)
void writeMscFile(const QCString &fileName, const DocVerbatim &s)
StringVector writePlantUMLSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
Definition plantuml.cpp:31
static PlantumlManager & instance()
Definition plantuml.cpp:231
@ ExplicitSize
Definition qcstring.h:146
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:649
const char * qPrint(const char *s)
Definition qcstring.h:687
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5742

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

◆ operator()() [55/58]

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

Definition at line 1872 of file latexdocvisitor.cpp.

1873{
1874}

◆ operator()() [56/58]

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

Definition at line 294 of file latexdocvisitor.cpp.

295{
296 if (m_hide) return;
297 if (m_insidePre)
298 {
299 m_t << w.chars();
300 }
301 else
302 {
303 m_t << " ";
304 }
305}
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 280 of file latexdocvisitor.cpp.

281{
282 if (m_hide) return;
283 filter(w.word());
284}
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 1815 of file latexdocvisitor.cpp.

1816{
1817 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1818 if (m_hide) return;
1819 if (x.title().isEmpty()) return;
1821 m_t << "\\begin{DoxyRefDesc}{";
1822 filter(x.title());
1823 m_t << "}\n";
1824 bool anonymousEnum = x.file()=="@";
1825 m_t << "\\item[";
1826 if (pdfHyperlinks && !anonymousEnum)
1827 {
1828 m_t << "\\mbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1829 }
1830 else
1831 {
1832 m_t << "\\textbf{ ";
1833 }
1835 filter(x.title());
1837 if (pdfHyperlinks && !anonymousEnum)
1838 {
1839 m_t << "}";
1840 }
1841 m_t << "}]";
1842 visitChildren(x);
1843 if (x.title().isEmpty()) return;
1845 m_t << "\\end{DoxyRefDesc}\n";
1846}
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 209 of file latexdocvisitor.h.

210 {
211 m_tableStateStack.pop();
212 }

References m_tableStateStack.

Referenced by operator()().

◆ pushTableState()

void LatexDocVisitor::pushTableState ( )
inlineprivate

Definition at line 205 of file latexdocvisitor.h.

206 {
207 m_tableStateStack.emplace();
208 }

References m_tableStateStack.

Referenced by operator()().

◆ rowSpans()

RowSpanList & LatexDocVisitor::rowSpans ( )
inlineprivate

Definition at line 229 of file latexdocvisitor.h.

230 {
231 return !m_tableStateStack.empty() ? m_tableStateStack.top().rowSpans : m_emptyRowSpanList;
232 }
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 217 of file latexdocvisitor.h.

218 {
219 if (!m_tableStateStack.empty()) m_tableStateStack.top().currentColumn = col;
220 }

References m_tableStateStack.

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

◆ setNumCols()

void LatexDocVisitor::setNumCols ( size_t num)
inlineprivate

Definition at line 225 of file latexdocvisitor.h.

226 {
227 if (!m_tableStateStack.empty()) m_tableStateStack.top().numCols = num;
228 }

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

2030{
2031 QCString baseName=makeBaseName(fileName);
2032 baseName.prepend("dia_");
2033
2034 QCString outDir = Config_getString(LATEX_OUTPUT);
2035 writeDiaGraphFromFile(fileName,outDir,baseName,DiaOutputFormat::EPS,srcFile,srcLine);
2036 visitPreStart(m_t,hasCaption, baseName, width, height);
2037}
QCString & prepend(const char *s)
Definition qcstring.h:422
void writeDiaGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
Definition dia.cpp:26
static QCString makeBaseName(const QCString &name)

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

Referenced by operator()().

◆ startDotFile()

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

Definition at line 1967 of file latexdocvisitor.cpp.

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

1897{
1898 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1899 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1900 {
1901 if (refToTable)
1902 {
1903 m_t << "\\doxytablelink{";
1904 }
1905 else if (refToSection)
1906 {
1907 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1908 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxysectlink{";
1909 }
1910 else
1911 {
1912 if (m_texOrPdf == TexOrPdf::TEX) m_t << "\\protect";
1913 if (m_texOrPdf != TexOrPdf::PDF) m_t << "\\doxylink{";
1914 }
1915 if (refToTable || m_texOrPdf != TexOrPdf::PDF)
1916 {
1917 if (!file.isEmpty()) m_t << stripPath(file);
1918 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1919 if (!anchor.isEmpty()) m_t << anchor;
1920 m_t << "}";
1921 }
1922 m_t << "{";
1923 }
1924 else if (ref.isEmpty() && refToSection)
1925 {
1926 m_t << "\\doxysectref{";
1927 }
1928 else if (ref.isEmpty() && refToTable)
1929 {
1930 m_t << "\\doxytableref{";
1931 }
1932 else if (ref.isEmpty()) // internal non-PDF link
1933 {
1934 m_t << "\\doxyref{";
1935 }
1936 else // external link
1937 {
1938 m_t << "\\textbf{ ";
1939 }
1940}

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

1996{
1997 QCString baseName=makeBaseName(fileName);
1998 baseName.prepend("msc_");
1999
2000 QCString outDir = Config_getString(LATEX_OUTPUT);
2001 writeMscGraphFromFile(fileName,outDir,baseName,MscOutputFormat::EPS,srcFile,srcLine);
2002 visitPreStart(m_t,hasCaption, baseName, width, height);
2003}
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 2071 of file latexdocvisitor.cpp.

2078{
2079 QCString outDir = Config_getString(LATEX_OUTPUT);
2080 std::string inBuf;
2081 readInputFile(fileName,inBuf);
2082
2083 bool useBitmap = inBuf.find("@startditaa") != std::string::npos;
2084 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
2085 outDir,QCString(),inBuf,
2087 QCString(),srcFile,srcLine,false);
2088 bool first = true;
2089 for (const auto &bName: baseNameVector)
2090 {
2091 QCString baseName = makeBaseName(bName);
2092 QCString shortName = makeShortName(baseName);
2093 if (useBitmap)
2094 {
2095 if (shortName.find('.')==-1) shortName += ".png";
2096 }
2099 if (!first) endPlantUmlFile(hasCaption);
2100 first = false;
2101 visitPreStart(m_t,hasCaption, shortName, width, height);
2102 }
2103}
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition plantuml.cpp:202
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
static QCString makeShortName(const QCString &baseName)
bool readInputFile(const QCString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
Definition util.cpp:6053

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

Referenced by operator()().

◆ visitCaption()

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

Definition at line 232 of file latexdocvisitor.cpp.

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

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

◆ visitChildren()

◆ writeDiaFile()

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

Definition at line 2046 of file latexdocvisitor.cpp.

2047{
2048 QCString shortName = makeShortName(baseName);
2049 QCString outDir = Config_getString(LATEX_OUTPUT);
2050 writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DiaOutputFormat::EPS,s.srcFile(),s.srcLine());
2051 visitPreStart(m_t, s.hasCaption(), shortName, s.width(), s.height());
2054}
const DocNodeList & children() const
Definition docnode.h:395
void visitCaption(const DocNodeList &children)

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

◆ writeEndTableCommand()

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

Definition at line 1285 of file latexdocvisitor.cpp.

1286{
1287 if (isTableNested(n))
1288 {
1289 m_t << "\\end{DoxyTableNested}\n";
1290 }
1291 else
1292 {
1293 m_t << "\\end{DoxyTable}\n";
1294 }
1295}

References isTableNested(), and m_t.

Referenced by operator()().

◆ writeMscFile()

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

Definition at line 2012 of file latexdocvisitor.cpp.

2013{
2014 QCString shortName = makeShortName(baseName);
2015 QCString outDir = Config_getString(LATEX_OUTPUT);
2016 writeMscGraphFromFile(baseName+".msc",outDir,shortName,MscOutputFormat::EPS,s.srcFile(),s.srcLine());
2017 visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
2020}

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

Referenced by operator()().

◆ writePlantUMLFile()

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

◆ writeStartTableCommand()

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

Definition at line 1273 of file latexdocvisitor.cpp.

1274{
1275 if (isTableNested(n))
1276 {
1277 m_t << "\\begin{DoxyTableNested}{" << cols << "}";
1278 }
1279 else
1280 {
1281 m_t << "\n\\begin{DoxyTable}{" << cols << "}";
1282 }
1283}

References isTableNested(), and m_t.

Referenced by operator()().

Member Data Documentation

◆ m_ci

OutputCodeList& LatexDocVisitor::m_ci
private

Definition at line 177 of file latexdocvisitor.h.

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

◆ m_emptyRowSpanList

RowSpanList LatexDocVisitor::m_emptyRowSpanList
private

Definition at line 193 of file latexdocvisitor.h.

Referenced by rowSpans().

◆ m_hide

◆ m_hierarchyLevel

int LatexDocVisitor::m_hierarchyLevel
private

Definition at line 183 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 179 of file latexdocvisitor.h.

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

◆ m_langExt

QCString LatexDocVisitor::m_langExt
private

Definition at line 182 of file latexdocvisitor.h.

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

◆ m_lcg

LatexCodeGenerator& LatexDocVisitor::m_lcg
private

Definition at line 178 of file latexdocvisitor.h.

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

◆ m_listItemInfo

LatexListItemInfo LatexDocVisitor::m_listItemInfo[maxIndentLevels]
private

Definition at line 203 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 184 of file latexdocvisitor.h.

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

◆ maxIndentLevels

const int LatexDocVisitor::maxIndentLevels = 13
staticprivate

Definition at line 195 of file latexdocvisitor.h.

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


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