Doxygen
Loading...
Searching...
No Matches
htmldocvisitor.cpp File Reference
#include "htmldocvisitor.h"
#include "docparser.h"
#include "language.h"
#include "doxygen.h"
#include "outputgen.h"
#include "outputlist.h"
#include "dot.h"
#include "message.h"
#include "config.h"
#include "htmlgen.h"
#include "parserintf.h"
#include "msc.h"
#include "dia.h"
#include "util.h"
#include "vhdldocgen.h"
#include "filedef.h"
#include "memberdef.h"
#include "htmlentity.h"
#include "emoji.h"
#include "plantuml.h"
#include "formula.h"
#include "fileinfo.h"
#include "indexlist.h"
#include "growbuf.h"
#include "portable.h"
#include "codefragment.h"
#include "cite.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 QCString convertIndexWordToAnchor (const QCString &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)
static QCString makeShortName (const QCString &name)
static QCString makeBaseName (const QCString &name)
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()

QCString convertIndexWordToAnchor ( const QCString & word)
static

Definition at line 79 of file htmldocvisitor.cpp.

80{
81 static int cnt = 0;
82 QCString result="a";
83 QCString 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}
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString & setNum(short n)
Definition qcstring.h:444
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
static constexpr auto hex

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

Referenced by HtmlDocVisitor::operator()().

◆ determineIfNeedsTag()

bool determineIfNeedsTag ( const DocPara & p)
static

Definition at line 1265 of file htmldocvisitor.cpp.

1266{
1267 bool needsTag = FALSE;
1268 if (p.parent())
1269 {
1283 >(*p.parent()))
1284 {
1285 needsTag = TRUE;
1286 }
1287 else if (std::get_if<DocRoot>(p.parent()))
1288 {
1289 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1290 }
1291 }
1292 return needsTag;
1293}
Node representing an item of a auto list.
Definition docnode.h:595
Node representing an HTML blockquote.
Definition docnode.h:1291
Node representing a HTML table cell.
Definition docnode.h:1193
Node representing a HTML description data.
Definition docnode.h:1181
Node Html details.
Definition docnode.h:857
Node representing a HTML list item.
Definition docnode.h:1165
Node Html summary.
Definition docnode.h:844
Node representing an internal section of documentation.
Definition docnode.h:969
DocNodeVariant * parent()
Definition docnode.h:90
Node representing an block of paragraphs.
Definition docnode.h:979
Node representing a normal section.
Definition docnode.h:914
Node representing a simple list item.
Definition docnode.h:1153
Node representing a simple section.
Definition docnode.h:1017
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:1366
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

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

Referenced by HtmlDocVisitor::operator()().

◆ getParagraphContext()

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

Definition at line 1133 of file htmldocvisitor.cpp.

1134{
1136 isFirst=FALSE;
1137 isLast=FALSE;
1138 if (p.parent())
1139 {
1140 const auto parBlock = std::get_if<DocParBlock>(p.parent());
1141 if (parBlock)
1142 {
1143 // hierarchy: node N -> para -> parblock -> para
1144 // adapt return value to kind of N
1145 const DocNodeVariant *p3 = nullptr;
1146 if (::parent(p.parent()) && ::parent(::parent(p.parent())) )
1147 {
1148 p3 = ::parent(::parent(p.parent()));
1149 }
1150 isFirst=isFirstChildNode(parBlock,p);
1151 isLast =isLastChildNode (parBlock,p);
1152 bool isLI = p3!=nullptr && holds_one_of_alternatives<DocHtmlListItem,DocSecRefItem>(*p3);
1154 bool isTD = p3!=nullptr && holds_one_of_alternatives<DocHtmlCell,DocParamList>(*p3);
1156 if (isFirst)
1157 {
1158 if (isLI) t=contexts_t::STARTLI; else if (isDD) t=contexts_t::STARTDD; else if (isTD) t=contexts_t::STARTTD;
1159 }
1160 if (isLast)
1161 {
1162 if (isLI) t=contexts_t::ENDLI; else if (isDD) t=contexts_t::ENDDD; else if (isTD) t=contexts_t::ENDTD;
1163 }
1164 if (!isFirst && !isLast)
1165 {
1166 if (isLI) t=contexts_t::INTERLI; else if (isDD) t=contexts_t::INTERDD; else if (isTD) t=contexts_t::INTERTD;
1167 }
1168 return t;
1169 }
1170 const auto docAutoListItem = std::get_if<DocAutoListItem>(p.parent());
1171 if (docAutoListItem)
1172 {
1173 isFirst=isFirstChildNode(docAutoListItem,p);
1174 isLast =isLastChildNode (docAutoListItem,p);
1175 t=contexts_t::STARTLI; // not used
1176 return t;
1177 }
1178 const auto docSimpleListItem = std::get_if<DocSimpleListItem>(p.parent());
1179 if (docSimpleListItem)
1180 {
1181 isFirst=TRUE;
1182 isLast =TRUE;
1183 t=contexts_t::STARTLI; // not used
1184 return t;
1185 }
1186 const auto docParamList = std::get_if<DocParamList>(p.parent());
1187 if (docParamList)
1188 {
1189 isFirst=TRUE;
1190 isLast =TRUE;
1191 t=contexts_t::STARTLI; // not used
1192 return t;
1193 }
1194 const auto docHtmlListItem = std::get_if<DocHtmlListItem>(p.parent());
1195 if (docHtmlListItem)
1196 {
1197 isFirst=isFirstChildNode(docHtmlListItem,p);
1198 isLast =isLastChildNode (docHtmlListItem,p);
1199 if (isFirst) t=contexts_t::STARTLI;
1200 if (isLast) t=contexts_t::ENDLI;
1201 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1202 return t;
1203 }
1204 const auto docSecRefItem = std::get_if<DocSecRefItem>(p.parent());
1205 if (docSecRefItem)
1206 {
1207 isFirst=isFirstChildNode(docSecRefItem,p);
1208 isLast =isLastChildNode (docSecRefItem,p);
1209 if (isFirst) t=contexts_t::STARTLI;
1210 if (isLast) t=contexts_t::ENDLI;
1211 if (!isFirst && !isLast) t = contexts_t::INTERLI;
1212 return t;
1213 }
1214 const auto docHtmlDescData = std::get_if<DocHtmlDescData>(p.parent());
1215 if (docHtmlDescData)
1216 {
1217 isFirst=isFirstChildNode(docHtmlDescData,p);
1218 isLast =isLastChildNode (docHtmlDescData,p);
1219 if (isFirst) t=contexts_t::STARTDD;
1220 if (isLast) t=contexts_t::ENDDD;
1221 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1222 return t;
1223 }
1224 const auto docXRefItem = std::get_if<DocXRefItem>(p.parent());
1225 if (docXRefItem)
1226 {
1227 isFirst=isFirstChildNode(docXRefItem,p);
1228 isLast =isLastChildNode (docXRefItem,p);
1229 if (isFirst) t=contexts_t::STARTDD;
1230 if (isLast) t=contexts_t::ENDDD;
1231 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1232 return t;
1233 }
1234 const auto docSimpleSect = std::get_if<DocSimpleSect>(p.parent());
1235 if (docSimpleSect)
1236 {
1237 isFirst=isFirstChildNode(docSimpleSect,p);
1238 isLast =isLastChildNode (docSimpleSect,p);
1239 if (isFirst) t=contexts_t::STARTDD;
1240 if (isLast) t=contexts_t::ENDDD;
1241 if (isSeparatedParagraph(*docSimpleSect,p))
1242 // if the paragraph is enclosed with separators it will
1243 // be included in <dd>..</dd> so avoid addition paragraph
1244 // markers
1245 {
1246 isFirst=isLast=TRUE;
1247 }
1248 if (!isFirst && !isLast) t = contexts_t::INTERDD;
1249 return t;
1250 }
1251 const auto docHtmlCell = std::get_if<DocHtmlCell>(p.parent());
1252 if (docHtmlCell)
1253 {
1254 isFirst=isFirstChildNode(docHtmlCell,p);
1255 isLast =isLastChildNode (docHtmlCell,p);
1256 if (isFirst) t=contexts_t::STARTTD;
1257 if (isLast) t=contexts_t::ENDTD;
1258 if (!isFirst && !isLast) t = contexts_t::INTERTD;
1259 return t;
1260 }
1261 }
1262 return t;
1263}
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 > DocNodeVariant
Definition docnode.h:67
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
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, FALSE, holds_one_of_alternatives(), INTERDD, INTERLI, INTERTD, isFirstChildNode(), isLastChildNode(), isSeparatedParagraph(), NONE, DocNode::parent(), parent(), STARTDD, STARTLI, STARTTD, and TRUE.

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 1089 of file htmldocvisitor.cpp.

1090{
1091 bool b = std::visit([&](auto &&x) {
1092 //printf("holds_value val=%s (%p) v=%s (%p)\n",
1093 // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
1094 return val==static_cast<const DocNode*>(&x);
1095 }, v);
1096 return b;
1097}
Abstract node interface with type information.
Definition docnode.h:82

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 2285 of file htmldocvisitor.cpp.

2287{
2288 //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2289 int styleMask=0;
2290 bool styleOutsideParagraph=FALSE;
2291 while (!styleOutsideParagraph)
2292 {
2293 const DocNodeVariant *n = &(*it);
2294 const DocStyleChange *sc = std::get_if<DocStyleChange>(n);
2295 if (sc)
2296 {
2297 if (!sc->enable()) // remember styles that has been closed already
2298 {
2299 styleMask|=static_cast<int>(sc->style());
2300 }
2301 bool paraStyle = sc->style()==DocStyleChange::Center ||
2302 sc->style()==DocStyleChange::Div ||
2304 //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2305 if (sc->enable() && (styleMask&static_cast<int>(sc->style()))==0 && // style change that is still active
2306 paraStyle
2307 )
2308 {
2309 styleOutsideParagraph=TRUE;
2310 }
2311 }
2312 if (it!=std::begin(para->children()))
2313 {
2314 --it;
2315 }
2316 else
2317 {
2318 break;
2319 }
2320 }
2321 return styleOutsideParagraph;
2322}
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(), FALSE, DocStyleChange::Preformatted, DocStyleChange::style(), and TRUE.

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

◆ isDocIncludeVisible()

bool isDocIncludeVisible ( const DocInclude & s)
static

Definition at line 182 of file htmldocvisitor.cpp.

183{
184 switch (s.type())
185 {
192 return FALSE;
193 default:
194 return TRUE;
195 }
196}
@ 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, FALSE, DocInclude::LatexInclude, DocInclude::ManInclude, DocInclude::RtfInclude, TRUE, DocInclude::type(), and DocInclude::XmlInclude.

Referenced by isInvisibleNode().

◆ isDocIncOperatorVisible()

bool isDocIncOperatorVisible ( const DocIncOperator & s)
static

Definition at line 198 of file htmldocvisitor.cpp.

199{
200 switch (s.type())
201 {
203 return FALSE;
204 default:
205 return TRUE;
206 }
207}
Type type() const
Definition docnode.h:485

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

Referenced by isInvisibleNode().

◆ isDocVerbatimVisible()

bool isDocVerbatimVisible ( const DocVerbatim & s)
static

Definition at line 167 of file htmldocvisitor.cpp.

168{
169 switch (s.type())
170 {
176 return FALSE;
177 default:
178 return TRUE;
179 }
180}
Type type() const
Definition docnode.h:382

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

Referenced by isInvisibleNode().

◆ isFirstChildNode()

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

Definition at line 1100 of file htmldocvisitor.cpp.

1101{
1102 return !parent->children().empty() && holds_value(&node,parent->children().front());
1103}
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 209 of file htmldocvisitor.cpp.

210{
211 //printf("isInvisibleNode(%s)\n",docNodeName(node));
212 // skip over white space
213 const DocWhiteSpace *ws = std::get_if<DocWhiteSpace>(&node);
214 if (ws) return true;
215 // skip over image nodes that are not for HTML output
216 const DocImage *di = std::get_if<DocImage>(&node);
217 if (di) return di->type()!=DocImage::Html;
218 // skip over verbatim nodes that are not visible in the HTML output
219 const DocVerbatim *dv = std::get_if<DocVerbatim>(&node);
220 if (dv) return !isDocVerbatimVisible(*dv);
221 // skip over include nodes that are not visible in the HTML output
222 const DocInclude *dinc = std::get_if<DocInclude>(&node);
223 if (dinc) return !isDocIncludeVisible(*dinc);
224 const DocIncOperator *dio = std::get_if<DocIncOperator>(&node);
225 // skip over include operator nodes that are not visible in the HTML output
226 if (dio) return !isDocIncOperatorVisible(*dio);
227 return false;
228}
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 1106 of file htmldocvisitor.cpp.

1107{
1108 return !parent->children().empty() && holds_value(&node,parent->children().back());
1109}

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

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

Definition at line 1111 of file htmldocvisitor.cpp.

1112{
1113 const DocNodeList &nodes = parent.children();
1114 auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](const auto &n) { return holds_value(&par,n); });
1115 if (it==std::end(nodes)) return FALSE;
1116 size_t count = parent.children().size();
1117 auto isSeparator = [](auto &&it_) { return std::get_if<DocSimpleSectSep>(&(*it_))!=nullptr; };
1118 if (count>1 && it==std::begin(nodes)) // it points to first node
1119 {
1120 return isSeparator(std::next(it));
1121 }
1122 else if (count>1 && it==std::prev(std::end(nodes))) // it points to last node
1123 {
1124 return isSeparator(std::prev(it));
1125 }
1126 else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes))) // it points to intermediate node
1127 {
1128 return isSeparator(std::prev(it)) && isSeparator(std::next(it));
1129 }
1130 return false;
1131}

References FALSE, holds_value(), and parent().

Referenced by getParagraphContext().

◆ makeBaseName()

QCString makeBaseName ( const QCString & name)
static

Definition at line 241 of file htmldocvisitor.cpp.

242{
243 QCString baseName = makeShortName(name);
244 int i=baseName.find('.');
245 if (i!=-1)
246 {
247 baseName=baseName.left(i);
248 }
249 return baseName;
250}
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
QCString left(size_t len) const
Definition qcstring.h:214
static QCString makeShortName(const QCString &name)

References QCString::find(), QCString::left(), and makeShortName().

◆ makeShortName()

QCString makeShortName ( const QCString & name)
static

Definition at line 230 of file htmldocvisitor.cpp.

231{
232 QCString shortName = name;
233 int i = shortName.findRev('/');
234 if (i!=-1)
235 {
236 shortName=shortName.mid(i+1);
237 }
238 return shortName;
239}
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91

References QCString::findRev(), and QCString::mid().

Referenced by makeBaseName().

◆ 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 /* <details> */ DocHtmlDetails,
135 /* <summary> */ DocHtmlSummary,
136 DocIncOperator >(n))
137 {
138 return TRUE;
139 }
140 const DocVerbatim *dv = std::get_if<DocVerbatim>(&n);
141 if (dv)
142 {
143 DocVerbatim::Type t = dv->type();
145 return t!=DocVerbatim::HtmlOnly || dv->isBlock();
146 }
147 const DocStyleChange *sc = std::get_if<DocStyleChange>(&n);
148 if (sc)
149 {
150 return sc->style()==DocStyleChange::Preformatted ||
151 sc->style()==DocStyleChange::Div ||
153 }
154 const DocFormula *df = std::get_if<DocFormula>(&n);
155 if (df)
156 {
157 return !df->isInline();
158 }
159 const DocImage *di = std::get_if<DocImage>(&n);
160 if (di)
161 {
162 return !di->isInlineImage();
163 }
164 return FALSE;
165}
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:901
Node Html heading.
Definition docnode.h:873
Node representing a Html list.
Definition docnode.h:1000
Node representing a HTML table.
Definition docnode.h:1269
bool isInlineImage() const
Definition docnode.h:654
Node representing a msc file.
Definition docnode.h:722
Node representing a parameter section.
Definition docnode.h:1053
Node representing a uml file.
Definition docnode.h:740
Node representing a list of section references.
Definition docnode.h:959
Node representing a simple list.
Definition docnode.h:990
bool isBlock() const
Definition docnode.h:389
@ JavaDocLiteral
Definition docnode.h:378

References DocStyleChange::Center, DocStyleChange::Div, FALSE, holds_one_of_alternatives(), DocVerbatim::HtmlOnly, DocVerbatim::isBlock(), DocFormula::isInline(), DocImage::isInlineImage(), DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocStyleChange::Preformatted, DocStyleChange::style(), TRUE, 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.

45{"1", "a", "i", "A"};

Referenced by HtmlDocVisitor::operator()().

◆ hex

const char* hex ="0123456789ABCDEF"
static

Definition at line 77 of file htmldocvisitor.cpp.

◆ NUM_HTML_LIST_TYPES

const int NUM_HTML_LIST_TYPES = 4
static

Definition at line 44 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().