Doxygen
Loading...
Searching...
No Matches
docnode.cpp File Reference
#include "docnode.h"
#include "docparser_p.h"
#include "htmlentity.h"
#include "configimpl.h"
#include "configoptions.h"
#include "emoji.h"
#include "message.h"
#include "doxygen.h"
#include "cite.h"
#include "util.h"
#include "formula.h"
#include "markdown.h"
#include "pagedef.h"
#include "namespacedef.h"
#include "groupdef.h"
#include "cmdmapper.h"
#include "config.h"
#include "vhdldocgen.h"
#include "doctokenizer.h"
#include "plantuml.h"
#include "language.h"
#include "datetime.h"
#include "trace.h"
#include "anchor.h"
#include "aliases.h"
Include dependency graph for docnode.cpp:

Go to the source code of this file.

Classes

struct  ActiveRowSpan
 Helper class to compute the grid for an HTML style table. More...

Macros

#define AUTO_TRACE(...)
#define AUTO_TRACE_ADD(...)
#define AUTO_TRACE_EXIT(...)
#define INTERNAL_ASSERT(x)

Typedefs

typedef std::vector< ActiveRowSpanRowSpanList
 List of ActiveRowSpan classes.

Functions

static void unescapeCRef (QCString &s)
static QCString stripKnownExtensions (const QCString &text)
static void setParent (DocNodeVariant *n, DocNodeVariant *newParent)
static void flattenParagraphs (DocNodeVariant *root, DocNodeList &children)
static Token skipSpacesForTable (DocParser *parser)
static bool findAttribute (const HtmlAttribList &tagHtmlAttribs, const char *attrName, QCString *result)
static bool checkIfHtmlEndTagEndsAutoList (DocParser *parser, const DocNodeVariant *n)

Variables

static const char * g_sectionLevelToName []
static const StringUnorderedSet g_plantumlEngine

Macro Definition Documentation

◆ AUTO_TRACE

#define AUTO_TRACE ( ...)
Value:
(void)0

Definition at line 46 of file docnode.cpp.

Referenced by MemberDefImpl::_computeLinkableInProject(), SymbolResolver::Private::accessibleViaUsingDefinition(), SymbolResolver::Private::accessibleViaUsingNamespace(), addClassAndNestedClasses(), addClassToContext(), ModuleDefImpl::addClassToModule(), addConceptToContext(), ModuleDefImpl::addConceptToModule(), ModuleManager::addDocs(), addEnumDocs(), addEnumValuesToEnums(), ModuleDefImpl::addExportedModule(), addGlobalFunction(), ModuleDefImpl::addHeader(), ModuleManager::addHeader(), ModuleDefImpl::addImport(), ModuleManager::addImport(), addInterfaceOrServiceToServiceOrSingleton(), addListReferences(), addLocalObjCMethod(), addMemberDocs(), addMemberFunction(), addMemberSpecialization(), ClassDefImpl::addMembersToTemplateInstance(), ClassDefImpl::addMemberToList(), ModuleDefImpl::addMemberToModule(), ClassDefImpl::addMemberToTemplateInstance(), addMethodToClass(), Markdown::Private::addStrEscapeUtf8Nbsp(), DirDefImpl::addUsesDependency(), addVariable(), addVariableToClass(), addVariableToFile(), adjustConfiguration(), buildClassDocList(), buildClassList(), buildConceptDocList(), buildConceptList(), buildDefineList(), buildDictionaryList(), buildDirectories(), buildFunctionList(), buildGroupListFiltered(), buildInterfaceAndServiceList(), buildNamespaceList(), buildSequenceList(), buildTypedefList(), buildVarList(), checkConfiguration(), ClassDefImpl::ClassDefImpl(), ModuleManager::collectExportedSymbols(), ModuleManager::collectExportedSymbolsRecursively(), combineDeclarationAndDefinition(), computeClassRelations(), computeCommonDirPrefix(), DirDefImpl::computeDependencies(), computeDirDependencies(), computeIndentExcludingListMarkers(), computeMemberReferences(), computeTemplateClassRelations(), ClassDefImpl::containsOverload(), ModuleManager::createModuleDef(), DirDefImpl::createNewDir(), createUsingMemberImportForClass(), ClassDefImpl::deepCopy(), DocParser::defaultHandleTitleAndSize(), DocParser::defaultHandleToken(), distributeConceptGroups(), DocRef::DocRef(), encodeDirName(), extractCanonicalType(), Markdown::extractPageTitle(), Markdown::Private::extractTitleId(), filterMemberDocumentation(), findBaseClassesForClass(), CodeFragmentManager::Private::FragmentInfo::findBlockMarkers(), findClassRelation(), DocParser::findDocsForMemberOrCompound(), Markdown::Private::findEmphasisChar(), Markdown::Private::findEndOfLine(), findEnumDocumentation(), findEnums(), findFriends(), findFunctionPtr(), findGlobalMember(), findInheritedTemplateInstances(), findMember(), findMemberDocumentation(), findModuleDocumentation(), findObjCMethodDefinitions(), findTableColumns(), findTemplateInstanceRelation(), findUsedClassesForClass(), findUsedTemplateInstances(), findUsingDeclarations(), findUsingDeclImports(), findUsingDirectives(), SymbolResolver::Private::followPath(), generateDirDocs(), generateDocsForClassList(), generateOutput(), generateXRefPages(), getCanonicalTypeForIdentifier(), ClassDefImpl::getOutputFileBase(), DirDefImpl::getOutputFileBase(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedType(), SymbolResolver::Private::getResolvedTypeRec(), DocParser::handleAHref(), DocParser::handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), handleCommentBlock(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlHeader(), DocPara::handleHtmlStartTag(), DocPara::handleIFile(), DocPara::handleILine(), DocParser::handleImage(), DocParser::handleImg(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), DocParser::handleInitialStyleCommands(), DocParser::handleInternalRef(), DocPara::handleLink(), DocParser::handleLinkedWord(), handleParametersCommentBlocks(), DocParser::handleParameterType(), DocPara::handleParamSection(), DocParser::handlePendingStyleCommands(), DocParser::handlePrefix(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleShowDate(), DocPara::handleSimpleSection(), DocPara::handleStartCode(), DocParser::handleStyleArgument(), DocParser::handleStyleEnter(), DocParser::handleStyleLeave(), DocParser::handleUnclosedStyleCommands(), DocPara::handleVhdlFlow(), DocPara::handleXRefItem(), hasLineBreak(), DocPara::injectToken(), ClassDefImpl::insertExplicitTemplateInstance(), ClassDefImpl::insertTemplateInstance(), ClassDefImpl::internalInsertMember(), DocParser::internalValidatingParseDoc(), SymbolResolver::isAccessibleFrom(), SymbolResolver::Private::isAccessibleFrom(), SymbolResolver::isAccessibleFromWithExpScope(), SymbolResolver::Private::isAccessibleFromWithExpScope(), Markdown::Private::isAtxHeader(), Markdown::Private::isBlockCommand(), isBlockQuote(), isCodeBlock(), isEmptyLine(), isEndOfList(), isExplicitPage(), isFencedCodeBlock(), Markdown::Private::isHeaderline(), isHRuler(), isLinkRef(), isListMarker(), Markdown::Private::isSpecialCommand(), isTableBlock(), isVarWithConstructor(), makeTemplateInstanceRelation(), markdownFileNameToId(), matchArgument2(), matchArguments2(), matchCanonicalTypes(), matchTemplateArguments(), mergeArguments(), mergeCategories(), ClassDefImpl::mergeCategory(), DirDefImpl::mergeDirectoryInTree(), mergeScopes(), ModuleDefImpl::mergeSymbolsFrom(), SymbolResolver::Private::newResolveTypedef(), organizeSubGroupsFiltered(), DocAutoList::parse(), DocAutoListItem::parse(), DocHRef::parse(), DocHtmlBlockQuote::parse(), DocHtmlCaption::parse(), DocHtmlCell::parse(), DocHtmlDescData::parse(), DocHtmlDescList::parse(), DocHtmlDescTitle::parse(), DocHtmlDetails::parse(), DocHtmlHeader::parse(), DocHtmlList::parse(), DocHtmlListItem::parse(), DocHtmlRow::parse(), DocHtmlSummary::parse(), DocHtmlTable::parse(), DocInclude::parse(), DocIncOperator::parse(), DocIndexEntry::parse(), DocInternal::parse(), DocInternalRef::parse(), DocLink::parse(), DocPara::parse(), DocParamList::parse(), DocParamSect::parse(), DocParBlock::parse(), DocRef::parse(), DocRoot::parse(), DocSecRefItem::parse(), DocSecRefList::parse(), DocSection::parse(), DocSimpleSect::parse(), DocText::parse(), DocTitle::parse(), DocVhdlFlow::parse(), CodeFragmentManager::parseCodeFragment(), CommentScanner::parseCommentBlock(), parseCompounds(), parseFile(), parseFilesMultiThreading(), parseFilesSingleThreading(), COutlineParser::parseInput(), parseInput(), parseMain(), parsePrototype(), DocSimpleSect::parseRcs(), DocHtmlDetails::parseSummary(), DocHtmlCell::parseXml(), DocHtmlList::parseXml(), DocHtmlListItem::parseXml(), DocHtmlRow::parseXml(), DocHtmlTable::parseXml(), DocParamList::parseXml(), DocSimpleSect::parseXml(), Markdown::Private::processBlocks(), Markdown::Private::processCodeSpan(), DocParser::processCopyDoc(), Markdown::Private::processEmphasis(), Markdown::Private::processEmphasis1(), Markdown::Private::processEmphasis2(), Markdown::Private::processEmphasis3(), Preprocessor::processFile(), Markdown::Private::processHtmlTag(), Markdown::Private::processHtmlTagWrite(), Markdown::Private::processInline(), Markdown::Private::processLink(), Markdown::Private::processNmdash(), Markdown::Private::processQuotations(), Markdown::Private::processQuoted(), Markdown::Private::processSpecialCommand(), readIncludeFile(), DocParser::readTextFileByName(), readTextFileByName(), SymbolResolver::resolveClass(), ModuleManager::resolveImports(), resolveLink(), ModuleManager::resolvePartitions(), ModuleManager::resolvePartitionsRecursively(), resolveRef(), SymbolResolver::resolveSymbol(), resolveTemplateInstanceInType(), resolveTypeDef(), substituteTemplateArgumentsInString(), SymbolResolver::Private::substTypedef(), transferFunctionDocumentation(), transferFunctionReferences(), transferRelatedFunctionDocumentation(), transferStaticInstanceInitializers(), warnUndocumentedNamespaces(), Markdown::Private::writeBlockQuote(), DirDefImpl::writeBriefDescription(), Markdown::Private::writeCodeBlock(), DirDefImpl::writeDetailedDescription(), ClassDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), DirRelation::writeDocumentation(), ModuleDefImpl::writeDocumentation(), ModuleDefImpl::writeExports(), Markdown::Private::writeFencedCodeBlock(), DirDefImpl::writeFileList(), ModuleDefImpl::writeFiles(), Markdown::Private::writeMarkdownImage(), Markdown::Private::writeOneLineHeaderOrRuler(), DirDefImpl::writeSubDirList(), and Markdown::Private::writeTableBlock().

◆ AUTO_TRACE_ADD

#define AUTO_TRACE_ADD ( ...)
Value:
(void)0

Definition at line 47 of file docnode.cpp.

Referenced by MemberDefImpl::_computeLinkableInProject(), SymbolResolver::Private::accessibleViaUsingDefinition(), SymbolResolver::Private::accessibleViaUsingNamespace(), addClassToContext(), addConceptToContext(), addEnumValuesToEnums(), ModuleManager::addHeader(), ModuleManager::addImport(), addLocalObjCMethod(), addMemberFunction(), DirDefImpl::addUsesDependency(), addVariable(), addVariableToClass(), addVariableToFile(), buildDefineList(), buildDirectories(), buildFunctionList(), buildGroupListFiltered(), buildNamespaceList(), buildTypedefList(), ModuleManager::collectExportedSymbols(), combineDeclarationAndDefinition(), computeCommonDirPrefix(), DirDefImpl::computeDependencies(), computeDirDependencies(), computeTemplateClassRelations(), DirDefImpl::createNewDir(), ClassDefImpl::deepCopy(), DocParser::defaultHandleToken(), distributeConceptGroups(), CodeFragmentManager::Private::FragmentInfo::findBlockMarkers(), findClassRelation(), findEnumDocumentation(), findEnums(), findFriends(), findGlobalMember(), findMember(), findTemplateInstanceRelation(), findUsedClassesForClass(), findUsingDeclarations(), findUsingDeclImports(), findUsingDirectives(), SymbolResolver::Private::followPath(), getCanonicalTypeForIdentifier(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedType(), SymbolResolver::Private::getResolvedTypeRec(), DocParser::handleImg(), DocParser::handleLinkedWord(), handleParametersCommentBlocks(), ClassDefImpl::internalInsertMember(), SymbolResolver::Private::isAccessibleFrom(), SymbolResolver::Private::isAccessibleFromWithExpScope(), isLinkRef(), makeTemplateInstanceRelation(), mergeArguments(), mergeCategories(), ClassDefImpl::mergeCategory(), SymbolResolver::Private::newResolveTypedef(), organizeSubGroupsFiltered(), DocIncOperator::parse(), DocPara::parse(), CodeFragmentManager::parseCodeFragment(), parseCompounds(), parseInput(), Markdown::Private::processSpecialCommand(), readIncludeFile(), SymbolResolver::resolveClass(), ModuleManager::resolveImports(), ModuleManager::resolvePartitionsRecursively(), resolveRef(), resolveTemplateInstanceInType(), resolveTypeDef(), substituteTemplateArgumentsInString(), transferFunctionReferences(), transferRelatedFunctionDocumentation(), transferStaticInstanceInitializers(), Markdown::Private::writeBlockQuote(), DirDefImpl::writeFileList(), and DirDefImpl::writeSubDirList().

◆ AUTO_TRACE_EXIT

#define AUTO_TRACE_EXIT ( ...)
Value:
(void)0

Definition at line 48 of file docnode.cpp.

Referenced by SymbolResolver::Private::accessibleViaUsingDefinition(), SymbolResolver::Private::accessibleViaUsingNamespace(), ClassDefImpl::ClassDefImpl(), computeIndentExcludingListMarkers(), ClassDefImpl::containsOverload(), DocParser::defaultHandleTitleAndSize(), DocRef::DocRef(), encodeDirName(), extractCanonicalType(), Markdown::extractPageTitle(), Markdown::Private::extractTitleId(), DocParser::findDocsForMemberOrCompound(), Markdown::Private::findEmphasisChar(), Markdown::Private::findEndOfLine(), findFunctionPtr(), findTableColumns(), SymbolResolver::Private::followPath(), getCanonicalTypeForIdentifier(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedType(), SymbolResolver::Private::getResolvedTypeRec(), DocPara::handleCommand(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlStartTag(), DocPara::handleParamSection(), DocPara::handleStartCode(), DocParser::handleStyleArgument(), hasLineBreak(), DocParser::internalValidatingParseDoc(), SymbolResolver::isAccessibleFrom(), SymbolResolver::Private::isAccessibleFrom(), SymbolResolver::isAccessibleFromWithExpScope(), SymbolResolver::Private::isAccessibleFromWithExpScope(), Markdown::Private::isAtxHeader(), Markdown::Private::isBlockCommand(), isBlockQuote(), isCodeBlock(), isEmptyLine(), isEndOfList(), isExplicitPage(), isFencedCodeBlock(), Markdown::Private::isHeaderline(), isHRuler(), isLinkRef(), isListMarker(), Markdown::Private::isSpecialCommand(), isTableBlock(), isVarWithConstructor(), markdownFileNameToId(), matchArgument2(), matchTemplateArguments(), mergeScopes(), SymbolResolver::Private::newResolveTypedef(), DocAutoList::parse(), DocAutoListItem::parse(), DocHtmlBlockQuote::parse(), DocHtmlDetails::parse(), DocHtmlList::parse(), DocHtmlListItem::parse(), DocIndexEntry::parse(), DocInternal::parse(), DocPara::parse(), DocParamList::parse(), DocParamSect::parse(), DocParBlock::parse(), DocSection::parse(), DocSimpleSect::parse(), CommentScanner::parseCommentBlock(), DocHtmlList::parseXml(), DocHtmlListItem::parseXml(), DocParamList::parseXml(), DocSimpleSect::parseXml(), Markdown::Private::processCodeSpan(), DocParser::processCopyDoc(), Markdown::Private::processEmphasis(), Markdown::Private::processEmphasis1(), Markdown::Private::processEmphasis2(), Markdown::Private::processEmphasis3(), Markdown::Private::processHtmlTagWrite(), Markdown::Private::processLink(), Markdown::Private::processNmdash(), Markdown::Private::processQuoted(), Markdown::Private::processSpecialCommand(), SymbolResolver::resolveClass(), resolveLink(), SymbolResolver::resolveSymbol(), resolveTypeDef(), substituteTemplateArgumentsInString(), SymbolResolver::Private::substTypedef(), Markdown::Private::writeBlockQuote(), Markdown::Private::writeCodeBlock(), and Markdown::Private::writeTableBlock().

◆ INTERNAL_ASSERT

#define INTERNAL_ASSERT ( x)
Value:
do {} while(0)

Definition at line 51 of file docnode.cpp.

Referenced by DocPara::handleCommand(), DocPara::parse(), and DocSection::parse().

Typedef Documentation

◆ RowSpanList

typedef std::vector<ActiveRowSpan> RowSpanList

List of ActiveRowSpan classes.

Definition at line 2293 of file docnode.cpp.

Function Documentation

◆ checkIfHtmlEndTagEndsAutoList()

bool checkIfHtmlEndTagEndsAutoList ( DocParser * parser,
const DocNodeVariant * n )
static

Definition at line 5608 of file docnode.cpp.

5609{
5610 // expected hierarchy:
5611 // 1. DocAutoListItem <- n
5612 // 2. DocAutoList <- parent(n)
5613 // 3. DocPara <- parent(parent(n))
5614
5615 // step 1
5616 if (!std::get_if<DocAutoListItem>(n)) // not inside a auto list item
5617 {
5618 return false;
5619 }
5620
5621 // step 2
5622 n = parent(n);
5623 int indent = 0;
5624 const auto docAutoList = std::get_if<DocAutoList>(n);
5625 if (docAutoList) // capture indent
5626 {
5627 indent = docAutoList->indent();
5628 }
5629 else
5630 {
5631 return false;
5632 }
5633
5634 // step 3
5635 n = parent(n);
5636 const auto docPara = std::get_if<DocPara>(n);
5637 if (docPara)
5638 {
5639 QCString tagNameLower = QCString(parser->context.token->name).lower();
5640 auto topStyleChange = [](const DocStyleChangeStack &stack) -> const DocStyleChange &
5641 {
5642 return std::get<DocStyleChange>(*stack.top());
5643 };
5644
5645 if (parser->context.styleStack.empty() || // no style change
5646 (topStyleChange(parser->context.styleStack).tagName()==tagNameLower && // correct style change
5647 topStyleChange(parser->context.styleStack).position()!=parser->context.nodeStack.size()) // wrong position, so normal close
5648 )
5649 {
5650 // insert an artificial 'end of autolist' marker and parse again
5651 QCString indentStr;
5652 indentStr.fill(' ',indent);
5653 parser->tokenizer.unputString("\\ilinebr "+indentStr+".\\ilinebr"+indentStr+"</"+parser->context.token->name+">");
5654 return true;
5655 }
5656 }
5657 return false;
5658}
DocTokenizer tokenizer
DocParserContext context
Node representing a style change.
Definition docnode.h:268
void unputString(const QCString &tag)
This is an alternative implementation of QCString.
Definition qcstring.h:101
void fill(char c, int len=-1)
Fills a string with a predefined character.
Definition qcstring.h:180
QCString lower() const
Definition qcstring.h:234
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
IterableStack< const DocNodeVariant * > DocStyleChangeStack
Definition docparser_p.h:55
DocStyleChangeStack styleStack
Definition docparser_p.h:67
DocNodeStack nodeStack
Definition docparser_p.h:66
TokenInfo * token
Definition docparser_p.h:92
QCString name

References DocParser::context, QCString::fill(), QCString::lower(), TokenInfo::name, DocParserContext::nodeStack, parent(), DocParserContext::styleStack, DocParserContext::token, DocParser::tokenizer, and DocTokenizer::unputString().

Referenced by DocPara::parse().

◆ findAttribute()

bool findAttribute ( const HtmlAttribList & tagHtmlAttribs,
const char * attrName,
QCString * result )
static

Definition at line 4898 of file docnode.cpp.

4901{
4902
4903 for (const auto &opt : tagHtmlAttribs)
4904 {
4905 if (opt.name==attrName)
4906 {
4907 *result = opt.value;
4908 return TRUE;
4909 }
4910 }
4911 return FALSE;
4912}
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References FALSE, and TRUE.

Referenced by DocPara::handleHtmlStartTag().

◆ flattenParagraphs()

void flattenParagraphs ( DocNodeVariant * root,
DocNodeList & children )
static

Definition at line 825 of file docnode.cpp.

826{
827 DocNodeList newChildren;
828 for (auto &dn : children)
829 {
830 DocPara *para = std::get_if<DocPara>(&dn);
831 if (para)
832 {
833 //// move the children of the paragraph to the end of the newChildren list
834 newChildren.move_append(para->children());
835 }
836 }
837
838 // replace the children list by the newChildren list
839 children.clear();
840 children.move_append(newChildren);
841 // reparent the children
842 for (auto &cn : children)
843 {
844 setParent(&cn,root);
845 // we also need to set the parent for each child of cn, as cn's address may have changed.
846 auto opt_children = call_method_children(&cn);
847 if (opt_children)
848 {
849 for (auto &ccn : *opt_children)
850 {
851 setParent(&ccn,&cn);
852 }
853 }
854 }
855}
DocNodeList & children()
Definition docnode.h:143
Node representing a paragraph in the documentation tree.
Definition docnode.h:1080
void clear()
clears the contents
Definition growvector.h:143
static void setParent(DocNodeVariant *n, DocNodeVariant *newParent)
Definition docnode.cpp:118
DocNodeList * call_method_children(DocNodeVariant *v)
Definition docnode.h:1385
void move_append(DocNodeList &l)
moves the element of list l at the end of this list.
Definition docnode.cpp:816

References call_method_children(), DocCompoundNode::children(), GrowVector< T >::clear(), DocNodeList::move_append(), and setParent().

Referenced by DocRef::parse(), and DocTitle::parseFromString().

◆ setParent()

void setParent ( DocNodeVariant * n,
DocNodeVariant * newParent )
static

Definition at line 118 of file docnode.cpp.

119{
120 std::visit([&](auto &&x)->decltype(auto) { return x.setParent(newParent); }, *n);
121}

Referenced by flattenParagraphs().

◆ skipSpacesForTable()

Token skipSpacesForTable ( DocParser * parser)
static

Definition at line 1937 of file docnode.cpp.

1938{
1939 // get next token
1940 Token tok=parser->tokenizer.lex();
1941 // skip whitespace and tbody, thead and tfoot tags
1942 while (tok.is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG))
1943 {
1944 if (tok.is(TokenRetval::TK_HTMLTAG))
1945 {
1947 // skip over tbody, thead, tfoot tags
1948 if (tagId==HtmlTagType::HTML_TBODY ||
1949 tagId==HtmlTagType::HTML_THEAD ||
1951 {
1952 tok=parser->tokenizer.lex();
1953 }
1954 else
1955 {
1956 break;
1957 }
1958 }
1959 else
1960 {
1961 tok=parser->tokenizer.lex();
1962 }
1963 }
1964 return tok;
1965}
bool is(TokenRetval rv) const
bool is_any_of(ARGS... args) const
HtmlTagType
Definition cmdmapper.h:169
const Mapper< HtmlTagType > * htmlTagMapper

References DocParser::context, HTML_TBODY, HTML_TFOOT, HTML_THEAD, Mappers::htmlTagMapper, Token::is(), Token::is_any_of(), DocTokenizer::lex(), TokenInfo::name, DocParserContext::token, and DocParser::tokenizer.

Referenced by DocHtmlRow::parse(), and DocHtmlTable::parse().

◆ stripKnownExtensions()

QCString stripKnownExtensions ( const QCString & text)
static

Strips known html and tex extensions from text.

Definition at line 103 of file docnode.cpp.

104{
105 QCString result=text;
106 if (result.endsWith(".tex"))
107 {
108 result=result.left(result.length()-4);
109 }
110 else if (result.right(Doxygen::htmlFileExtension.length())==
112 {
113 result=result.left(result.length()-Doxygen::htmlFileExtension.length());
114 }
115 return result;
116}
static QCString htmlFileExtension
Definition doxygen.h:122
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
bool endsWith(const char *s) const
Definition qcstring.h:509
QCString right(size_t len) const
Definition qcstring.h:219
QCString left(size_t len) const
Definition qcstring.h:214

References QCString::endsWith(), Doxygen::htmlFileExtension, QCString::left(), QCString::length(), and QCString::right().

Referenced by DocLink::DocLink(), DocRef::DocRef(), and DocSecRefItem::parse().

◆ unescapeCRef()

void unescapeCRef ( QCString & s)
static

Definition at line 81 of file docnode.cpp.

82{
83 QCString result;
84 const char *p = s.data();
85 if (p)
86 {
87 char c = 0;
88 while ((c=*p++))
89 {
90 if (c=='{') c='<'; else if (c=='}') c='>';
91 result+=c;
92 }
93 }
94
95 result=substitute(result,"&lt;","<");
96 result=substitute(result,"&gt;",">");
97 s = result;
98}
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
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477

References QCString::data(), and substitute().

Referenced by DocPara::handleHtmlStartTag().

Variable Documentation

◆ g_plantumlEngine

const StringUnorderedSet g_plantumlEngine
static
Initial value:
{
"uml", "bpm", "wire", "dot", "ditaa",
"salt", "math", "latex", "gantt", "mindmap",
"wbs", "yaml", "creole", "json", "flow",
"board", "git", "hcl", "regex", "ebnf",
"files", "chen", "chronology"
}

Definition at line 69 of file docnode.cpp.

69 {
70 "uml", "bpm", "wire", "dot", "ditaa",
71 "salt", "math", "latex", "gantt", "mindmap",
72 "wbs", "yaml", "creole", "json", "flow",
73 "board", "git", "hcl", "regex", "ebnf",
74 "files", "chen", "chronology"
75};

Referenced by DocPara::handleCommand().

◆ g_sectionLevelToName

const char* g_sectionLevelToName[]
static
Initial value:
=
{
"page",
"section",
"subsection",
"subsubsection",
"paragraph",
"subparagraph"
}

Definition at line 56 of file docnode.cpp.

57{
58 "page",
59 "section",
60 "subsection",
61 "subsubsection",
62 "paragraph",
63 "subparagraph"
64};

Referenced by DocSection::parse().