Skip to main content

The docparser_p.h File Reference

Private header shared between docparser.cpp and docnode.cpp. More...

Included Headers

#include <cassert> #include <stack> #include <iterator> #include <vector> #include <deque> #include <cstdint> #include "containers.h" #include "docparser.h" #include "docnode.h" #include "doctokenizer.h" #include "searchindex.h" #include "construct.h" #include "cmdmapper.h"

Classes Index

classIterableStack<T, Container>
structDocParserContext

Parser's context to store all global variables. More...

classDocParser
classAutoNodeStack

Typedefs Index

usingDefinitionStack = std::vector< const Definition * >
usingDocNodeStack = std::stack< DocNodeVariant * >
usingDocStyleChangeStack = IterableStack< const DocNodeVariant * >

Functions Index

boolisPreformatted (const DocNodeVariant *n)
boolinsidePRE (const DocNodeVariant *n)
boolinsideLI (const DocNodeVariant *n)
boolinsideBlockQuote (const DocNodeVariant *n)
boolinsideUL (const DocNodeVariant *n)
boolinsideOL (const DocNodeVariant *n)
boolinsideTable (const DocNodeVariant *n)
boolinsideDetails (const DocNodeVariant *n)
boolinsideDL (const DocNodeVariant *n)

Description

Private header shared between docparser.cpp and docnode.cpp.

Typedefs

DefinitionStack

using DefinitionStack = std::vector<const Definition *>

Definition at line 38 of file docparser_p.h.

38using DefinitionStack = std::vector<const Definition *>;

DocNodeStack

using DocNodeStack = std::stack<DocNodeVariant *>

Definition at line 39 of file docparser_p.h.

39using DocNodeStack = std::stack<DocNodeVariant *>;

DocStyleChangeStack

using DocStyleChangeStack = IterableStack<const DocNodeVariant *>

Functions

insideBlockQuote()

bool insideBlockQuote (const DocNodeVariant * n)
inline

Returns TRUE iff node n is a child of a html list item node

Definition at line 200 of file docparser_p.h.

200inline bool insideBlockQuote(const DocNodeVariant *n)
201{
202 while (n)
203 {
204 if (std::holds_alternative<DocHtmlBlockQuote>(*n)) return TRUE;
205 n=parent(n);
206 }
207 return FALSE;
208}

References FALSE, parent and TRUE.

Referenced by DocPara::handleHtmlEndTag.

insideDetails()

bool insideDetails (const DocNodeVariant * n)
inline

Definition at line 259 of file docparser_p.h.

259inline bool insideDetails(const DocNodeVariant *n)
260{
261 while (n)
262 {
263 if (std::holds_alternative<DocHtmlDetails>(*n)) return TRUE;
264 n=parent(n);
265 }
266 return FALSE;
267}

References FALSE, parent and TRUE.

Referenced by DocPara::handleHtmlEndTag and DocPara::handleHtmlStartTag.

insideDL()

bool insideDL (const DocNodeVariant * n)
inline

Definition at line 271 of file docparser_p.h.

271inline bool insideDL(const DocNodeVariant *n)
272{
273 while (n)
274 {
275 if (std::holds_alternative<DocHtmlDescList>(*n)) return TRUE;
276 n=parent(n);
277 }
278 return FALSE;
279}

References FALSE, parent and TRUE.

Referenced by DocPara::handleHtmlStartTag.

insideLI()

bool insideLI (const DocNodeVariant * n)
inline

Returns TRUE iff node n is a child of a html list item node

Definition at line 189 of file docparser_p.h.

189inline bool insideLI(const DocNodeVariant *n)
190{
191 while (n)
192 {
193 if (std::holds_alternative<DocHtmlListItem>(*n)) return TRUE;
194 n=parent(n);
195 }
196 return FALSE;
197}

References FALSE, parent and TRUE.

Referenced by DocPara::handleHtmlEndTag and DocParser::handleStyleArgument.

insideOL()

bool insideOL (const DocNodeVariant * n)
inline

Returns TRUE iff node n is a child of a ordered html list node

Definition at line 231 of file docparser_p.h.

231inline bool insideOL(const DocNodeVariant *n)
232{
233 while (n)
234 {
235 if (std::holds_alternative<DocHtmlList>(*n) &&
236 std::get<DocHtmlList>(*n).type()==DocHtmlList::Ordered)
237 {
238 return TRUE;
239 }
240 n=parent(n);
241 }
242 return FALSE;
243}

References FALSE, DocHtmlList::Ordered, parent and TRUE.

Referenced by DocPara::handleHtmlEndTag and DocPara::handleHtmlStartTag.

insidePRE()

bool insidePRE (const DocNodeVariant * n)
inline

Returns TRUE iff node n is a child of a preformatted node

Definition at line 178 of file docparser_p.h.

178inline bool insidePRE(const DocNodeVariant *n)
179{
180 while (n)
181 {
182 if (isPreformatted(n)) return TRUE;
183 n=parent(n);
184 }
185 return FALSE;
186}

References FALSE, isPreformatted, parent and TRUE.

Referenced by DocParser::defaultHandleToken and DocPara::parse.

insideTable()

bool insideTable (const DocNodeVariant * n)
inline

Definition at line 247 of file docparser_p.h.

247inline bool insideTable(const DocNodeVariant *n)
248{
249 while (n)
250 {
251 if (std::holds_alternative<DocHtmlTable>(*n)) return TRUE;
252 n=parent(n);
253 }
254 return FALSE;
255}

References FALSE, parent and TRUE.

Referenced by filterLatexString and DocPara::handleHtmlStartTag.

insideUL()

bool insideUL (const DocNodeVariant * n)
inline

Returns TRUE iff node n is a child of a unordered html list node

Definition at line 214 of file docparser_p.h.

214inline bool insideUL(const DocNodeVariant *n)
215{
216 while (n)
217 {
218 if (std::holds_alternative<DocHtmlList>(*n) &&
219 std::get<DocHtmlList>(*n).type()==DocHtmlList::Unordered)
220 {
221 return TRUE;
222 }
223 n=parent(n);
224 }
225 return FALSE;
226}

References FALSE, parent, TRUE and DocHtmlList::Unordered.

Referenced by DocPara::handleHtmlEndTag and DocPara::handleHtmlStartTag.

isPreformatted()

bool isPreformatted (const DocNodeVariant * n)
inline

Definition at line 172 of file docparser_p.h.

172inline bool isPreformatted(const DocNodeVariant *n)
173{
174 return std::visit([](auto &&x)->decltype(auto) { return x.isPreformatted(); }, *n);
175}

Referenced by insidePRE.


Generated via doxygen2docusaurus by Doxygen 1.14.0.