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)
bool firstRow () const
void setFirstRow (bool b)
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 242 of file latexdocvisitor.h.

243 {
244 if (!m_tableStateStack.empty()) m_tableStateStack.top().rowSpans.push_back(std::move(span));
245 }
std::stack< TableState > m_tableStateStack

References m_tableStateStack.

Referenced by operator()().

◆ currentColumn()

size_t LatexDocVisitor::currentColumn ( ) const
inlineprivate

Definition at line 214 of file latexdocvisitor.h.

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

References m_tableStateStack.

Referenced by operator()().

◆ decIndentLevel()

void LatexDocVisitor::decIndentLevel ( )
private

Definition at line 2114 of file latexdocvisitor.cpp.

2115{
2116 if (m_indentLevel>0)
2117 {
2118 m_indentLevel--;
2119 }
2120}

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

2029{
2030 if (m_hide) return;
2031 visitPostEnd(m_t,hasCaption);
2032}
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 1972 of file latexdocvisitor.cpp.

1973{
1974 if (m_hide) return;
1975 visitPostEnd(m_t,hasCaption);
1976}

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

1932{
1933 m_t << "}";
1934 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1935 if (ref.isEmpty() && !pdfHyperLinks)
1936 {
1937 m_t << "{";
1939 m_t << "}{" << file;
1940 if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1941 m_t << anchor << "}";
1942 if (refToSection)
1943 {
1944 m_t << "{" << sectionType.level() << "}";
1945 }
1946 }
1947 if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1948 {
1949 if (refToSection)
1950 {
1951 if (m_texOrPdf != TexOrPdf::PDF) m_t << "{" << sectionType.level() << "}";
1952 }
1953 }
1954}
void filter(const QCString &str, const bool retainNewLine=false)
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
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 1994 of file latexdocvisitor.cpp.

1995{
1996 if (m_hide) return;
1997 visitPostEnd(m_t,hasCaption);
1998}

References m_hide, m_t, and visitPostEnd().

Referenced by operator()().

◆ endPlantUmlFile()

void LatexDocVisitor::endPlantUmlFile ( bool hasCaption)
private

Definition at line 2094 of file latexdocvisitor.cpp.

2095{
2096 if (m_hide) return;
2097 visitPostEnd(m_t,hasCaption);
2098}

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

1872{
1873 //printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
1875 m_lcg.insideTabbing(),
1878 m_lcg.usedTableLevel()>0, // insideTable
1879 false, // keepSpaces
1880 retainNewLine
1881 );
1882}
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()(), and operator()().

◆ firstRow()

bool LatexDocVisitor::firstRow ( ) const
inlineprivate

Definition at line 230 of file latexdocvisitor.h.

231 {
232 return !m_tableStateStack.empty() ? m_tableStateStack.top().firstRow : FALSE;
233 }

References FALSE, and m_tableStateStack.

Referenced by 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 2105 of file latexdocvisitor.cpp.

2106{
2107 m_indentLevel++;
2109 {
2110 err("Maximum indent level ({}) exceeded while generating LaTeX output!\n",maxIndentLevels-1);
2111 }
2112}
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 2100 of file latexdocvisitor.cpp.

2101{
2102 return std::min(m_indentLevel,maxIndentLevels-1);
2103}

References m_indentLevel, and maxIndentLevels.

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

◆ insideTable()

bool LatexDocVisitor::insideTable ( ) const
inlineprivate

Definition at line 246 of file latexdocvisitor.h.

247 {
248 return !m_tableStateStack.empty();
249 }

References m_tableStateStack.

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

◆ isTableNested()

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

Definition at line 1244 of file latexdocvisitor.cpp.

1245{
1246 bool isNested=m_lcg.usedTableLevel()>0;
1247 while (n && !isNested)
1248 {
1250 n = ::parent(n);
1251 }
1252 return isNested;
1253}
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()(), writeEndTableCommand(), and writeStartTableCommand().

◆ numCols()

size_t LatexDocVisitor::numCols ( ) const
inlineprivate

Definition at line 222 of file latexdocvisitor.h.

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

References m_tableStateStack.

◆ operator()() [1/58]

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

Definition at line 567 of file latexdocvisitor.cpp.

568{
569 if (m_hide) return;
570 m_t << "\\label{" << stripPath(anc.file()) << "_" << anc.anchor() << "}%\n";
571 if (!anc.file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
572 {
573 m_t << "\\Hypertarget{" << stripPath(anc.file()) << "_" << anc.anchor()
574 << "}%\n";
575 }
576}
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 803 of file latexdocvisitor.cpp.

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

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

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

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

1572{
1573 if (m_hide) return;
1574 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1575 startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1576 visitChildren(df);
1577 endDiaFile(df.hasCaption());
1578}
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 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 startDotFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1558 visitChildren(df);
1559 endDotFile(df.hasCaption());
1560}
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 707 of file latexdocvisitor.cpp.

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

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

1483{
1484 if (m_hide) return;
1485 if (Config_getBool(PDF_HYPERLINKS))
1486 {
1487 m_t << "\\href{";
1488 m_t << latexFilterURL(href.url());
1489 m_t << "}";
1490 }
1491 m_t << "{\\texttt{";
1492 visitChildren(href);
1493 m_t << "}}";
1494}
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 1851 of file latexdocvisitor.cpp.

1852{
1853 if (m_hide) return;
1854 m_t << "\\begin{quote}\n";
1856 visitChildren(q);
1857 m_t << "\\end{quote}\n";
1859}

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

◆ operator()() [12/58]

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

Definition at line 1336 of file latexdocvisitor.cpp.

1337{
1338 if (m_hide) return;
1339 visitChildren(c);
1340}

References m_hide, and visitChildren().

◆ operator()() [13/58]

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

Definition at line 1372 of file latexdocvisitor.cpp.

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

1236{
1238 if (!m_insideItem) m_t << "\\hfill";
1239 m_t << " \\\\\n";
1240 visitChildren(dd);
1242}

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

◆ operator()() [15/58]

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

Definition at line 1201 of file latexdocvisitor.cpp.

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

1226{
1227 if (m_hide) return;
1228 m_t << "\n\\item[";
1230 visitChildren(dt);
1232 m_t << "]";
1233}
#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 1504 of file latexdocvisitor.cpp.

1505{
1506 if (m_hide) return;
1507 m_t << "\n\n";
1508 auto summary = d.summary();
1509 if (summary)
1510 {
1511 std::visit(*this,*summary);
1512 m_t << "\\begin{adjustwidth}{1em}{0em}\n";
1513 }
1514 visitChildren(d);
1515 if (summary)
1516 {
1517 m_t << "\\end{adjustwidth}\n";
1518 }
1519 else
1520 {
1521 m_t << "\n\n";
1522 }
1523}
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 1525 of file latexdocvisitor.cpp.

1526{
1527 if (m_hide) return;
1528 m_t << "\\" << getSectionName(header.level()) << "*{";
1529 visitChildren(header);
1530 m_t << "}";
1531}
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 1085 of file latexdocvisitor.cpp.

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

1153{
1154 if (m_hide) return;
1155 if (m_listItemInfo[indentLevel()].isEnum)
1156 {
1157 for (const auto &opt : l.attribs())
1158 {
1159 if (opt.name=="value")
1160 {
1161 bool ok = false;
1162 int val = opt.value.toInt(&ok);
1163 if (ok)
1164 {
1165 m_t << "\n\\setcounter{DoxyEnumerate" << integerToRoman(indentLevel()+1,false) << "}{" << (val - 1) << "}";
1166 }
1167 }
1168 }
1169 }
1170 m_t << "\n\\item ";
1172 visitChildren(l);
1174}
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 1342 of file latexdocvisitor.cpp.

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

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

◆ operator()() [22/58]

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

Definition at line 1496 of file latexdocvisitor.cpp.

1497{
1498 if (m_hide) return;
1499 m_t << "{\\bfseries{";
1500 visitChildren(d);
1501 m_t << "}}";
1502}

References m_hide, m_t, and visitChildren().

◆ operator()() [23/58]

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

Definition at line 1281 of file latexdocvisitor.cpp.

1282{
1283 if (m_hide) return;
1285 const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
1286 if (c)
1287 {
1288 bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1289 if (!c->file().isEmpty() && pdfHyperLinks)
1290 {
1291 m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1292 << "}{}";
1293 }
1294 m_t << "\n";
1295 }
1296
1297 const DocHtmlRow *firstRow = std::get_if<DocHtmlRow>(t.firstRow());
1299 if (!isTableNested(t.parent()))
1300 {
1301 // write caption
1302 m_t << "{";
1303 if (c)
1304 {
1305 std::visit(*this, *t.caption());
1306 }
1307 m_t << "}";
1308 // write label
1309 m_t << "{";
1310 if (c)
1311 {
1312 m_t << stripPath(c->file()) << "_" << c->anchor();
1313 }
1314 m_t << "}";
1315 }
1316 // write head row
1317 m_t << "{";
1318 if (firstRow && firstRow->isHeading())
1319 {
1320 m_t << "1";
1321 }
1322 else
1323 {
1324 m_t << "0";
1325 }
1326 m_t << "}";
1327 m_t << "\n";
1328
1330
1331 visitChildren(t);
1333 popTableState();
1334}
QCString anchor() const
Definition docnode.h:1235
QCString file() const
Definition docnode.h:1234
size_t numColumns() const
Definition docnode.h:1278
const DocNodeVariant * caption() const
Definition docnode.cpp:2183
const DocNodeVariant * firstRow() const
Definition docnode.cpp:2188
DocNodeVariant * parent()
Definition docnode.h:90
bool firstRow() const
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(), DocHtmlTable::firstRow(), firstRow(), QCString::isEmpty(), isTableNested(), m_hide, m_t, DocHtmlTable::numColumns(), DocNode::parent(), popTableState(), pushTableState(), setNumCols(), stripPath(), visitChildren(), writeEndTableCommand(), and writeStartTableCommand().

◆ operator()() [24/58]

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

Definition at line 1533 of file latexdocvisitor.cpp.

1534{
1535 if (img.type()==DocImage::Latex)
1536 {
1537 if (m_hide) return;
1538 QCString gfxName = img.name();
1539 if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf"))
1540 {
1541 gfxName=gfxName.left(gfxName.length()-4);
1542 }
1543
1544 visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
1545 visitChildren(img);
1547 }
1548 else // other format -> skip
1549 {
1550 }
1551}
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:509
QCString left(size_t len) const
Definition qcstring.h:214
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 578 of file latexdocvisitor.cpp.

579{
580 if (m_hide) return;
582 switch(inc.type())
583 {
585 {
586 m_ci.startCodeFragment("DoxyCodeInclude");
587 FileInfo cfi( inc.file().str() );
588 auto fd = createFileDef( cfi.dirPath(), cfi.fileName() );
590 inc.text(),
591 langExt,
592 inc.stripCodeComments(),
593 inc.isExample(),
594 inc.exampleFile(),
595 fd.get(), // fileDef,
596 -1, // start line
597 -1, // end line
598 FALSE, // inline fragment
599 nullptr, // memberDef
600 TRUE // show line numbers
601 );
602 m_ci.endCodeFragment("DoxyCodeInclude");
603 }
604 break;
606 {
607 m_ci.startCodeFragment("DoxyCodeInclude");
609 inc.text(),langExt,
610 inc.stripCodeComments(),
611 inc.isExample(),
612 inc.exampleFile(),
613 nullptr, // fileDef
614 -1, // startLine
615 -1, // endLine
616 TRUE, // inlineFragment
617 nullptr, // memberDef
618 FALSE
619 );
620 m_ci.endCodeFragment("DoxyCodeInclude");
621 }
622 break;
630 break;
632 m_t << inc.text();
633 break;
635 m_t << "\n\\begin{DoxyVerbInclude}\n";
636 m_t << inc.text();
637 m_t << "\\end{DoxyVerbInclude}\n";
638 break;
641 {
642 m_ci.startCodeFragment("DoxyCodeInclude");
644 inc.file(),
645 inc.blockId(),
646 inc.context(),
648 inc.trimLeft(),
650 );
651 m_ci.endCodeFragment("DoxyCodeInclude");
652 }
653 break;
654 }
655}
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:537
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(), 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::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 657 of file latexdocvisitor.cpp.

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

727{
728 if (m_hide) return;
729 m_t << "\\index{";
731 m_t << "@{";
733 m_t << "}}";
734}
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 1476 of file latexdocvisitor.cpp.

1477{
1478 if (m_hide) return;
1479 visitChildren(i);
1480}

References m_hide, and visitChildren().

◆ operator()() [29/58]

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

Definition at line 1837 of file latexdocvisitor.cpp.

1838{
1839 if (m_hide) return;
1840 startLink(QCString(),ref.file(),ref.anchor());
1841 visitChildren(ref);
1842 endLink(QCString(),ref.file(),ref.anchor());
1843}
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 1589 of file latexdocvisitor.cpp.

1590{
1591 if (m_hide) return;
1592 startLink(lnk.ref(),lnk.file(),lnk.anchor());
1593 visitChildren(lnk);
1594 endLink(lnk.ref(),lnk.file(),lnk.anchor());
1595}

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 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 startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1567 visitChildren(df);
1568 endMscFile(df.hasCaption());
1569}
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 849 of file latexdocvisitor.cpp.

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

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

1671{
1672 if (m_hide) return;
1673 bool hasInOutSpecs = s.hasInOutSpecifier();
1674 bool hasTypeSpecs = s.hasTypeSpecifier();
1675 m_lcg.incUsedTableLevel();
1676 switch(s.type())
1677 {
1679 m_t << "\n\\begin{DoxyParams}";
1680 if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1681 else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1682 m_t << "{";
1684 break;
1686 m_t << "\n\\begin{DoxyRetVals}{";
1688 break;
1690 m_t << "\n\\begin{DoxyExceptions}{";
1692 break;
1694 m_t << "\n\\begin{DoxyTemplParams}{";
1696 break;
1697 default:
1698 ASSERT(0);
1700 }
1701 m_t << "}\n";
1702 visitChildren(s);
1703 m_lcg.decUsedTableLevel();
1704 switch(s.type())
1705 {
1707 m_t << "\\end{DoxyParams}\n";
1708 break;
1710 m_t << "\\end{DoxyRetVals}\n";
1711 break;
1713 m_t << "\\end{DoxyExceptions}\n";
1714 break;
1716 m_t << "\\end{DoxyTemplParams}\n";
1717 break;
1718 default:
1719 ASSERT(0);
1721 }
1722}
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 1865 of file latexdocvisitor.cpp.

1866{
1867 if (m_hide) return;
1868 visitChildren(pb);
1869}

References m_hide, and visitChildren().

◆ operator()() [38/58]

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

Definition at line 1580 of file latexdocvisitor.cpp.

1581{
1582 if (m_hide) return;
1583 if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
1584 startPlantUmlFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
1585 visitChildren(df);
1587}
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 1597 of file latexdocvisitor.cpp.

1598{
1599 if (m_hide) return;
1600 // when ref.isSubPage()==TRUE we use ref.file() for HTML and
1601 // ref.anchor() for LaTeX/RTF
1602 if (ref.isSubPage())
1603 {
1604 startLink(ref.ref(),QCString(),ref.anchor());
1605 }
1606 else
1607 {
1608 if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection());
1609 }
1610 if (!ref.hasLinkText())
1611 {
1612 filter(ref.targetTitle());
1613 }
1614 visitChildren(ref);
1615 if (ref.isSubPage())
1616 {
1617 endLink(ref.ref(),QCString(),ref.anchor());
1618 }
1619 else
1620 {
1621 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable(),ref.refToSection(),ref.sectionType());
1622 }
1623}
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 870 of file latexdocvisitor.cpp.

871{
872 visitChildren(r);
873}

References visitChildren().

◆ operator()() [41/58]

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

Definition at line 1625 of file latexdocvisitor.cpp.

1626{
1627 if (m_hide) return;
1628 m_t << "\\item \\contentsline{section}{";
1629 if (ref.isSubPage())
1630 {
1631 startLink(ref.ref(),QCString(),ref.anchor());
1632 }
1633 else
1634 {
1635 if (!ref.file().isEmpty())
1636 {
1637 startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1638 }
1639 }
1640 visitChildren(ref);
1641 if (ref.isSubPage())
1642 {
1643 endLink(ref.ref(),QCString(),ref.anchor());
1644 }
1645 else
1646 {
1647 if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
1648 }
1649 m_t << "}{\\ref{";
1650 if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
1651 if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
1652 if (!ref.anchor().isEmpty()) m_t << ref.anchor();
1653 m_t << "}}{}\n";
1654}
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 1656 of file latexdocvisitor.cpp.

1657{
1658 if (m_hide) return;
1659 m_t << "\\footnotesize\n";
1660 m_t << "\\begin{multicols}{2}\n";
1661 m_t << "\\begin{DoxyCompactList}\n";
1663 visitChildren(l);
1665 m_t << "\\end{DoxyCompactList}\n";
1666 m_t << "\\end{multicols}\n";
1667 m_t << "\\normalsize\n";
1668}

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

◆ operator()() [43/58]

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

Definition at line 1051 of file latexdocvisitor.cpp.

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

1725{
1726 m_t << " " << sep.chars() << " ";
1727}
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 1030 of file latexdocvisitor.cpp.

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

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

◆ operator()() [46/58]

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

Definition at line 1039 of file latexdocvisitor.cpp.

1040{
1041 if (m_hide) return;
1042 m_t << "\\item ";
1044 if (li.paragraph())
1045 {
1046 visit(*this,*li.paragraph());
1047 }
1049}
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 875 of file latexdocvisitor.cpp.

876{
877 if (m_hide) return;
878 switch(s.type())
879 {
881 m_t << "\\begin{DoxySeeAlso}{";
883 break;
885 m_t << "\\begin{DoxyReturn}{";
887 break;
889 m_t << "\\begin{DoxyAuthor}{";
891 break;
893 m_t << "\\begin{DoxyAuthor}{";
895 break;
897 m_t << "\\begin{DoxyVersion}{";
899 break;
901 m_t << "\\begin{DoxySince}{";
903 break;
905 m_t << "\\begin{DoxyDate}{";
907 break;
909 m_t << "\\begin{DoxyNote}{";
911 break;
913 m_t << "\\begin{DoxyWarning}{";
915 break;
917 m_t << "\\begin{DoxyPrecond}{";
919 break;
921 m_t << "\\begin{DoxyPostcond}{";
923 break;
925 m_t << "\\begin{DoxyCopyright}{";
927 break;
929 m_t << "\\begin{DoxyInvariant}{";
931 break;
933 m_t << "\\begin{DoxyRemark}{";
935 break;
937 m_t << "\\begin{DoxyAttention}{";
939 break;
941 m_t << "\\begin{DoxyImportant}{";
943 break;
945 m_t << "\\begin{DoxyParagraph}{";
946 break;
948 m_t << "\\begin{DoxyParagraph}{";
949 break;
950 case DocSimpleSect::Unknown: break;
951 }
952
953 if (s.title())
954 {
956 std::visit(*this,*s.title());
958 }
959 m_t << "}\n";
961 visitChildren(s);
962 switch(s.type())
963 {
965 m_t << "\n\\end{DoxySeeAlso}\n";
966 break;
968 m_t << "\n\\end{DoxyReturn}\n";
969 break;
971 m_t << "\n\\end{DoxyAuthor}\n";
972 break;
974 m_t << "\n\\end{DoxyAuthor}\n";
975 break;
977 m_t << "\n\\end{DoxyVersion}\n";
978 break;
980 m_t << "\n\\end{DoxySince}\n";
981 break;
983 m_t << "\n\\end{DoxyDate}\n";
984 break;
986 m_t << "\n\\end{DoxyNote}\n";
987 break;
989 m_t << "\n\\end{DoxyWarning}\n";
990 break;
992 m_t << "\n\\end{DoxyPrecond}\n";
993 break;
995 m_t << "\n\\end{DoxyPostcond}\n";
996 break;
998 m_t << "\n\\end{DoxyCopyright}\n";
999 break;
1001 m_t << "\n\\end{DoxyInvariant}\n";
1002 break;
1004 m_t << "\n\\end{DoxyRemark}\n";
1005 break;
1007 m_t << "\n\\end{DoxyAttention}\n";
1008 break;
1010 m_t << "\n\\end{DoxyImportant}\n";
1011 break;
1013 m_t << "\n\\end{DoxyParagraph}\n";
1014 break;
1015 case DocSimpleSect::Rcs:
1016 m_t << "\n\\end{DoxyParagraph}\n";
1017 break;
1018 default:
1019 break;
1020 }
1022}
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 736 of file latexdocvisitor.cpp.

737{
738}

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

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

References m_hide, and visitChildren().

◆ operator()() [52/58]

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

Definition at line 1024 of file latexdocvisitor.cpp.

1025{
1026 if (m_hide) return;
1027 visitChildren(t);
1028}

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 m_t << "\\begin{DoxyVerb}";
480 m_t << s.text();
481 m_t << "\\end{DoxyVerb}\n";
482 break;
488 /* nothing */
489 break;
491 m_t << s.text();
492 break;
493 case DocVerbatim::Dot:
494 {
495 static int dotindex = 1;
496 QCString fileName(4096, QCString::ExplicitSize);
497
498 fileName.sprintf("%s%d%s",
499 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_"),
500 dotindex++,
501 ".dot"
502 );
503 std::ofstream file = Portable::openOutputStream(fileName);
504 if (!file.is_open())
505 {
506 err("Could not open file {} for writing\n",fileName);
507 }
508 else
509 {
510 file.write( s.text().data(), s.text().length() );
511 file.close();
512
513 startDotFile(fileName,s.width(),s.height(),s.hasCaption(),s.srcFile(),s.srcLine());
514 visitChildren(s);
516
517 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
518 }
519 }
520 break;
521 case DocVerbatim::Msc:
522 {
523 static int mscindex = 1;
524 QCString baseName(4096, QCString::ExplicitSize);
525
526 baseName.sprintf("%s%d",
527 qPrint(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_"),
528 mscindex++
529 );
530 QCString fileName = baseName+".msc";
531 std::ofstream file = Portable::openOutputStream(fileName);
532 if (!file.is_open())
533 {
534 err("Could not open file {} for writing\n",fileName);
535 }
536 else
537 {
538 QCString text = "msc {";
539 text+=s.text();
540 text+="}";
541 file.write( text.data(), text.length() );
542 file.close();
543
544 writeMscFile(baseName, s);
545
546 if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
547 }
548 }
549 break;
551 {
552 QCString latexOutput = Config_getString(LATEX_OUTPUT);
553 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
554 latexOutput,s.exampleFile(),s.text(),
556 s.engine(),s.srcFile(),s.srcLine(),true);
557
558 for (const auto &baseName: baseNameVector)
559 {
560 writePlantUMLFile(QCString(baseName), s);
561 }
562 }
563 break;
564 }
565}
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:133
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
const char * qPrint(const char *s)
Definition qcstring.h:672
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(), 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(), 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 1861 of file latexdocvisitor.cpp.

1862{
1863}

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

1805{
1806 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1807 if (m_hide) return;
1808 if (x.title().isEmpty()) return;
1810 m_t << "\\begin{DoxyRefDesc}{";
1811 filter(x.title());
1812 m_t << "}\n";
1813 bool anonymousEnum = x.file()=="@";
1814 m_t << "\\item[";
1815 if (pdfHyperlinks && !anonymousEnum)
1816 {
1817 m_t << "\\mbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
1818 }
1819 else
1820 {
1821 m_t << "\\textbf{ ";
1822 }
1824 filter(x.title());
1826 if (pdfHyperlinks && !anonymousEnum)
1827 {
1828 m_t << "}";
1829 }
1830 m_t << "}]";
1831 visitChildren(x);
1832 if (x.title().isEmpty()) return;
1834 m_t << "\\end{DoxyRefDesc}\n";
1835}
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 210 of file latexdocvisitor.h.

211 {
212 m_tableStateStack.pop();
213 }

References m_tableStateStack.

Referenced by operator()().

◆ pushTableState()

void LatexDocVisitor::pushTableState ( )
inlineprivate

Definition at line 206 of file latexdocvisitor.h.

207 {
208 m_tableStateStack.emplace();
209 }

References m_tableStateStack.

Referenced by operator()().

◆ rowSpans()

RowSpanList & LatexDocVisitor::rowSpans ( )
inlineprivate

Definition at line 238 of file latexdocvisitor.h.

239 {
240 return !m_tableStateStack.empty() ? m_tableStateStack.top().rowSpans : m_emptyRowSpanList;
241 }
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 218 of file latexdocvisitor.h.

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

References m_tableStateStack.

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

◆ setFirstRow()

void LatexDocVisitor::setFirstRow ( bool b)
inlineprivate

Definition at line 234 of file latexdocvisitor.h.

235 {
236 if (!m_tableStateStack.empty()) m_tableStateStack.top().firstRow = b;
237 }

References m_tableStateStack.

◆ setNumCols()

void LatexDocVisitor::setNumCols ( size_t num)
inlineprivate

Definition at line 226 of file latexdocvisitor.h.

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

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

2019{
2020 QCString baseName=makeBaseName(fileName);
2021 baseName.prepend("dia_");
2022
2023 QCString outDir = Config_getString(LATEX_OUTPUT);
2024 writeDiaGraphFromFile(fileName,outDir,baseName,DiaOutputFormat::EPS,srcFile,srcLine);
2025 visitPreStart(m_t,hasCaption, baseName, width, height);
2026}
QCString & prepend(const char *s)
Definition qcstring.h:407
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 1956 of file latexdocvisitor.cpp.

1963{
1964 QCString baseName=makeBaseName(fileName);
1965 baseName.prepend("dot_");
1966 QCString outDir = Config_getString(LATEX_OUTPUT);
1967 QCString name = fileName;
1968 writeDotGraphFromFile(name,outDir,baseName,GraphOutputFormat::EPS,srcFile,srcLine);
1969 visitPreStart(m_t,hasCaption, baseName, width, height);
1970}
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 1884 of file latexdocvisitor.cpp.

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

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

1985{
1986 QCString baseName=makeBaseName(fileName);
1987 baseName.prepend("msc_");
1988
1989 QCString outDir = Config_getString(LATEX_OUTPUT);
1990 writeMscGraphFromFile(fileName,outDir,baseName,MscOutputFormat::EPS,srcFile,srcLine);
1991 visitPreStart(m_t,hasCaption, baseName, width, height);
1992}
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 2060 of file latexdocvisitor.cpp.

2067{
2068 QCString outDir = Config_getString(LATEX_OUTPUT);
2069 std::string inBuf;
2070 readInputFile(fileName,inBuf);
2071
2072 bool useBitmap = inBuf.find("@startditaa") != std::string::npos;
2073 auto baseNameVector = PlantumlManager::instance().writePlantUMLSource(
2074 outDir,QCString(),inBuf.c_str(),
2076 QCString(),srcFile,srcLine,false);
2077 bool first = true;
2078 for (const auto &bName: baseNameVector)
2079 {
2080 QCString baseName = makeBaseName(QCString(bName));
2081 QCString shortName = makeShortName(baseName);
2082 if (useBitmap)
2083 {
2084 if (shortName.find('.')==-1) shortName += ".png";
2085 }
2088 if (!first) endPlantUmlFile(hasCaption);
2089 first = false;
2090 visitPreStart(m_t,hasCaption, shortName, width, height);
2091 }
2092}
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 2035 of file latexdocvisitor.cpp.

2036{
2037 QCString shortName = makeShortName(baseName);
2038 QCString outDir = Config_getString(LATEX_OUTPUT);
2039 writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DiaOutputFormat::EPS,s.srcFile(),s.srcLine());
2040 visitPreStart(m_t, s.hasCaption(), shortName, s.width(), s.height());
2043}
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 1268 of file latexdocvisitor.cpp.

1269{
1270 if (isTableNested(n))
1271 {
1272 m_t << "\\end{DoxyTableNested}\n";
1273 }
1274 else
1275 {
1276 m_t << "\\end{DoxyTable}\n";
1277 }
1278 //return isNested ? "TabularNC" : "TabularC";
1279}

References isTableNested(), and m_t.

Referenced by operator()().

◆ writeMscFile()

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

Definition at line 2001 of file latexdocvisitor.cpp.

2002{
2003 QCString shortName = makeShortName(baseName);
2004 QCString outDir = Config_getString(LATEX_OUTPUT);
2005 writeMscGraphFromFile(baseName+".msc",outDir,shortName,MscOutputFormat::EPS,s.srcFile(),s.srcLine());
2006 visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
2009}

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

1256{
1257 if (isTableNested(n))
1258 {
1259 m_t << "\n\\begin{DoxyTableNested}{" << cols << "}";
1260 }
1261 else
1262 {
1263 m_t << "\n\\begin{DoxyTable}{" << cols << "}";
1264 }
1265 //return isNested ? "TabularNC" : "TabularC";
1266}

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 194 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 204 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 196 of file latexdocvisitor.h.

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


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