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

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

Function Documentation

◆ contexts()

static constexpr const char * contexts ( contexts_t type)
staticconstexpr

Definition at line 59 of file htmldocvisitor.cpp.

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

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

Referenced by HtmlDocVisitor::operator()().

◆ convertIndexWordToAnchor()

static QCString convertIndexWordToAnchor ( const QCString & word)
static

Definition at line 78 of file htmldocvisitor.cpp.

79{
80 static int cnt = 0;
81 QCString result="a";
82 QCString cntStr;
83 result += cntStr.setNum(cnt);
84 result += "_";
85 cnt++;
86 const char *str = word.data();
87 unsigned char c = 0;
88 if (str)
89 {
90 while ((c = *str++))
91 {
92 if ((c >= 'a' && c <= 'z') || // ALPHA
93 (c >= 'A' && c <= 'Z') || // ALPHA
94 (c >= '0' && c <= '9') || // DIGIT
95 c == '-' ||
96 c == '.'
97 )
98 {
99 result += c;
100 }
101 else
102 {
103 char enc[4];
104 enc[0] = '_';
105 enc[1] = hex[(c & 0xf0) >> 4];
106 enc[2] = hex[c & 0xf];
107 enc[3] = 0;
108 result += enc;
109 }
110 }
111 }
112 return result;
113}
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString & setNum(short n)
Definition qcstring.h:444
static constexpr auto hex
std::string_view word
Definition util.cpp:980

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

Referenced by HtmlDocVisitor::operator()().

◆ determineIfNeedsTag()

static bool determineIfNeedsTag ( const DocPara & p)
static

Definition at line 1249 of file htmldocvisitor.cpp.

1250{
1251 bool needsTag = FALSE;
1252 if (p.parent())
1253 {
1267 >(*p.parent()))
1268 {
1269 needsTag = TRUE;
1270 }
1271 else if (std::get_if<DocRoot>(p.parent()))
1272 {
1273 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1274 }
1275 }
1276 return needsTag;
1277}
Node representing an item of a auto list.
Definition docnode.h:590
Node representing an HTML blockquote.
Definition docnode.h:1285
Node representing a HTML table cell.
Definition docnode.h:1187
Node representing a HTML description data.
Definition docnode.h:1175
Node Html details.
Definition docnode.h:851
Node representing a HTML list item.
Definition docnode.h:1159
Node Html summary.
Definition docnode.h:838
Node representing an internal section of documentation.
Definition docnode.h:963
DocNodeVariant * parent()
Definition docnode.h:89
Node representing an block of paragraphs.
Definition docnode.h:973
Node representing a normal section.
Definition docnode.h:908
Node representing a simple list item.
Definition docnode.h:1147
Node representing a simple section.
Definition docnode.h:1011
Node representing an item of a cross-referenced list.
Definition docnode.h:615
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
Definition docnode.h:1360
#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()

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

Definition at line 1117 of file htmldocvisitor.cpp.

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

Definition at line 1073 of file htmldocvisitor.cpp.

1074{
1075 bool b = std::visit([&](auto &&x) {
1076 //printf("holds_value val=%s (%p) v=%s (%p)\n",
1077 // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
1078 return val==static_cast<const DocNode*>(&x);
1079 }, v);
1080 return b;
1081}
Abstract node interface with type information.
Definition docnode.h:81

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

◆ insideStyleChangeThatIsOutsideParagraph()

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

2269{
2270 //printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
2271 int styleMask=0;
2272 bool styleOutsideParagraph=FALSE;
2273 while (!styleOutsideParagraph)
2274 {
2275 const DocNodeVariant *n = &(*it);
2276 const DocStyleChange *sc = std::get_if<DocStyleChange>(n);
2277 if (sc)
2278 {
2279 if (!sc->enable()) // remember styles that has been closed already
2280 {
2281 styleMask|=static_cast<int>(sc->style());
2282 }
2283 bool paraStyle = sc->style()==DocStyleChange::Center ||
2284 sc->style()==DocStyleChange::Div ||
2286 //printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
2287 if (sc->enable() && (styleMask&static_cast<int>(sc->style()))==0 && // style change that is still active
2288 paraStyle
2289 )
2290 {
2291 styleOutsideParagraph=TRUE;
2292 }
2293 }
2294 if (it!=std::begin(para->children()))
2295 {
2296 --it;
2297 }
2298 else
2299 {
2300 break;
2301 }
2302 }
2303 return styleOutsideParagraph;
2304}
DocNodeList & children()
Definition docnode.h:142
Node representing a style change.
Definition docnode.h:264
Style style() const
Definition docnode.h:302
bool enable() const
Definition docnode.h:304

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

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

◆ isDocIncludeVisible()

static bool isDocIncludeVisible ( const DocInclude & s)
static

Definition at line 181 of file htmldocvisitor.cpp.

182{
183 switch (s.type())
184 {
191 return FALSE;
192 default:
193 return TRUE;
194 }
195}
@ LatexInclude
Definition docnode.h:432
@ DontInclude
Definition docnode.h:432
@ DocbookInclude
Definition docnode.h:434
Type type() const
Definition docnode.h:446

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

Referenced by isInvisibleNode().

◆ isDocIncOperatorVisible()

static bool isDocIncOperatorVisible ( const DocIncOperator & s)
static

Definition at line 197 of file htmldocvisitor.cpp.

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

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

Referenced by isInvisibleNode().

◆ isDocVerbatimVisible()

static bool isDocVerbatimVisible ( const DocVerbatim & s)
static

Definition at line 166 of file htmldocvisitor.cpp.

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

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

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

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isInvisibleNode()

static bool isInvisibleNode ( const DocNodeVariant & node)
static

Definition at line 208 of file htmldocvisitor.cpp.

209{
210 //printf("isInvisibleNode(%s)\n",docNodeName(node));
211 // skip over white space
212 const DocWhiteSpace *ws = std::get_if<DocWhiteSpace>(&node);
213 if (ws) return true;
214 // skip over image nodes that are not for HTML output
215 const DocImage *di = std::get_if<DocImage>(&node);
216 if (di) return di->type()!=DocImage::Html;
217 // skip over verbatim nodes that are not visible in the HTML output
218 const DocVerbatim *dv = std::get_if<DocVerbatim>(&node);
219 if (dv) return !isDocVerbatimVisible(*dv);
220 // skip over include nodes that are not visible in the HTML output
221 const DocInclude *dinc = std::get_if<DocInclude>(&node);
222 if (dinc) return !isDocIncludeVisible(*dinc);
223 const DocIncOperator *dio = std::get_if<DocIncOperator>(&node);
224 // skip over include operator nodes that are not visible in the HTML output
225 if (dio) return !isDocIncOperatorVisible(*dio);
226 return false;
227}
Node representing an image.
Definition docnode.h:636
Type type() const
Definition docnode.h:641
Node representing a include/dontinclude operator block.
Definition docnode.h:472
Node representing an included text block from file.
Definition docnode.h:430
Node representing a verbatim, unparsed text fragment.
Definition docnode.h:371
Node representing some amount of white space.
Definition docnode.h:349
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 1090 of file htmldocvisitor.cpp.

1091{
1092 return !parent->children().empty() && holds_value(&node,parent->children().back());
1093}

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

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

Definition at line 1095 of file htmldocvisitor.cpp.

1096{
1097 const DocNodeList &nodes = parent.children();
1098 auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](const auto &n) { return holds_value(&par,n); });
1099 if (it==std::end(nodes)) return FALSE;
1100 size_t count = parent.children().size();
1101 auto isSeparator = [](auto &&it_) { return std::get_if<DocSimpleSectSep>(&(*it_))!=nullptr; };
1102 if (count>1 && it==std::begin(nodes)) // it points to first node
1103 {
1104 return isSeparator(std::next(it));
1105 }
1106 else if (count>1 && it==std::prev(std::end(nodes))) // it points to last node
1107 {
1108 return isSeparator(std::prev(it));
1109 }
1110 else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes))) // it points to intermediate node
1111 {
1112 return isSeparator(std::prev(it)) && isSeparator(std::next(it));
1113 }
1114 return false;
1115}

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

Referenced by getParagraphContext().

◆ makeBaseName()

static QCString makeBaseName ( const QCString & name)
static

Definition at line 240 of file htmldocvisitor.cpp.

241{
242 QCString baseName = makeShortName(name);
243 int i=baseName.find('.');
244 if (i!=-1)
245 {
246 baseName=baseName.left(i);
247 }
248 return baseName;
249}
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()

static QCString makeShortName ( const QCString & name)
static

Definition at line 229 of file htmldocvisitor.cpp.

230{
231 QCString shortName = name;
232 int i = shortName.findRev('/');
233 if (i!=-1)
234 {
235 shortName=shortName.mid(i+1);
236 }
237 return shortName;
238}
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()

static bool mustBeOutsideParagraph ( const DocNodeVariant & n)
static

Definition at line 117 of file htmldocvisitor.cpp.

118{
119 //printf("mustBeOutsideParagraph(%s)=",docNodeName(n));
122 /* <table> */ DocHtmlTable,
123 /* <h?> */ DocSection, DocHtmlHeader,
124 /* \internal */ DocInternal,
125 /* <div> */ DocInclude, DocSecRefList,
126 /* <hr> */ DocHorRuler,
127 /* <blockquote> */ DocHtmlBlockQuote,
128 /* \parblock */ DocParBlock,
129 /* \dotfile */ DocDotFile,
130 /* \mscfile */ DocMscFile,
131 /* \diafile */ DocDiaFile,
132 /* \plantumlfile */ DocPlantUmlFile,
133 /* <details> */ DocHtmlDetails,
134 /* <summary> */ DocHtmlSummary,
135 DocIncOperator >(n))
136 {
137 return TRUE;
138 }
139 const DocVerbatim *dv = std::get_if<DocVerbatim>(&n);
140 if (dv)
141 {
142 DocVerbatim::Type t = dv->type();
144 return t!=DocVerbatim::HtmlOnly || dv->isBlock();
145 }
146 const DocStyleChange *sc = std::get_if<DocStyleChange>(&n);
147 if (sc)
148 {
149 return sc->style()==DocStyleChange::Preformatted ||
150 sc->style()==DocStyleChange::Div ||
152 }
153 const DocFormula *df = std::get_if<DocFormula>(&n);
154 if (df)
155 {
156 return !df->isInline();
157 }
158 const DocImage *di = std::get_if<DocImage>(&n);
159 if (di)
160 {
161 return !di->isInlineImage();
162 }
163 return FALSE;
164}
Node representing an auto List.
Definition docnode.h:566
Node representing a dia file.
Definition docnode.h:725
Node representing a dot file.
Definition docnode.h:707
Node representing an item of a cross-referenced list.
Definition docnode.h:524
bool isInline() const
Definition docnode.h:531
Node representing a horizontal ruler.
Definition docnode.h:215
Node representing a Html description list.
Definition docnode.h:895
Node Html heading.
Definition docnode.h:867
Node representing a Html list.
Definition docnode.h:994
Node representing a HTML table.
Definition docnode.h:1263
bool isInlineImage() const
Definition docnode.h:648
Node representing a msc file.
Definition docnode.h:716
Node representing a parameter section.
Definition docnode.h:1047
Node representing a uml file.
Definition docnode.h:734
Node representing a list of section references.
Definition docnode.h:953
Node representing a simple list.
Definition docnode.h:984
bool isBlock() const
Definition docnode.h:384
@ JavaDocLiteral
Definition docnode.h:373

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

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

Referenced by HtmlDocVisitor::operator()().

◆ hex

const char* hex ="0123456789ABCDEF"
static

Definition at line 76 of file htmldocvisitor.cpp.

◆ NUM_HTML_LIST_TYPES

const int NUM_HTML_LIST_TYPES = 4
static

Definition at line 43 of file htmldocvisitor.cpp.

Referenced by HtmlDocVisitor::operator()().