Doxygen
Loading...
Searching...
No Matches
docnode.h File Reference
#include <cstdio>
#include <cstdint>
#include <vector>
#include <memory>
#include <variant>
#include <type_traits>
#include "qcstring.h"
#include "docvisitor.h"
#include "docparser.h"
#include "htmlattrib.h"
#include "htmlentity.h"
#include "growvector.h"
#include "section.h"
#include "construct.h"
#include "doctokenizer.h"
+ Include dependency graph for docnode.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DocNode
 Abstract node interface with type information. More...
 
struct  DocNodeList
 
class  DocCompoundNode
 Base class for nodes with children. More...
 
class  DocWord
 Node representing a word. More...
 
class  DocLinkedWord
 Node representing a word that can be linked to something. More...
 
class  DocURL
 Node representing a URL (or email address) More...
 
class  DocLineBreak
 Node representing a line break. More...
 
class  DocHorRuler
 Node representing a horizontal ruler. More...
 
class  DocAnchor
 Node representing an anchor. More...
 
class  DocCite
 Node representing a citation of some bibliographic reference. More...
 
class  DocStyleChange
 Node representing a style change. More...
 
class  DocSymbol
 Node representing a special symbol. More...
 
class  DocEmoji
 Node representing an emoji. More...
 
class  DocWhiteSpace
 Node representing some amount of white space. More...
 
class  DocSeparator
 Node representing a separator. More...
 
class  DocVerbatim
 Node representing a verbatim, unparsed text fragment. More...
 
struct  DocVerbatim::Private
 
class  DocInclude
 Node representing an included text block from file. More...
 
class  DocIncOperator
 Node representing a include/dontinclude operator block. More...
 
class  DocFormula
 Node representing an item of a cross-referenced list. More...
 
class  DocIndexEntry
 Node representing an entry in the index. More...
 
class  DocAutoList
 Node representing an auto List. More...
 
class  DocAutoListItem
 Node representing an item of a auto list. More...
 
class  DocTitle
 Node representing a simple section title. More...
 
class  DocXRefItem
 Node representing an item of a cross-referenced list. More...
 
class  DocImage
 Node representing an image. More...
 
struct  DocImage::Private
 
class  DocDiagramFileBase
 
struct  DocDiagramFileBase::Private
 
class  DocDotFile
 Node representing a dot file. More...
 
class  DocMscFile
 Node representing a msc file. More...
 
class  DocDiaFile
 Node representing a dia file. More...
 
class  DocPlantUmlFile
 Node representing a uml file. More...
 
class  DocVhdlFlow
 Node representing a VHDL flow chart. More...
 
class  DocLink
 Node representing a link to some item. More...
 
class  DocRef
 Node representing a reference to some item. More...
 
class  DocInternalRef
 Node representing an internal reference to some item. More...
 
class  DocHRef
 Node representing a Hypertext reference. More...
 
class  DocHtmlSummary
 Node Html summary. More...
 
class  DocHtmlDetails
 Node Html details. More...
 
class  DocHtmlHeader
 Node Html heading. More...
 
class  DocHtmlDescTitle
 Node representing a Html description item. More...
 
class  DocHtmlDescList
 Node representing a Html description list. More...
 
class  DocSection
 Node representing a normal section. More...
 
class  DocSecRefItem
 Node representing a reference to a section. More...
 
class  DocSecRefList
 Node representing a list of section references. More...
 
class  DocInternal
 Node representing an internal section of documentation. More...
 
class  DocParBlock
 Node representing an block of paragraphs. More...
 
class  DocSimpleList
 Node representing a simple list. More...
 
class  DocHtmlList
 Node representing a Html list. More...
 
class  DocSimpleSect
 Node representing a simple section. More...
 
class  DocSimpleSectSep
 Node representing a separator between two simple sections of the same type. More...
 
class  DocParamSect
 Node representing a parameter section. More...
 
class  DocPara
 Node representing a paragraph in the documentation tree. More...
 
class  DocParamList
 Node representing a parameter list. More...
 
class  DocSimpleListItem
 Node representing a simple list item. More...
 
class  DocHtmlListItem
 Node representing a HTML list item. More...
 
class  DocHtmlDescData
 Node representing a HTML description data. More...
 
class  DocHtmlCell
 Node representing a HTML table cell. More...
 
class  DocHtmlCaption
 Node representing a HTML table caption. More...
 
class  DocHtmlRow
 Node representing a HTML table row. More...
 
class  DocHtmlTable
 Node representing a HTML table. More...
 
class  DocHtmlBlockQuote
 Node representing an HTML blockquote. More...
 
class  DocText
 Root node of a text fragment. More...
 
class  DocRoot
 Root node of documentation tree. More...
 
struct  details::Impl< T, Ts >
 
struct  details::Impl< T >
 
struct  details::has_method_children< T, typename >
 
struct  details::has_method_children< T, std::void_t< decltype(std::declval< T >().children())> >
 
class  DocNodeAST
 Class representing the abstract syntax tree of a documentation block. More...
 

Namespaces

namespace  details
 

Macros

#define DOC_NODES
 
#define DN(x)
 
#define DN_SEP
 
#define DN(x)
 
#define DN_SEP   ,
 
#define DN(x)
 
#define DN_SEP
 
#define DN(x)
 
#define DN_SEP   ,
 
#define DN(x)
 
#define DN_SEP   ,
 
#define DN(x)
 
#define DN_SEP   ,
 

Typedefs

using DocNodeVariant
 

Functions

constexpr const char * docNodeName (const DocWord &)
 
constexpr const char * docNodeName (const DocLinkedWord &)
 
constexpr const char * docNodeName (const DocURL &)
 
constexpr const char * docNodeName (const DocLineBreak &)
 
constexpr const char * docNodeName (const DocHorRuler &)
 
constexpr const char * docNodeName (const DocAnchor &)
 
constexpr const char * docNodeName (const DocCite &)
 
constexpr const char * docNodeName (const DocStyleChange &)
 
constexpr const char * docNodeName (const DocSymbol &)
 
constexpr const char * docNodeName (const DocEmoji &)
 
constexpr const char * docNodeName (const DocWhiteSpace &)
 
constexpr const char * docNodeName (const DocSeparator &)
 
constexpr const char * docNodeName (const DocVerbatim &)
 
constexpr const char * docNodeName (const DocInclude &)
 
constexpr const char * docNodeName (const DocIncOperator &)
 
constexpr const char * docNodeName (const DocFormula &)
 
constexpr const char * docNodeName (const DocIndexEntry &)
 
constexpr const char * docNodeName (const DocAutoList &)
 
constexpr const char * docNodeName (const DocAutoListItem &)
 
constexpr const char * docNodeName (const DocTitle &)
 
constexpr const char * docNodeName (const DocXRefItem &)
 
constexpr const char * docNodeName (const DocImage &)
 
constexpr const char * docNodeName (const DocDotFile &)
 
constexpr const char * docNodeName (const DocMscFile &)
 
constexpr const char * docNodeName (const DocDiaFile &)
 
constexpr const char * docNodeName (const DocVhdlFlow &)
 
constexpr const char * docNodeName (const DocLink &)
 
constexpr const char * docNodeName (const DocRef &)
 
constexpr const char * docNodeName (const DocInternalRef &)
 
constexpr const char * docNodeName (const DocHRef &)
 
constexpr const char * docNodeName (const DocHtmlHeader &)
 
constexpr const char * docNodeName (const DocHtmlDescTitle &)
 
constexpr const char * docNodeName (const DocHtmlDescList &)
 
constexpr const char * docNodeName (const DocSection &)
 
constexpr const char * docNodeName (const DocSecRefItem &)
 
constexpr const char * docNodeName (const DocSecRefList &)
 
constexpr const char * docNodeName (const DocInternal &)
 
constexpr const char * docNodeName (const DocParBlock &)
 
constexpr const char * docNodeName (const DocSimpleList &)
 
constexpr const char * docNodeName (const DocHtmlList &)
 
constexpr const char * docNodeName (const DocSimpleSect &)
 
constexpr const char * docNodeName (const DocSimpleSectSep &)
 
constexpr const char * docNodeName (const DocParamSect &)
 
constexpr const char * docNodeName (const DocPara &)
 
constexpr const char * docNodeName (const DocParamList &)
 
constexpr const char * docNodeName (const DocSimpleListItem &)
 
constexpr const char * docNodeName (const DocHtmlListItem &)
 
constexpr const char * docNodeName (const DocHtmlDescData &)
 
constexpr const char * docNodeName (const DocHtmlCell &)
 
constexpr const char * docNodeName (const DocHtmlCaption &)
 
constexpr const char * docNodeName (const DocHtmlRow &)
 
constexpr const char * docNodeName (const DocHtmlTable &)
 
constexpr const char * docNodeName (const DocHtmlBlockQuote &)
 
constexpr const char * docNodeName (const DocText &)
 
constexpr const char * docNodeName (const DocRoot &)
 
constexpr const char * docNodeName (const DocHtmlDetails &)
 
constexpr const char * docNodeName (const DocHtmlSummary &)
 
constexpr const char * docNodeName (const DocPlantUmlFile &)
 
constexpr DocNodeVariantparent (DocNodeVariant *n)
 returns the parent node of a given node n or nullptr if the node has no parent.
 
constexpr const DocNodeVariantparent (const DocNodeVariant *n)
 returns the parent node of a given node n or nullptr if the node has no parent.
 
template<class... Ts>
constexpr bool holds_one_of_alternatives (const DocNodeVariant &v)
 returns true iff v holds one of types passed as template parameters
 
DocNodeListcall_method_children (DocNodeVariant *v)
 
const char * docNodeName (const DocNodeVariant &v)
 
void dumpDocNodeSizes ()
 
void dumpDocNodeList (const DocNodeList &children)
 
template<class T , class... Args>
std::unique_ptr< DocNodeVariantcreateDocNode (Args &&...args)
 

Macro Definition Documentation

◆ DN [1/6]

#define DN ( x)
Value:
class x;

Definition at line 57 of file docnode.h.

◆ DN [2/6]

#define DN ( x)
Value:
x

Definition at line 57 of file docnode.h.

◆ DN [3/6]

#define DN ( x)
Value:
constexpr const char *docNodeName(const x &/* n */) { return #x; }
constexpr const char * docNodeName(const DocWord &)
Definition docnode.h:75

Definition at line 57 of file docnode.h.

◆ DN [4/6]

#define DN ( x)
Value:
#x

Definition at line 57 of file docnode.h.

◆ DN [5/6]

#define DN ( x)
Value:
#x

Definition at line 57 of file docnode.h.

◆ DN [6/6]

#define DN ( x)
Value:
sizeof(x)

Definition at line 57 of file docnode.h.

◆ DN_SEP [1/6]

#define DN_SEP

Definition at line 58 of file docnode.h.

◆ DN_SEP [2/6]

#define DN_SEP   ,

Definition at line 58 of file docnode.h.

◆ DN_SEP [3/6]

#define DN_SEP

Definition at line 58 of file docnode.h.

◆ DN_SEP [4/6]

#define DN_SEP   ,

Definition at line 58 of file docnode.h.

◆ DN_SEP [5/6]

#define DN_SEP   ,

Definition at line 58 of file docnode.h.

◆ DN_SEP [6/6]

#define DN_SEP   ,

Definition at line 58 of file docnode.h.

◆ DOC_NODES

#define DOC_NODES
Value:
/* 0 */ DN(DocWord) DN_SEP DN(DocLinkedWord) DN_SEP DN(DocURL) DN_SEP DN(DocLineBreak) DN_SEP DN(DocHorRuler) DN_SEP \
/* 5 */ DN(DocAnchor) DN_SEP DN(DocCite) DN_SEP DN(DocStyleChange) DN_SEP DN(DocSymbol) DN_SEP DN(DocEmoji) DN_SEP \
/* 10 */ DN(DocWhiteSpace) DN_SEP DN(DocSeparator) DN_SEP DN(DocVerbatim) DN_SEP DN(DocInclude) DN_SEP DN(DocIncOperator) DN_SEP \
/* 15 */ DN(DocFormula) DN_SEP DN(DocIndexEntry) DN_SEP DN(DocAutoList) DN_SEP DN(DocAutoListItem) DN_SEP DN(DocTitle) DN_SEP \
/* 20 */ DN(DocXRefItem) DN_SEP DN(DocImage) DN_SEP DN(DocDotFile) DN_SEP DN(DocMscFile) DN_SEP DN(DocDiaFile) DN_SEP \
/* 25 */ DN(DocVhdlFlow) DN_SEP DN(DocLink) DN_SEP DN(DocRef) DN_SEP DN(DocInternalRef) DN_SEP DN(DocHRef) DN_SEP \
/* 30 */ DN(DocHtmlHeader) DN_SEP DN(DocHtmlDescTitle) DN_SEP DN(DocHtmlDescList) DN_SEP DN(DocSection) DN_SEP DN(DocSecRefItem) DN_SEP \
/* 35 */ DN(DocSecRefList) DN_SEP DN(DocInternal) DN_SEP DN(DocParBlock) DN_SEP DN(DocSimpleList) DN_SEP DN(DocHtmlList) DN_SEP \
/* 40 */ DN(DocSimpleSect) DN_SEP DN(DocSimpleSectSep) DN_SEP DN(DocParamSect) DN_SEP DN(DocPara) DN_SEP DN(DocParamList) DN_SEP \
/* 45 */ DN(DocSimpleListItem) DN_SEP DN(DocHtmlListItem) DN_SEP DN(DocHtmlDescData) DN_SEP DN(DocHtmlCell) DN_SEP DN(DocHtmlCaption) DN_SEP \
/* 50 */ DN(DocHtmlRow) DN_SEP DN(DocHtmlTable) DN_SEP DN(DocHtmlBlockQuote) DN_SEP DN(DocText) DN_SEP DN(DocRoot) DN_SEP \
/* 55 */ DN(DocHtmlDetails) DN_SEP DN(DocHtmlSummary) DN_SEP DN(DocPlantUmlFile) \
#define DN(x)
Definition docnode.h:57
#define DN_SEP
Definition docnode.h:58

Definition at line 42 of file docnode.h.

42#define DOC_NODES \
43/* 0 */ DN(DocWord) DN_SEP DN(DocLinkedWord) DN_SEP DN(DocURL) DN_SEP DN(DocLineBreak) DN_SEP DN(DocHorRuler) DN_SEP \
44/* 5 */ DN(DocAnchor) DN_SEP DN(DocCite) DN_SEP DN(DocStyleChange) DN_SEP DN(DocSymbol) DN_SEP DN(DocEmoji) DN_SEP \
45/* 10 */ DN(DocWhiteSpace) DN_SEP DN(DocSeparator) DN_SEP DN(DocVerbatim) DN_SEP DN(DocInclude) DN_SEP DN(DocIncOperator) DN_SEP \
46/* 15 */ DN(DocFormula) DN_SEP DN(DocIndexEntry) DN_SEP DN(DocAutoList) DN_SEP DN(DocAutoListItem) DN_SEP DN(DocTitle) DN_SEP \
47/* 20 */ DN(DocXRefItem) DN_SEP DN(DocImage) DN_SEP DN(DocDotFile) DN_SEP DN(DocMscFile) DN_SEP DN(DocDiaFile) DN_SEP \
48/* 25 */ DN(DocVhdlFlow) DN_SEP DN(DocLink) DN_SEP DN(DocRef) DN_SEP DN(DocInternalRef) DN_SEP DN(DocHRef) DN_SEP \
49/* 30 */ DN(DocHtmlHeader) DN_SEP DN(DocHtmlDescTitle) DN_SEP DN(DocHtmlDescList) DN_SEP DN(DocSection) DN_SEP DN(DocSecRefItem) DN_SEP \
50/* 35 */ DN(DocSecRefList) DN_SEP DN(DocInternal) DN_SEP DN(DocParBlock) DN_SEP DN(DocSimpleList) DN_SEP DN(DocHtmlList) DN_SEP \
51/* 40 */ DN(DocSimpleSect) DN_SEP DN(DocSimpleSectSep) DN_SEP DN(DocParamSect) DN_SEP DN(DocPara) DN_SEP DN(DocParamList) DN_SEP \
52/* 45 */ DN(DocSimpleListItem) DN_SEP DN(DocHtmlListItem) DN_SEP DN(DocHtmlDescData) DN_SEP DN(DocHtmlCell) DN_SEP DN(DocHtmlCaption) DN_SEP \
53/* 50 */ DN(DocHtmlRow) DN_SEP DN(DocHtmlTable) DN_SEP DN(DocHtmlBlockQuote) DN_SEP DN(DocText) DN_SEP DN(DocRoot) DN_SEP \
54/* 55 */ DN(DocHtmlDetails) DN_SEP DN(DocHtmlSummary) DN_SEP DN(DocPlantUmlFile) \
55

Referenced by docNodeName(), docNodeName(), and dumpDocNodeSizes().

Typedef Documentation

◆ DocNodeVariant

Initial value:
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
>

Definition at line 66 of file docnode.h.

Function Documentation

◆ call_method_children()

DocNodeList * call_method_children ( DocNodeVariant * v)
inline

Definition at line 1365 of file docnode.h.

1366{
1367 return std::visit([](auto&& value) -> DocNodeList* {
1368 if constexpr (details::has_method_children<decltype(value)>::value) {
1369 return &value.children();
1370 } else {
1371 return nullptr;
1372 }
1373 }, *v);
1374}

Referenced by flattenParagraphs().

◆ createDocNode()

template<class T , class... Args>
std::unique_ptr< DocNodeVariant > createDocNode ( Args &&... args)

Definition at line 1471 of file docnode.h.

1472{
1473 auto node = std::make_unique<DocNodeVariant>(T(std::forward<Args>(args)...));
1474 std::get_if<T>(node.get())->setThisVariant(node.get());
1475 return node;
1476}

Referenced by DocHtmlDetails::parse(), DocHtmlTable::parse(), DocSection::parse(), DocSimpleListItem::parse(), DocSimpleSect::parse(), DocSimpleSect::parseRcs(), and DocHtmlDetails::parseSummary().

◆ docNodeName() [1/59]

const char * docNodeName ( const DocAnchor & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [2/59]

const char * docNodeName ( const DocAutoList & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [3/59]

const char * docNodeName ( const DocAutoListItem & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [4/59]

const char * docNodeName ( const DocCite & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [5/59]

const char * docNodeName ( const DocDiaFile & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [6/59]

const char * docNodeName ( const DocDotFile & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [7/59]

const char * docNodeName ( const DocEmoji & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [8/59]

const char * docNodeName ( const DocFormula & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [9/59]

const char * docNodeName ( const DocHorRuler & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [10/59]

const char * docNodeName ( const DocHRef & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [11/59]

const char * docNodeName ( const DocHtmlBlockQuote & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [12/59]

const char * docNodeName ( const DocHtmlCaption & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [13/59]

const char * docNodeName ( const DocHtmlCell & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [14/59]

const char * docNodeName ( const DocHtmlDescData & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [15/59]

const char * docNodeName ( const DocHtmlDescList & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [16/59]

const char * docNodeName ( const DocHtmlDescTitle & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [17/59]

const char * docNodeName ( const DocHtmlDetails & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [18/59]

const char * docNodeName ( const DocHtmlHeader & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [19/59]

const char * docNodeName ( const DocHtmlList & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [20/59]

const char * docNodeName ( const DocHtmlListItem & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [21/59]

const char * docNodeName ( const DocHtmlRow & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [22/59]

const char * docNodeName ( const DocHtmlSummary & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [23/59]

const char * docNodeName ( const DocHtmlTable & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [24/59]

const char * docNodeName ( const DocImage & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [25/59]

const char * docNodeName ( const DocInclude & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [26/59]

const char * docNodeName ( const DocIncOperator & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [27/59]

const char * docNodeName ( const DocIndexEntry & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [28/59]

const char * docNodeName ( const DocInternal & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [29/59]

const char * docNodeName ( const DocInternalRef & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [30/59]

const char * docNodeName ( const DocLineBreak & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [31/59]

const char * docNodeName ( const DocLink & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [32/59]

const char * docNodeName ( const DocLinkedWord & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [33/59]

const char * docNodeName ( const DocMscFile & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [34/59]

const char * docNodeName ( const DocNodeVariant & v)
inline

Definition at line 1399 of file docnode.h.

1400{
1401 static const char *table[] = { DOC_NODES };
1402 return table[v.index()];
1403}
#define DOC_NODES
Definition docnode.h:42

References DOC_NODES.

◆ docNodeName() [35/59]

const char * docNodeName ( const DocPara & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [36/59]

const char * docNodeName ( const DocParamList & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [37/59]

const char * docNodeName ( const DocParamSect & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [38/59]

const char * docNodeName ( const DocParBlock & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [39/59]

const char * docNodeName ( const DocPlantUmlFile & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [40/59]

const char * docNodeName ( const DocRef & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [41/59]

const char * docNodeName ( const DocRoot & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [42/59]

const char * docNodeName ( const DocSecRefItem & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [43/59]

const char * docNodeName ( const DocSecRefList & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [44/59]

const char * docNodeName ( const DocSection & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [45/59]

const char * docNodeName ( const DocSeparator & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [46/59]

const char * docNodeName ( const DocSimpleList & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [47/59]

const char * docNodeName ( const DocSimpleListItem & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [48/59]

const char * docNodeName ( const DocSimpleSect & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [49/59]

const char * docNodeName ( const DocSimpleSectSep & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [50/59]

const char * docNodeName ( const DocStyleChange & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [51/59]

const char * docNodeName ( const DocSymbol & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [52/59]

const char * docNodeName ( const DocText & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [53/59]

const char * docNodeName ( const DocTitle & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [54/59]

const char * docNodeName ( const DocURL & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [55/59]

const char * docNodeName ( const DocVerbatim & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [56/59]

const char * docNodeName ( const DocVhdlFlow & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [57/59]

const char * docNodeName ( const DocWhiteSpace & )
constexpr

Definition at line 75 of file docnode.h.

◆ docNodeName() [58/59]

const char * docNodeName ( const DocWord & )
constexpr

Definition at line 75 of file docnode.h.

References DOC_NODES.

Referenced by dumpDocNodeList().

◆ docNodeName() [59/59]

const char * docNodeName ( const DocXRefItem & )
constexpr

Definition at line 75 of file docnode.h.

◆ dumpDocNodeList()

void dumpDocNodeList ( const DocNodeList & children)
inline

Definition at line 1431 of file docnode.h.

1432{
1433 printf("children=[\n");
1434 for (const auto &child : children)
1435 {
1436 const DocWord *w = std::get_if<DocWord>(&child);
1437 printf(" %s (%p) %s\n",docNodeName(child),(void*)&child,qPrint(w?w->word():""));
1438 }
1439 printf("]\n");
1440}
Node representing a word.
Definition docnode.h:152
QCString word() const
Definition docnode.h:155
const char * qPrint(const char *s)
Definition qcstring.h:661

References docNodeName(), qPrint(), and DocWord::word().

◆ dumpDocNodeSizes()

void dumpDocNodeSizes ( )
inline

Definition at line 1407 of file docnode.h.

1408{
1409#define DN(x) #x
1410#define DN_SEP ,
1411 static const char *tableWithNames[] = { DOC_NODES };
1412#undef DN
1413#undef DN_SEP
1414
1415#define DN(x) sizeof(x)
1416#define DN_SEP ,
1417 static size_t tableWithSizes[] = { DOC_NODES };
1418#undef DN
1419#undef DN_SEP
1420
1421 size_t maxSize=0;
1422 printf("DocNodeVariant(\n");
1423 for (size_t i=0;i<sizeof(tableWithNames)/sizeof(tableWithNames[0]);i++)
1424 {
1425 printf(" /* %2zu */ sizeof(%s)=%zu\n",i,tableWithNames[i],tableWithSizes[i]);
1426 if (tableWithSizes[i]>maxSize) maxSize = tableWithSizes[i];
1427 }
1428 printf(")=%zu\n",maxSize);
1429}

References DOC_NODES.

◆ holds_one_of_alternatives()

template<class... Ts>
bool holds_one_of_alternatives ( const DocNodeVariant & v)
constexpr

returns true iff v holds one of types passed as template parameters

Definition at line 1346 of file docnode.h.

1347{
1349}
static constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
Definition docnode.h:1327

References details::Impl< T, Ts >::holds_one_of_alternatives().

Referenced by determineIfNeedsTag(), getParagraphContext(), mustBeOutsideParagraph(), DocPara::parse(), and tableIsNested().

◆ parent() [1/2]

const DocNodeVariant * parent ( const DocNodeVariant * n)
constexpr

returns the parent node of a given node n or nullptr if the node has no parent.

Definition at line 1316 of file docnode.h.

1317{
1318 return n ? std::visit([](auto &&x)->decltype(auto) { return x.parent(); }, *n) : nullptr;
1319}

◆ parent() [2/2]

DocNodeVariant * parent ( DocNodeVariant * n)
constexpr

returns the parent node of a given node n or nullptr if the node has no parent.

Definition at line 1310 of file docnode.h.

1311{
1312 return n ? std::visit([](auto &&x)->decltype(auto) { return x.parent(); }, *n) : nullptr;
1313}

Referenced by buildDirectories(), checkIfHtmlEndTagEndsAutoList(), LayoutDocManager::createChildNavEntry(), FTVHelp::decContentsDepth(), DocParser::defaultHandleTitleAndSize(), DocParser::defaultHandleToken(), DocDiaFile::DocDiaFile(), DocDotFile::DocDotFile(), DocMscFile::DocMscFile(), DocPlantUmlFile::DocPlantUmlFile(), TreeDiagram::drawConnectors(), dupOfParent(), DocParser::errorHandleDefaultToken(), externalLinkTarget(), generateClassOrGlobalLink(), generateIndent(), generateIndentLabel(), getParagraphContext(), DocParser::handleAHref(), DocParser::handleAnchor(), DocParser::handleImage(), DocParser::handleImg(), DocParser::handleInitialStyleCommands(), DocParser::handleInternalRef(), DocParser::handleLinkedWord(), DocParser::handleParameterType(), DocParser::handlePendingStyleCommands(), DocParser::handlePrefix(), DocParser::handleStyleArgument(), DocParser::handleStyleEnter(), DocParser::handleStyleLeave(), DiagramRow::insertClass(), insideBlockQuote(), insideDetails(), insideDL(), insideLI(), insideOL(), insidePRE(), insideTable(), insideUL(), DocParser::internalValidatingParseDoc(), isFirstChildNode(), isLastChildNode(), isSeparatedParagraph(), isSymbolHidden(), listIsNested(), LatexDocVisitor::operator()(), parentIsVisible(), parseMain(), pathToNode(), tableIsNested(), and writeDotDirDepGraph().