Doxygen
Loading...
Searching...
No Matches
htmldocvisitor.cpp File Reference
#include "htmldocvisitor.h"
#include "codefragment.h"
#include "config.h"
#include "dia.h"
#include "docparser.h"
#include "dot.h"
#include "doxygen.h"
#include "emoji.h"
#include "filedef.h"
#include "fileinfo.h"
#include "formula.h"
#include "htmlentity.h"
#include "indexlist.h"
#include "language.h"
#include "memberdef.h"
#include "mermaid.h"
#include "message.h"
#include "msc.h"
#include "outputlist.h"
#include "parserintf.h"
#include "plantuml.h"
#include "portable.h"
#include "util.h"
#include "vhdldocgen.h"
Include dependency graph for htmldocvisitor.cpp:

Go to the source code of this file.

Enumerations

enum class  contexts_t {
  NONE , STARTLI , STARTDD , ENDLI ,
  ENDDD , STARTTD , ENDTD , INTERLI ,
  INTERDD , INTERTD
}

Functions

static constexpr const char * contexts (contexts_t type)
static DString convertIndexWordToAnchor (const DString &word)
static bool mustBeOutsideParagraph (const DocNodeVariant &n)
static bool isDocVerbatimVisible (const DocVerbatim &s)
static bool isDocIncludeVisible (const DocInclude &s)
static bool isDocIncOperatorVisible (const DocIncOperator &s)
static bool isInvisibleNode (const DocNodeVariant &node)
template<class Node>
static bool holds_value (const Node *val, const DocNodeVariant &v)
template<class T>
bool isFirstChildNode (const T *parent, const DocPara &node)
template<class T>
bool isLastChildNode (const T *parent, const DocPara &node)
bool isSeparatedParagraph (const DocSimpleSect &parent, const DocPara &par)
static contexts_t getParagraphContext (const DocPara &p, bool &isFirst, bool &isLast)
static bool determineIfNeedsTag (const DocPara &p)
static bool insideStyleChangeThatIsOutsideParagraph (const DocPara *para, DocNodeList::const_iterator it)
 Returns true if the child nodes in paragraph para until nodeIndex contain a style change node that is still active and that style change is one that must be located outside of a paragraph, i.e.

Variables

static const int NUM_HTML_LIST_TYPES = 4
static const char g_types [][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"}
static const char * hex ="0123456789ABCDEF"

Enumeration Type Documentation

◆ contexts_t

enum class contexts_t
strong
Enumerator
NONE 
STARTLI 
STARTDD 
ENDLI 
ENDDD 
STARTTD 
ENDTD 
INTERLI 
INTERDD 
INTERTD 

Definition at line 46 of file htmldocvisitor.cpp.

47{
48 NONE, // 0
49 STARTLI, // 1
50 STARTDD, // 2
51 ENDLI, // 3
52 ENDDD, // 4
53 STARTTD, // 5
54 ENDTD, // 6
55 INTERLI, // 7
56 INTERDD, // 8
57 INTERTD // 9
58};

Function Documentation

◆ contexts()

constexpr const char * contexts ( contexts_t type)
staticconstexpr

Definition at line 60 of file htmldocvisitor.cpp.

61{
62 switch (type)
63 {
64 case contexts_t::NONE: return nullptr;
65 case contexts_t::STARTLI: return "startli";
66 case contexts_t::STARTDD: return "startdd";
67 case contexts_t::ENDLI: return "endli";
68 case contexts_t::ENDDD: return "enddd";
69 case contexts_t::STARTTD: return "starttd";
70 case contexts_t::ENDTD: return "endtd";
71 case contexts_t::INTERLI: return "interli";
72 case contexts_t::INTERDD: return "interdd";
73 case contexts_t::INTERTD: return "intertd";
74 default: return nullptr;
75 }
76}

References ENDDD, ENDLI, ENDTD, INTERDD, INTERLI, INTERTD, NONE, STARTDD, STARTLI, and STARTTD.

Referenced by HtmlDocVisitor::operator()().

◆ convertIndexWordToAnchor()

DString convertIndexWordToAnchor ( const DString & word)
static

Definition at line 79 of file htmldocvisitor.cpp.

80{
81 static int cnt = 0;
82 DString result="a";
83 DString cntStr;
84 result += cntStr.setNum(cnt);
85 result += "_";
86 cnt++;
87 const char *str = word.data();
88 unsigned char c = 0;
89 if (str)
90 {
91 while ((c = *str++))
92 {
93 if ((c >= 'a' && c <= 'z') || // ALPHA
94 (c >= 'A' && c <= 'Z') || // ALPHA
95 (c >= '0' && c <= '9') || // DIGIT
96 c == '-' ||
97 c == '.'
98 )
99 {
100 result += c;
101 }
102 else
103 {
104 char enc[4];
105 enc[0] = '_';
106 enc[1] = hex[(c & 0xf0) >> 4];
107 enc[2] = hex[c & 0xf];
108 enc[3] = 0;
109 result += enc;
110 }
111 }
112 }
113 return result;
114}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
DString & setNum(short n)
Definition dstring.h:552
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition dstring.h:157
static constexpr auto hex

References DString::data(), hex, and DString::setNum().

Referenced by HtmlDocVisitor::operator()().

◆ determineIfNeedsTag()

bool determineIfNeedsTag ( const DocPara & p)
static

Definition at line 1228 of file htmldocvisitor.cpp.

1229{
1230 bool needsTag = false;
1231 if (p.parent())
1232 {
1246 >(*p.parent()))
1247 {
1248 needsTag = true;
1249 }
1250 else if (std::get_if<DocRoot>(p.parent()))
1251 {
1252 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1253 }
1254 }
1255 return needsTag;
1256}
Node representing an item of a auto list.
Definition docnode.h:595
Node representing an HTML blockquote.
Definition docnode.h:1296
Node representing a HTML table cell.
Definition docnode.h:1198
Node representing a HTML description data.
Definition docnode.h:1186
Node Html details.
Definition docnode.h:866
Node representing a HTML list item.
Definition docnode.h:1170
Node Html summary.
Definition docnode.h:853
Node representing an internal section of documentation.
Definition docnode.h:978
DocNodeVariant * parent()
Definition docnode.h:89
Node representing an block of paragraphs.
Definition docnode.h:988
Node representing a normal section.
Definition docnode.h:923
Node representing a simple list item.
Definition docnode.h:1158
Node representing a simple section.
Definition docnode.h:1026
Node representing an item of a cross-referenced list.
Definition docnode.h:621
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
Definition docnode.h:1371

References holds_one_of_alternatives(), and DocNode::parent().

Referenced by HtmlDocVisitor::operator()().

◆ getParagraphContext()

contexts_t getParagraphContext ( const DocPara & p,
bool & isFirst,
bool & isLast )
static

Definition at line 1096 of file htmldocvisitor.cpp.

1097{
1099 isFirst=false;
1100 isLast=false;
1101 if (p.parent())
1102 {
1103 const auto &parBlock = std::get_if<DocParBlock>(p.parent());
1104 if (parBlock)
1105 {
1106 // hierarchy: node N -> para -> parblock -> para
1107 // adapt return value to kind of N
1108 const DocNodeVariant *p3 = nullptr;
1109 if (::parent(p.parent()) && ::parent(::parent(p.parent())) )
1110 {
1111 p3 = ::parent(::parent(p.parent()));
1112 }
1113 isFirst=isFirstChildNode(parBlock,p);
1114 isLast =isLastChildNode (parBlock,p);
1115 bool isLI = p3!=nullptr && holds_one_of_alternatives<DocHtmlListItem,DocSecRefItem>(*p3);
1117 bool isTD = p3!=nullptr && holds_one_of_alternatives<DocHtmlCell,DocParamList>(*p3);
1119 if (isFirst)
1120 {
1121 if (isLI) t=contexts_t::STARTLI; else if (isDD) t=contexts_t::STARTDD; else if (isTD) t=contexts_t::STARTTD;
1122 }
1123 if (isLast)
1124 {
1125 if (isLI) t=contexts_t::ENDLI; else if (isDD) t=contexts_t::ENDDD; else if (isTD) t=contexts_t::ENDTD;
1126 }
1127 if (!isFirst && !isLast)
1128 {
1129 if (isLI) t=contexts_t::INTERLI; else if (isDD) t=contexts_t::INTERDD; else if (isTD) t=contexts_t::INTERTD;
1130 }
1131 return t;
1132 }
1133 const auto &docAutoListItem = std::get_if<DocAutoListItem>(p.parent());
1134 if (docAutoListItem)
1135 {
1136 isFirst=isFirstChildNode(docAutoListItem,p);
1137 isLast =isLastChildNode (docAutoListItem,p);
1138 t=contexts_t::STARTLI; // not used
1139 return t;
1140 }
1141 const auto &docSimpleListItem = std::get_if<DocSimpleListItem>(p.parent());
1142 if (docSimpleListItem)
1143 {
1144 isFirst=true;
1145 isLast =true;
1146 t=contexts_t::STARTLI; // not used
1147 return t;
1148 }
1149 const auto &docParamList = std::get_if<DocParamList>(p.parent());
1150 if (docParamList)
1151 {
1152 isFirst=true;
1153 isLast =true;
1154 t=contexts_t::STARTLI; // not used
1155 return t;
1156 }
1157 const auto &docHtmlListItem = std::get_if<DocHtmlListItem>(p.parent());
1158 if (docHtmlListItem)
1159 {
1160 isFirst=isFirstChildNode(docHtmlListItem,p);
1161 isLast =isLastChildNode (docHtmlListItem,p);
1162 if (isFirst) t=contexts_t::STARTLI;
1163 if (isLast) t=contexts_t::ENDLI;
1164 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1165 return t;
1166 }
1167 const auto &docSecRefItem = std::get_if<DocSecRefItem>(p.parent());
1168 if (docSecRefItem)
1169 {
1170 isFirst=isFirstChildNode(docSecRefItem,p);
1171 isLast =isLastChildNode (docSecRefItem,p);
1172 if (isFirst) t=contexts_t::STARTLI;
1173 if (isLast) t=contexts_t::ENDLI;
1174 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1175 return t;
1176 }
1177 const auto &docHtmlDescData = std::get_if<DocHtmlDescData>(p.parent());
1178 if (docHtmlDescData)
1179 {
1180 isFirst=isFirstChildNode(docHtmlDescData,p);
1181 isLast =isLastChildNode (docHtmlDescData,p);
1182 if (isFirst) t=contexts_t::STARTDD;
1183 if (isLast) t=contexts_t::ENDDD;
1184 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1185 return t;
1186 }
1187 const auto &docXRefItem = std::get_if<DocXRefItem>(p.parent());
1188 if (docXRefItem)
1189 {
1190 isFirst=isFirstChildNode(docXRefItem,p);
1191 isLast =isLastChildNode (docXRefItem,p);
1192 if (isFirst) t=contexts_t::STARTDD;
1193 if (isLast) t=contexts_t::ENDDD;
1194 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1195 return t;
1196 }
1197 const auto &docSimpleSect = std::get_if<DocSimpleSect>(p.parent());
1198 if (docSimpleSect)
1199 {
1200 isFirst=isFirstChildNode(docSimpleSect,p);
1201 isLast =isLastChildNode (docSimpleSect,p);
1202 if (isFirst) t=contexts_t::STARTDD;
1203 if (isLast) t=contexts_t::ENDDD;
1204 if (isSeparatedParagraph(*docSimpleSect,p))
1205 // if the paragraph is enclosed with separators it will
1206 // be included in <dd>..</dd> so avoid addition paragraph
1207 // markers
1208 {
1209 isFirst=isLast=true;
1210 }
1211 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1212 return t;
1213 }
1214 const auto &docHtmlCell = std::get_if<DocHtmlCell>(p.parent());
1215 if (docHtmlCell)
1216 {
1217 isFirst=isFirstChildNode(docHtmlCell,p);
1218 isLast =isLastChildNode (docHtmlCell,p);
1219 if (isFirst) t=contexts_t::STARTTD;
1220 if (isLast) t=contexts_t::ENDTD;
1221 if (!isFirst && !isLast) t = contexts_t::INTERTD;
1222 return t;
1223 }
1224 }
1225 return t;
1226}
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary, DocPlantUmlFile, DocMermaidFile > DocNodeVariant
Definition docnode.h:66
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:1335
contexts_t
bool isFirstChildNode(const T *parent, const DocPara &node)
bool isSeparatedParagraph(const DocSimpleSect &parent, const DocPara &par)
bool isLastChildNode(const T *parent, const DocPara &node)

References ENDDD, ENDLI, ENDTD, holds_one_of_alternatives(), INTERDD, INTERLI, INTERTD, isFirstChildNode(), isLastChildNode(), isSeparatedParagraph(), NONE, DocNode::parent(), parent(), STARTDD, STARTLI, and STARTTD.

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), and HtmlDocVisitor::operator()().

◆ holds_value()

template<class Node>
bool holds_value ( const Node * val,
const DocNodeVariant & v )
static

Definition at line 1052 of file htmldocvisitor.cpp.

1053{
1054 bool b = std::visit([&](auto &&x) {
1055 //printf("holds_value val=%s (%p) v=%s (%p)\n",
1056 // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
1057 return val==static_cast<const DocNode*>(&x);
1058 }, v);
1059 return b;
1060}
Abstract node interface with type information.
Definition docnode.h:81

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), isFirstChildNode(), isLastChildNode(), and isSeparatedParagraph().

◆ insideStyleChangeThatIsOutsideParagraph()

bool insideStyleChangeThatIsOutsideParagraph ( const DocPara * para,
DocNodeList::const_iterator it )
static

Returns true if the child nodes in paragraph para until nodeIndex contain a style change node that is still active and that style change is one that must be located outside of a paragraph, i.e.

it is a center, div, or pre tag. See also bug746162.

Definition at line 2356 of file htmldocvisitor.cpp.

2358{
2359 //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2360 int styleMask=0;
2361 bool styleOutsideParagraph=false;
2362 while (!styleOutsideParagraph)
2363 {
2364 const DocNodeVariant *n = &(*it);
2365 const DocStyleChange *sc = std::get_if<DocStyleChange>(n);
2366 if (sc)
2367 {
2368 if (!sc->enable()) // remember styles that has been closed already
2369 {
2370 styleMask|=static_cast<int>(sc->style());
2371 }
2372 bool paraStyle = sc->style()==DocStyleChange::Center ||
2373 sc->style()==DocStyleChange::Div ||
2375 //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2376 if (sc->enable() && (styleMask&static_cast<int>(sc->style()))==0 && // style change that is still active
2377 paraStyle
2378 )
2379 {
2380 styleOutsideParagraph=true;
2381 }
2382 }
2383 if (it!=std::begin(para->children()))
2384 {
2385 --it;
2386 }
2387 else
2388 {
2389 break;
2390 }
2391 }
2392 return styleOutsideParagraph;
2393}
DocNodeList & children()
Definition docnode.h:143
Node representing a style change.
Definition docnode.h:268
Style style() const
Definition docnode.h:307
bool enable() const
Definition docnode.h:309

References DocStyleChange::Center, DocCompoundNode::children(), DocStyleChange::Div, DocStyleChange::enable(), DocStyleChange::Preformatted, and DocStyleChange::style().

Referenced by HtmlDocVisitor::forceEndParagraph(), and HtmlDocVisitor::forceStartParagraph().

◆ isDocIncludeVisible()

bool isDocIncludeVisible ( const DocInclude & s)
static

Definition at line 183 of file htmldocvisitor.cpp.

184{
185 switch (s.type())
186 {
193 return false;
194 default:
195 return true;
196 }
197}
@ LatexInclude
Definition docnode.h:437
@ DontInclude
Definition docnode.h:437
@ DocbookInclude
Definition docnode.h:439
Type type() const
Definition docnode.h:451

References DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::LatexInclude, DocInclude::ManInclude, DocInclude::RtfInclude, DocInclude::type(), and DocInclude::XmlInclude.

Referenced by isInvisibleNode().

◆ isDocIncOperatorVisible()

bool isDocIncOperatorVisible ( const DocIncOperator & s)
static

Definition at line 199 of file htmldocvisitor.cpp.

200{
201 switch (s.type())
202 {
204 return false;
205 default:
206 return true;
207 }
208}
Type type() const
Definition docnode.h:485

References DocIncOperator::Skip, and DocIncOperator::type().

Referenced by isInvisibleNode().

◆ isDocVerbatimVisible()

bool isDocVerbatimVisible ( const DocVerbatim & s)
static

Definition at line 168 of file htmldocvisitor.cpp.

169{
170 switch (s.type())
171 {
177 return false;
178 default:
179 return true;
180 }
181}
Type type() const
Definition docnode.h:382

References DocVerbatim::DocbookOnly, DocVerbatim::LatexOnly, DocVerbatim::ManOnly, DocVerbatim::RtfOnly, DocVerbatim::type(), and DocVerbatim::XmlOnly.

Referenced by isInvisibleNode().

◆ isFirstChildNode()

template<class T>
bool isFirstChildNode ( const T * parent,
const DocPara & node )

Definition at line 1063 of file htmldocvisitor.cpp.

1064{
1065 return !parent->children().empty() && holds_value(&node,parent->children().front());
1066}
static bool holds_value(const Node *val, const DocNodeVariant &v)

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isInvisibleNode()

bool isInvisibleNode ( const DocNodeVariant & node)
static

Definition at line 210 of file htmldocvisitor.cpp.

211{
212 //printf("isInvisibleNode(%s)\n",docNodeName(node));
213 // skip over white space
214 const DocWhiteSpace *ws = std::get_if<DocWhiteSpace>(&node);
215 if (ws) return true;
216 // skip over image nodes that are not for HTML output
217 const DocImage *di = std::get_if<DocImage>(&node);
218 if (di) return di->type()!=DocImage::Html;
219 // skip over verbatim nodes that are not visible in the HTML output
220 const DocVerbatim *dv = std::get_if<DocVerbatim>(&node);
221 if (dv) return !isDocVerbatimVisible(*dv);
222 // skip over include nodes that are not visible in the HTML output
223 const DocInclude *dinc = std::get_if<DocInclude>(&node);
224 if (dinc) return !isDocIncludeVisible(*dinc);
225 const DocIncOperator *dio = std::get_if<DocIncOperator>(&node);
226 // skip over include operator nodes that are not visible in the HTML output
227 if (dio) return !isDocIncOperatorVisible(*dio);
228 return false;
229}
Node representing an image.
Definition docnode.h:642
Type type() const
Definition docnode.h:647
Node representing a include/dontinclude operator block.
Definition docnode.h:477
Node representing an included text block from file.
Definition docnode.h:435
Node representing a verbatim, unparsed text fragment.
Definition docnode.h:376
Node representing some amount of white space.
Definition docnode.h:354
static bool isDocVerbatimVisible(const DocVerbatim &s)
static bool isDocIncOperatorVisible(const DocIncOperator &s)
static bool isDocIncludeVisible(const DocInclude &s)

References DocImage::Html, isDocIncludeVisible(), isDocIncOperatorVisible(), isDocVerbatimVisible(), and DocImage::type().

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), and HtmlDocVisitor::operator()().

◆ isLastChildNode()

template<class T>
bool isLastChildNode ( const T * parent,
const DocPara & node )

Definition at line 1069 of file htmldocvisitor.cpp.

1070{
1071 return !parent->children().empty() && holds_value(&node,parent->children().back());
1072}

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

bool isSeparatedParagraph ( const DocSimpleSect & parent,
const DocPara & par )

Definition at line 1074 of file htmldocvisitor.cpp.

1075{
1076 const DocNodeList &nodes = parent.children();
1077 auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](const auto &n) { return holds_value(&par,n); });
1078 if (it==std::end(nodes)) return false;
1079 size_t count = parent.children().size();
1080 auto isSeparator = [](auto &&it_) { return std::get_if<DocSimpleSectSep>(&(*it_))!=nullptr; };
1081 if (count>1 && it==std::begin(nodes)) // it points to first node
1082 {
1083 return isSeparator(std::next(it));
1084 }
1085 else if (count>1 && it==std::prev(std::end(nodes))) // it points to last node
1086 {
1087 return isSeparator(std::prev(it));
1088 }
1089 else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes))) // it points to intermediate node
1090 {
1091 return isSeparator(std::prev(it)) && isSeparator(std::next(it));
1092 }
1093 return false;
1094}

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ mustBeOutsideParagraph()

bool mustBeOutsideParagraph ( const DocNodeVariant & n)
static

Definition at line 118 of file htmldocvisitor.cpp.

119{
120 //printf("mustBeOutsideParagraph(%s)=",docNodeName(n));
123 /* <table> */ DocHtmlTable,
124 /* <h?> */ DocSection, DocHtmlHeader,
125 /* \internal */ DocInternal,
126 /* <div> */ DocInclude, DocSecRefList,
127 /* <hr> */ DocHorRuler,
128 /* <blockquote> */ DocHtmlBlockQuote,
129 /* \parblock */ DocParBlock,
130 /* \dotfile */ DocDotFile,
131 /* \mscfile */ DocMscFile,
132 /* \diafile */ DocDiaFile,
133 /* \plantumlfile */ DocPlantUmlFile,
134 /* \mermaidfile */ DocMermaidFile,
135 /* <details> */ DocHtmlDetails,
136 /* <summary> */ DocHtmlSummary,
137 DocIncOperator >(n))
138 {
139 return true;
140 }
141 const DocVerbatim *dv = std::get_if<DocVerbatim>(&n);
142 if (dv)
143 {
144 DocVerbatim::Type t = dv->type();
145 if (t == DocVerbatim::JavaDocCode || t == DocVerbatim::JavaDocLiteral) return false;
146 return t!=DocVerbatim::HtmlOnly || dv->isBlock();
147 }
148 const DocStyleChange *sc = std::get_if<DocStyleChange>(&n);
149 if (sc)
150 {
151 return sc->style()==DocStyleChange::Preformatted ||
152 sc->style()==DocStyleChange::Div ||
154 }
155 const DocFormula *df = std::get_if<DocFormula>(&n);
156 if (df)
157 {
158 return !df->isInline();
159 }
160 const DocImage *di = std::get_if<DocImage>(&n);
161 if (di)
162 {
163 return !di->isInlineImage();
164 }
165 return false;
166}
Node representing an auto List.
Definition docnode.h:571
Node representing a dia file.
Definition docnode.h:731
Node representing a dot file.
Definition docnode.h:713
Node representing an item of a cross-referenced list.
Definition docnode.h:529
bool isInline() const
Definition docnode.h:536
Node representing a horizontal ruler.
Definition docnode.h:216
Node representing a Html description list.
Definition docnode.h:910
Node Html heading.
Definition docnode.h:882
Node representing a Html list.
Definition docnode.h:1009
Node representing a HTML table.
Definition docnode.h:1274
bool isInlineImage() const
Definition docnode.h:654
Node representing a mermaid file.
Definition docnode.h:749
Node representing a msc file.
Definition docnode.h:722
Node representing a parameter section.
Definition docnode.h:1062
Node representing a uml file.
Definition docnode.h:740
Node representing a list of section references.
Definition docnode.h:968
Node representing a simple list.
Definition docnode.h:999
bool isBlock() const
Definition docnode.h:389
@ JavaDocLiteral
Definition docnode.h:378

References DocStyleChange::Center, DocStyleChange::Div, holds_one_of_alternatives(), DocVerbatim::HtmlOnly, DocVerbatim::isBlock(), DocFormula::isInline(), DocImage::isInlineImage(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocStyleChange::Preformatted, DocStyleChange::style(), and DocVerbatim::type().

Referenced by HtmlDocVisitor::forceEndParagraph(), HtmlDocVisitor::forceStartParagraph(), and HtmlDocVisitor::operator()().

Variable Documentation

◆ g_types

const char g_types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"}
static

Definition at line 45 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().

◆ hex

const char* hex ="0123456789ABCDEF"
static

◆ NUM_HTML_LIST_TYPES

const int NUM_HTML_LIST_TYPES = 4
static

Definition at line 44 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().