44 static char hex[] =
"0123456789abcdef";
52 if ((c >=
'a' && c <=
'z') ||
53 (c >=
'A' && c <=
'A') ||
54 (c >=
'0' && c <=
'9') ||
66 enc[1] = hex[(c & 0xf0) >> 4];
67 enc[2] = hex[c & 0xf];
152 m_hide(
FALSE), m_ctx(ctx)
206 m_t <<
"<a href=\"#\" onclick=\"location.href='mai'+'lto:'";
211 m_t <<
"+'" << url.
mid(i,size) <<
"'";
213 if (size==3) size=2;
else size=3;
215 m_t <<
"; return false;\">";
229 if (i<url.
length()-
size)
m_t <<
"<span style=\"display: none;\">.nosp@m.</span>";
231 if (size==5) size=4;
else size=5;
331 t <<
"<div class=\"caption\">" <<
endl;
340 t <<
"</div>" <<
endl;
387 m_t <<
"<pre class=\"fragment\">";
407 static int dotindex = 1;
419 err(
"Could not open file %s for writing\n",fileName.
data());
426 m_t <<
"<div align=\"center\">" <<
endl;
431 m_t <<
"</div>" <<
endl;
442 static int mscindex = 1;
452 err(
"Could not open file %s.msc for writing\n",baseName.
data());
463 m_t <<
"<div align=\"center\">" <<
endl;
468 m_t <<
"</div>" <<
endl;
481 m_t <<
"<div align=\"center\">" <<
endl;
486 m_t <<
"</div>" <<
endl;
496 m_t <<
"<a class=\"anchor\" id=\"" << anc->
anchor() <<
"\"></a>";
531 FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
560 m_t <<
"<pre class=\"fragment\">";
645 m_t <<
"<p class=\"formulaDsp\">" <<
endl;
651 bool closeInline =
FALSE;
652 if (!bDisplay && !text.
isEmpty() && text.
at(0)==
'$' &&
667 m_t <<
"<img class=\"formula" 668 << (bDisplay ?
"Dsp" :
"Inl");
674 m_t <<
" src=\"" << f->
relPath() << f->
name() <<
".png\"/>";
691 m_t <<
"<a name=\"" << anchor <<
"\"></a>";
790 return parent->children().getFirst()==node;
796 return parent->children().getLast()==node;
803 if (i==-1)
return FALSE;
812 else if (count>1 && i==count-1)
819 else if (count>2 && i>0 && i<count-1)
964 bool needsTag =
FALSE;
995 if (p && nodeIndex<p->children().count())
997 while (nodeIndex<p->children().count() &&
1002 if (nodeIndex<p->children().count())
1016 static const char *contexts[7] =
1018 " class=\"startli\"",
1019 " class=\"startdd\"",
1022 " class=\"starttd\"",
1029 if (isFirst && isLast) needsTag=
FALSE;
1033 if (needsTag)
m_t <<
"<p" << contexts[
t] <<
">";
1038 bool needsTag =
FALSE;
1089 if (isFirst && isLast) needsTag=
FALSE;
1093 if (needsTag)
m_t <<
"</p>\n";
1109 m_t <<
"<dl class=\"section " << s->
typeString() <<
"\"><dt>";
1157 m_t <<
"</dd></dl>\n";
1206 m_t <<
"<a class=\"anchor\" id=\"" << s->
anchor();
1209 m_t <<
"</h" << s->
level() <<
">\n";
1305 m_t <<
"<a class=\"anchor\" id=\"" << t->
caption()->
anchor() <<
"\"></a>\n";
1311 m_t <<
"<table class=\"doxtable\">\n";
1322 m_t <<
"</table>\n";
1360 bool hasAlign =
FALSE;
1370 m_t <<
"</caption>\n";
1389 if (href->
url().
left(7)==
"mailto:")
1418 m_t <<
"</h" << header->
level() <<
">\n";
1430 if ((i=baseName.
findRev(
'/'))!=-1 || (i=baseName.
findRev(
'\\'))!=-1)
1434 m_t <<
"<div class=\"image\">" <<
endl;
1438 m_t <<
"<img src=\"" << img->
relPath() << img->
name() <<
"\" alt=\"" 1450 m_t <<
"<div class=\"caption\">" <<
endl;
1481 m_t <<
"<div class=\"dotgraph\">" <<
endl;
1485 m_t <<
"<div class=\"caption\">" <<
endl;
1502 m_t <<
"<div class=\"mscgraph\">" <<
endl;
1506 m_t <<
"<div class=\"caption\">" <<
endl;
1522 m_t <<
"<div class=\"diagraph\">" <<
endl;
1526 m_t <<
"<div class=\"caption\">" <<
endl;
1579 m_t <<
"<li><a href=\"" << refName <<
"#" << ref->
anchor() <<
"\">";
1586 m_t <<
"</a></li>\n";
1593 m_t <<
"<div class=\"multicol\">" <<
endl;
1642 className=
"exception";
1646 className=
"tparams";
1651 m_t <<
"<dl class=\"" << className <<
"\"><dt>";
1654 m_t <<
" <table class=\"" << className <<
"\">" <<
endl;
1678 m_t <<
"<td class=\"paramdir\">";
1700 m_t <<
"<td class=\"paramtype\">";
1704 for (li.toFirst();(type=li.
current());++li)
1706 if (!first)
m_t <<
" | ";
else first=
FALSE;
1718 m_t <<
"<td class=\"paramname\">";
1724 for (li.toFirst();(param=li.
current());++li)
1726 if (!first)
m_t <<
",";
else first=
FALSE;
1752 bool anonymousEnum = x->
file()==
"@";
1755 m_t <<
"<dl class=\"" << x->
key() <<
"\"><dt><b><a class=\"el\" href=\"" 1757 <<
"#" << x->
anchor() <<
"\">";
1761 m_t <<
"<dl class=\"" << x->
key() <<
"\"><dt><b>";
1765 if (!anonymousEnum) m_t <<
"</a>";
1766 m_t <<
"</b></dt><dd>";
1813 m_t <<
"<blockquote class=\"doxtable\">\n";
1824 m_t <<
"</blockquote>" <<
endl;
1836 m_t <<
"flowchart: " ;
1837 m_t <<
"<a href=\"";
1881 case '<':
m_t <<
"<";
break;
1882 case '>':
m_t <<
">";
break;
1883 case '&':
m_t <<
"&";
break;
1901 case '&':
m_t <<
"&";
break;
1902 case '"':
m_t <<
""";
break;
1903 case '<':
m_t <<
"<";
break;
1904 case '>':
m_t <<
">";
break;
1917 m_t <<
"<a class=\"elRef\" ";
1922 m_t <<
"<a class=\"el\" ";
1956 if ((i=baseName.
findRev(
'/'))!=-1)
1960 if ((i=baseName.
find(
'.'))!=-1)
1962 baseName=baseName.
left(i);
1976 if ((i=baseName.
findRev(
'/'))!=-1)
1980 if ((i=baseName.
find(
'.'))!=-1)
1982 baseName=baseName.
left(i);
1988 if (
"svg" == imgExt)
2000 if ((i=baseName.
findRev(
'/'))!=-1)
2004 if ((i=baseName.
find(
'.'))!=-1)
2006 baseName=baseName.
left(i);
2012 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />" <<
endl;
2021 if ((i=baseName.
findRev(
'/'))!=-1)
2025 if ((i=baseName.
findRev(
'.'))!=-1)
2027 baseName=baseName.
left(i);
2037 m_t <<
"<object type=\"image/svg+xml\" data=\"" << relPath << baseName <<
".svg\"></object>" <<
endl;
2042 m_t <<
"<img src=\"" << relPath << baseName <<
".png" <<
"\" />" <<
endl;
2055 bool styleOutsideParagraph=
FALSE;
2056 while (nodeIndex>=0 && !styleOutsideParagraph)
2074 styleOutsideParagraph=
TRUE;
2079 return styleOutsideParagraph;
2094 if (nodeIndex<0)
return;
2095 while (nodeIndex>=0 &&
2113 if (isFirst && isLast)
return;
2114 if (styleOutsideParagraph)
return;
2133 if (styleOutsideParagraph)
return;
2135 if (nodeIndex==numNodes)
return;
2136 while (nodeIndex<numNodes &&
2142 if (nodeIndex<numNodes)
2156 if (isFirst && isLast)
return;
QCString convertToXML(const char *s)
QCString exampleFile() const
virtual QCString trPrecondition()=0
const HtmlAttribList & attribs() const
virtual QCString trSince()=0
ParserInterface * getParser(const char *extension)
void writeMscGraphFromFile(const char *inFile, const char *outDir, const char *outFile, MscOutputFormat format)
void writePlantUMLFile(const QCString &fileName, const QCString &relPath, const QCString &context)
CodeOutputInterface & m_ci
const HtmlAttribList & attribs() const
virtual QCString trAttention()=0
MemberDef * member() const
DocHtmlCaption * caption() const
static TemplateVariant parseCode(MemberDef *md, const QCString &scopeName, const QCString &relPath, const QCString &code, int startLine=-1, int endLine=-1, bool showLineNumbers=FALSE)
QCString convertCharEntitiesToUTF8(const QCString &s)
QCString typeString() const
static QCString htmlFileExtension
virtual QCString trInvariant()=0
void writeDotImageMapFromFile(FTextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, int graphId)
int findRef(const type *d) const
static void visitPreCaption(FTextStream &t, DocVerbatim *s)
static QCString convertNameToFileName()
Concrete visitor implementation for HTML output.
const HtmlAttribList & attribs() const
void startLink(const QCString &ref, const QCString &file, const QCString &relPath, const QCString &anchor, const QCString &tooltip="")
virtual QCString trPostcondition()=0
const HtmlAttribList & attribs() const
static const MemberDef * getFlowMember()
const HtmlAttribList & attribs() const
virtual QCString trWarning()=0
static void visitPostCaption(FTextStream &t, DocVerbatim *s)
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content)
const HtmlAttribList & attribs() const
static QCString className
const HtmlAttribList & attribs() const
QCString left(uint len) const
virtual QCString trCopyright()=0
const QList< DocNode > & paramTypes()
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
const int DocVisitor_Html
static HtmlEntityMapper * instance()
QTextStream & hex(QTextStream &s)
Simplified and optimized version of QTextStream.
int find(char c, int index=0, bool cs=TRUE) const
virtual Kind kind() const =0
void visitPre(DocAutoList *)
QCString correctURL(const QCString &url, const QCString &relPath)
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition * scope() const
virtual QCString trReturns()=0
virtual QCString trDate()=0
QCString getDefFileExtension() const
virtual QCString trNote()=0
static QCString convertIndexWordToAnchor(const QString &word)
QCString exampleFile() const
QCString extractBlock(const QCString text, const QCString marker)
Abstract visitor that participates in the visitor pattern.
virtual QCString trExceptions()=0
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
static ParserManager * parserManager
QCString targetTitle() const
const HtmlAttribList & attribs() const
int writeBlock(const char *data, uint len)
const char * data() const
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor=0, const char *title=0)
const QCString & name() const
virtual QCString trParameters()=0
QCString convertToHtml(const char *s, bool keepEntities)
QCString right(uint len) const
virtual QCString trAuthor(bool first_capital, bool singular)=0
virtual QCString trReturnValues()=0
QCString & prepend(const char *s)
const QList< DocNode > & children() const
void writeDotGraphFromFile(const char *inFile, const char *outDir, const char *outFile, GraphOutputFormat format)
A bunch of utility functions.
const char * data() const
const char * html(DocSymbol::SymType symb, bool useInPrintf=FALSE) const
Access routine to the html code of the HTML entity.
Html attribute list iterator.
const HtmlAttribList & attribs() const
#define Config_getString(val)
virtual QCString trVersion()=0
#define Config_getBool(val)
QCString getDotImageExtension(void)
void generatePlantUMLOutput(const char *baseName, const char *outDir, PlantUMLOutputFormat format)
void writeObfuscatedMailAddress(const QCString &url)
void err(const char *fmt,...)
bool isLastChildNode(T *parent, DocNode *node)
int findRev(QChar c, int index=-1, bool cs=TRUE) const
static QString htmlAttribsToString(const HtmlAttribList &attribs)
static bool mustBeOutsideParagraph(DocNode *n)
QCString language() const
QCString mid(uint index, uint len=0xffffffff) const
The QFile class is an I/O device that operates on files.
QCString & sprintf(const char *format,...)
DocParamSect::Direction direction() const
void filter(const char *str)
void forceEndParagraph(DocNode *n)
bool hasInOutSpecifier() const
const QList< DocNode > & parameters()
static void visitCaption(HtmlDocVisitor *parent, QList< DocNode > children)
void writeDiaGraphFromFile(const char *inFile, const char *outDir, const char *outFile, DiaOutputFormat format)
const HtmlAttribList & attribs() const
bool isSeparatedParagraph(DocSimpleSect *parent, DocPara *par)
SrcLangExt getLanguageFromFileName(const QCString fileName)
static const int NUM_HTML_LIST_TYPES
static const char types[][NUM_HTML_LIST_TYPES]
bool hasTypeSpecifier() const
virtual QCString trTemplateParameters()=0
static int getParagraphContext(DocPara *p, bool &isFirst, bool &isLast)
const HtmlAttribList & attribs() const
Translator * theTranslator
const HtmlAttribList & attribs() const
QCString exampleFile() const
virtual QCString trRemarks()=0
virtual QCString trSeeAlso()=0
QCString extension() const
The QFileInfo class provides system-independent file information.
void writeDotFile(const QCString &fileName, const QCString &relPath, const QCString &context)
void filterQuotedCdataAttr(const char *str)
A list of Html attributes.
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
QCString externalLinkTarget()
bool isPreformatted() const
bool isFirstChildNode(T *parent, DocNode *node)
virtual void accept(DocVisitor *v)=0
const HtmlAttribList & attribs() const
def parent(G, child, parent_type)
union ptb::content::word::word word
static IndexList * indexList
HtmlDocVisitor(FTextStream &t, CodeOutputInterface &ci, Definition *ctx)
QString right(uint len) const
void forceStartParagraph(DocNode *n)
QTextStream & endl(QTextStream &s)
void writeMscFile(const QCString &fileName, const QCString &relPath, const QCString &context)
void visitPost(DocAutoList *)
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
void writeMscImageMapFromFile(FTextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, MscOutputFormat format)
const QList< DocNode > & children() const
void writeDiaFile(const QCString &fileName, const QCString &relPath, const QCString &context)
static bool insideStyleChangeThatIsOutsideParagraph(DocPara *para, int nodeIndex)