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

1249{
1250 bool needsTag = FALSE;
1251 if (p.parent())
1252 {
1266 >(*p.parent()))
1267 {
1268 needsTag = TRUE;
1269 }
1270 else if (std::get_if<DocRoot>(p.parent()))
1271 {
1272 needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
1273 }
1274 }
1275 return needsTag;
1276}
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 1116 of file htmldocvisitor.cpp.

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

1073{
1074 bool b = std::visit([&](auto &&x) {
1075 //printf("holds_value val=%s (%p) v=%s (%p)\n",
1076 // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
1077 return val==static_cast<const DocNode*>(&x);
1078 }, v);
1079 return b;
1080}
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 2266 of file htmldocvisitor.cpp.

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

1084{
1085 return !parent->children().empty() && holds_value(&node,parent->children().front());
1086}
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 1089 of file htmldocvisitor.cpp.

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

References holds_value(), and parent().

Referenced by getParagraphContext().

◆ isSeparatedParagraph()

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

Definition at line 1094 of file htmldocvisitor.cpp.

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

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

◆ 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()().

◆ types

const char 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()(), and removeIdsAndMarkers().