42#if !ENABLE_DOCPARSER_TRACING
46#define AUTO_TRACE(...) (void)0
47#define AUTO_TRACE_ADD(...) (void)0
48#define AUTO_TRACE_EXIT(...) (void)0
56 return std::make_unique<DocParser>();
104 text.
sprintf(
"image file name '%s' is ambiguous.\n",
qPrint(fileName));
105 text+=
"Possible candidates:\n";
111 FileInfo infi(inputFile.
str());
116 if (i!=-1 || (i=result.
findRev(
'\\'))!=-1)
118 result = result.
right(
static_cast<int>(result.
length())-i-1);
145 QCString outputFile = outputDir+
"/"+result;
146 FileInfo outfi(outputFile.
str());
149 Dir().remove(outputFile.
str());
151 "destination of image %s is a symlink, replacing with image",
154 if (outputFile!=inputFile)
165 "could not open image %s",
qPrint(fileName));
175 epstopdfArgs.
sprintf(
"\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
180 err(
"Problems running epstopdf. Check your TeX installation!\n");
184 Dir().remove(outputDir.
str()+
"/"+baseName.
str()+
".eps");
195 "image file %s is not found in IMAGE_PATH: "
196 "assuming external image.",
qPrint(fileName)
212 if (
context.memberDef==
nullptr)
return;
213 std::string name =
context.token->name.str();
214 const ArgumentList &al=
context.memberDef->isDocsForDefinition() ?
215 context.memberDef->argumentList() :
216 context.memberDef->declArgumentList();
219 if (al.
empty())
return;
221 static const reg::Ex re(R
"(\$?\w+\.*)");
222 reg::Iterator it(name,re);
224 for (; it!=
end ; ++it)
226 const auto &match = *it;
227 QCString aName=match.str();
231 for (
const Argument &a : al)
233 QCString argName =
context.memberDef->isDefine() ? a.type : a.name;
248 QCString scope=
context.memberDef->getScopeString();
249 if (!scope.
isEmpty()) scope+=
"::";
else scope=
"";
250 QCString inheritedFrom =
"";
251 QCString docFile =
context.memberDef->docFile();
252 int docLine =
context.memberDef->docLine();
253 const MemberDef *inheritedMd =
context.memberDef->inheritsDocsFrom();
256 inheritedFrom.
sprintf(
" inherited from member %s at line "
259 docFile =
context.memberDef->getDefFileName();
260 docLine =
context.memberDef->getDefLine();
264 "argument '%s' of command @param "
265 "is not found in the argument list of %s%s%s%s",
276 QCString name =
context.token->name;
279 if (
context.retvalsFound.count(name.
str())==1)
282 context.memberDef->getDefLine(),
284 qPrint(
"return value '" + name +
"' of " +
285 QCString(
context.memberDef->qualifiedName()) +
286 " has multiple documentation sections"));
301 const ArgumentList &al=
context.memberDef->isDocsForDefinition() ?
302 context.memberDef->argumentList() :
303 context.memberDef->declArgumentList();
307 ArgumentList undocParams;
308 for (
const Argument &a: al)
310 QCString argName =
context.memberDef->isDefine() ? a.type : a.name;
313 QCString aName = argName;
321 size_t count =
context.paramsFound.count(argName.
str());
322 if (count==0 && a.docs.isEmpty())
331 qPrint(
"argument '" + aName +
332 "' from the argument list of " +
333 QCString(
context.memberDef->qualifiedName()) +
334 " has multiple @param documentation sections"));
341 QCString errMsg =
"The following parameter";
342 if (undocParams.
size()>1) errMsg+=
"s";
344 QCString(
context.memberDef->qualifiedName()) +
346 (undocParams.
size()>1 ?
" are" :
" is") +
" not documented:\n";
347 for (
const Argument &a : undocParams)
349 QCString argName =
context.memberDef->isDefine() ? a.type : a.name;
352 if (!first) errMsg+=
"\n";
354 errMsg+=
" parameter '"+argName+
"'";
370 " has @param documentation sections but no arguments"));
398 QCString cmdArg=commandName;
405 const FileDef *fd=
nullptr;
406 const GroupDef *gd=
nullptr;
407 const PageDef *pd=
nullptr;
445 size_t rightBracePos = cmdArg.
find(
"}",
static_cast<int>(
qstrlen(
"anonymous_namespace{")));
446 QCString leftPart = cmdArg.
left(rightBracePos + 1);
447 QCString rightPart = cmdArg.
right(cmdArg.
size() - rightBracePos - 1);
449 cmdArg = leftPart + rightPart;
456 int l=
static_cast<int>(cmdArg.
length());
458 int funcStart=cmdArg.
find(
'(');
467 int secondParen = cmdArg.
find(
'(', funcStart+1);
468 int leftParen = cmdArg.
find(
')', funcStart+1);
469 if (leftParen!=-1 && secondParen!=-1)
471 if (leftParen<secondParen)
473 funcStart=secondParen;
479 QCString args=cmdArg.
right(l-funcStart);
486 GetDefResult result =
getDefs(input);
497 int scopeOffset=
static_cast<int>(
context.context.length());
500 QCString fullName=cmdArg;
532 scopeOffset =
context.context.findRev(
"::",scopeOffset-1);
533 if (scopeOffset==-1) scopeOffset=0;
535 }
while (scopeOffset>=0);
547 case TokenRetval::TK_COMMAND_AT:
549 case TokenRetval::TK_COMMAND_BS:
557 case TokenRetval::TK_SYMBOL:
561 case TokenRetval::TK_HTMLTAG:
578 QCString saveCmdName = cmdName;
580 if (!tok.
is(TokenRetval::TK_WHITESPACE))
587 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::TK_WHITESPACE,
588 TokenRetval::TK_NEWPARA, TokenRetval::TK_LISTITEM, TokenRetval::TK_ENDLIST)
591 static const reg::Ex specialChar(R
"([.,|()\[\]:;?])");
592 if (tok.
is(TokenRetval::TK_WORD) &&
context.token->name.length()==1 &&
602 case TokenRetval::TK_HTMLTAG:
619 return (tok.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST)) ? tok : Token::make_RetVal_OK();
640 QCString tagNameLower = QCString(tagName).lower();
644 return std::get<DocStyleChange>(*stack.top());
647 if (
context.styleStack.empty() ||
648 topStyleChange(
context.styleStack).style()!=s ||
649 topStyleChange(
context.styleStack).tagName()!=tagNameLower ||
650 topStyleChange(
context.styleStack).position()!=
context.nodeStack.size()
653 if (
context.styleStack.empty())
658 else if (topStyleChange(
context.styleStack).tagName()!=tagNameLower)
663 else if (topStyleChange(
context.styleStack).style()!=s)
676 children.
append<DocStyleChange>(
690 if (!
context.styleStack.empty())
692 const DocStyleChange *sc = &std::get<DocStyleChange>(*
context.styleStack.top());
699 sc = !
context.styleStack.empty() ? &std::get<DocStyleChange>(*
context.styleStack.top()) :
nullptr;
707 while (!
context.initialStyleStack.empty())
709 const DocStyleChange &sc = std::get<DocStyleChange>(*
context.initialStyleStack.top());
711 context.initialStyleStack.pop();
720 Token retval = Token::make_RetVal_OK();
721 for (
const auto &opt : tagHtmlAttribs)
723 if (opt.name==
"name" || opt.name==
"id")
725 if (!opt.value.isEmpty())
735 else if (opt.name==
"href")
738 HtmlAttribList attrList = tagHtmlAttribs;
740 attrList.erase(attrList.begin()+index);
742 if (opt.value.at(0) !=
'#') relPath =
context.relPath;
747 retval = children.
get_last<DocHRef>()->parse();
763 if (!
context.initialStyleStack.empty())
765 QCString tagName = std::get<DocStyleChange>(*
context.initialStyleStack.top()).tagName();
766 context.initialStyleStack.pop();
769 "end of comment block while expecting "
770 "command </%s>",
qPrint(tagName));
779 if (!autolinkSupport && !ignoreAutoLinkFlag)
787 const Definition *compound=
nullptr;
788 const MemberDef *member=
nullptr;
789 size_t len =
context.token->name.length();
790 ClassDef *cd=
nullptr;
796 || (!
context.context.isEmpty() &&
810 children.
append<DocLinkedWord>(
820 QCString anchor = compound->
anchor();
829 children.
append<DocLinkedWord>(
837 (
toFileDef(compound))->generateSourceFile()
841 children.
append<DocLinkedWord>(
850 AUTO_TRACE_ADD(
"resolved reference as unlinkable compound={} (linkable={}) member={} (linkable={})",
851 compound ? compound->
name() :
"<none>", compound ? (
int)compound->
isLinkable() : -1,
852 member ? member->
name() :
"<none>", member ? (
int)member->
isLinkable() : -1);
856 else if (!
context.insideHtmlLink && len>1 &&
context.token->name.at(len-1)==
':')
868 children.
append<DocLinkedWord>(
878 if (
context.token->name.startsWith(
"#"))
888 QCString name =
context.token->name;
892 while ((i=paramTypes.
find(
'|',p))!=-1)
894 name1 = paramTypes.
mid(p,i-p);
896 context.token->name=ii!=-1 ? name1.
mid(0,ii) : name1;
902 name1 = paramTypes.
mid(p);
904 context.token->name=ii!=-1 ? name1.
mid(0,ii) : name1;
913 QCString tokenName =
context.token->name;
915 if (!tok.
is(TokenRetval::TK_WHITESPACE))
923 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
930 children.
get_last<DocInternalRef>()->parse();
937 if (!tok.
is(TokenRetval::TK_WHITESPACE))
945 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
951 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
965 if (!tok.
is(TokenRetval::TK_WHITESPACE))
973 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
979 else if (!tok.
is(TokenRetval::TK_WORD))
1001 auto ns = AutoNodeStack(
this,
parent);
1006 while (!tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1008 if (tok.
is(TokenRetval::TK_WORD) && (
context.token->name==
"width=" ||
context.token->name==
"height="))
1013 else if (tok.
is(TokenRetval::TK_HTMLTAG))
1025 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1029 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1031 if (tok.
is(TokenRetval::TK_WORD))
1033 if (
context.token->name==
"width=" ||
context.token->name==
"height=")
1039 if (
context.token->name==
"width")
1043 else if (
context.token->name==
"height")
1045 height =
context.token->chars;
1059 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1062 tokenizer.unputString(tok.
is(TokenRetval::TK_COMMAND_AT) ?
"@" :
"\\");
1065 else if (tok.
is(TokenRetval::TK_SYMBOL))
1070 else if (tok.
is(TokenRetval::TK_HTMLTAG))
1085 bool inlineImage =
false;
1089 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1091 if (tok.
is(TokenRetval::TK_WORD))
1093 if (
context.token->name ==
"{")
1099 for (
const auto &opt : optList)
1101 if (opt.empty())
continue;
1102 QCString locOpt(opt);
1105 locOptLow = locOpt.
lower();
1106 if (locOptLow ==
"inline")
1115 "multiple use of option 'anchor' for 'image' command, ignoring: '%s'",
1120 anchorStr = locOpt.
mid(7);
1126 "unknown option '%s' for 'image' command specified",
1131 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1145 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
1152 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1158 QCString imgType =
context.token->name.lower();
1167 "\\image command is not valid",
1174 if (!tok.
is(TokenRetval::TK_WORD))
1182 children.
append<DocAnchor>(
this,
parent,anchorStr,
true);
1184 HtmlAttribList attrList;
1187 children.
get_last<DocImage>()->parse();
1205 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
1206 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
1211 QCString tokenName =
context.token->name;
1213 switch (tok.
value())
1215 case TokenRetval::TK_COMMAND_AT:
1217 case TokenRetval::TK_COMMAND_BS:
1276 if (!tok.
is(TokenRetval::TK_WORD)) children.
append<DocWhiteSpace>(
this,
parent,
" ");
1277 if (tok.
is(TokenRetval::TK_NEWPARA))
goto handlepara;
1278 else if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1290 if (!tok.
is(TokenRetval::TK_WORD)) children.
append<DocWhiteSpace>(
this,
parent,
" ");
1291 if (tok.
is(TokenRetval::TK_NEWPARA))
goto handlepara;
1292 else if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1304 if (!tok.
is(TokenRetval::TK_WORD)) children.
append<DocWhiteSpace>(
this,
parent,
" ");
1305 if (tok.
is(TokenRetval::TK_NEWPARA))
goto handlepara;
1306 else if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1318 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1330 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1342 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1354 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1366 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1378 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1435 case TokenRetval::TK_HTMLTAG:
1596 case TokenRetval::TK_SYMBOL:
1609 case TokenRetval::TK_WHITESPACE:
1610 case TokenRetval::TK_NEWPARA:
1617 case TokenRetval::TK_LNKWORD:
1625 case TokenRetval::TK_WORD:
1633 case TokenRetval::TK_URL:
1656 for (
const auto &opt : tagHtmlAttribs)
1659 if (opt.name==
"src" && !opt.value.isEmpty())
1662 HtmlAttribList attrList = tagHtmlAttribs;
1664 attrList.erase(attrList.begin()+index);
1666 children.
append<DocImage>(
1686 Token retval = Token::make_RetVal_OK();
1688 if (doc.
isEmpty())
return retval;
1694 DocPara *lastPar=!children.
empty() ? std::get_if<DocPara>(&children.
back()):
nullptr;
1702 DocPara *par = children.
get_last<DocPara>();
1703 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
1704 retval=par->parse();
1705 if (!par->isEmpty())
1714 }
while (retval.
is(TokenRetval::TK_NEWPARA));
1734 "Possible candidates:\n%s",
qPrint(file),
1742 "Check your EXAMPLE_PATH",
qPrint(file));
1752 bool insideDQuote=
FALSE;
1753 bool insideSQuote=
FALSE;
1755 while (j<len && !
found)
1757 if (!insideSQuote && !insideDQuote)
1761 case '(': round++;
break;
1762 case ')': round--;
break;
1763 case '"': insideDQuote=
TRUE;
break;
1764 case '\'': insideSQuote=
TRUE;
break;
1772 found=(round==0) && (j<8 ||
qstrncmp(data+j-8,
"operator",8)!=0);
1776 else if (insideSQuote)
1778 if (data[j]==
'\'' && (j==0 || data[j]!=
'\\'))
1783 else if (insideDQuote)
1785 if (data[j]==
'"' && (j==0 || data[j]!=
'\\'))
1794 if (
qstrncmp(data+j,
" const",6)==0)
1798 else if (
qstrncmp(data+j,
" volatile",9)==0)
1805 while (k<len && data[k]==
' ') k++;
1806 if (k<len-1 && data[k]==
'&' && data[k+1]==
'&') j=k+2;
1807 else if (k<len && data[k]==
'&' ) j=k+1;
1811 if (j>0 && data[j-1]==
'.') { e--; }
1821#define CHECK_FOR_COMMAND(str,action) \
1822 do if ((i+sizeof(str)<len) && qstrncmp(data+i+1,str,sizeof(str)-1)==0) \
1823 { j=i+sizeof(str); action; } while(0)
1828 if (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\'))
1839 if (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\'))
1864 if ((data[i]==
'@' || data[i]==
'\\') &&
1865 (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\')))
1869 return i+endMarker.
length()+1;
1875 return i<len ? i+1 : len;
1888 if (c==
'@' || c==
'\\')
1895 while (j<len && (data[j]==
' ' || data[j]==
'\t')) j++;
1898 const Definition *def =
nullptr;
1905 "@copy%s or @copydoc target '%s' found but is from a tag file, skipped", isBrief?
"brief":
"details",
1911 auto it = std::find(
context.copyStack.begin(),
context.copyStack.end(),def);
1912 if (it==
context.copyStack.end())
1914 QCString orgFileName =
context.fileName;
1915 context.copyStack.push_back(def);
1916 auto addDocs = [&](
const QCString &file_,
int line_,
const QCString &doc_)
1918 buf.
addStr(
" \\ifile \""+file_+
"\" ");
1919 buf.
addStr(
"\\iline "+QCString().setNum(line_)+
" \\ilinebr ");
1920 size_t len_ = doc_.length();
1941 buf.
addStr(
"\\iline "+QCString().setNum(lineNr)+
" ");
1946 "Found recursive @copy%s or @copydoc relation for argument '%s'.",
1947 isBrief?
"brief":
"details",
qPrint(
id));
1953 "@copy%s or @copydoc target '%s' not found", isBrief?
"brief":
"details",
1967 buf.
addStr(data+orgPos,i-orgPos);
1981 lineNr += (c==
'\n') ? 1 : 0;
1994 const QCString &fileName,
int startLine,
1996 const QCString &input,
bool indexWords,
1997 bool isExample,
const QCString &exampleName,
1998 bool singleLine,
bool linkFromIndex,
1999 bool markdownSupport)
2002 assert(parser!=
nullptr);
2003 if (parser==
nullptr)
return nullptr;
2087 size_t ioLen = input.
length();
2098 auto ast = std::make_unique<DocNodeAST>(
DocRoot(parser,md!=
nullptr,singleLine));
2099 std::get<DocRoot>(ast->root).parse();
2125 assert(parser!=
nullptr);
2126 if (parser==
nullptr)
return nullptr;
2158 auto ast = std::make_unique<DocNodeAST>(
DocText(parser));
2167 std::get<DocText>(ast->root).parse();
2182 assert(parser!=
nullptr);
2183 if (parser==
nullptr)
return nullptr;
2189 return std::make_unique<DocNodeAST>(
DocRef(parser,
nullptr,target,context));
void push_back(const Argument &a)
static bool isFlagSet(const DebugMask mask)
The common base class of all entity definitions found in the sources.
virtual QCString docFile() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual int briefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getReference() const =0
virtual QCString getSourceFileBase() const =0
virtual QCString documentation() const =0
virtual QCString qualifiedName() const =0
virtual QCString briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
void markLast(bool v=TRUE)
bool defaultHandleToken(DocNodeVariant *parent, Token tok, DocNodeList &children, bool handleWord=TRUE)
std::stack< DocParserContext > contextStack
void handleLinkedWord(DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
void handleInternalRef(DocNodeVariant *parent, DocNodeList &children)
void handleParameterType(DocNodeVariant *parent, DocNodeList &children, const QCString ¶mTypes)
QCString findAndCopyImage(const QCString &fileName, DocImage::Type type, bool doWarn=true)
QCString processCopyDoc(const char *data, size_t &len)
void readTextFileByName(const QCString &file, QCString &text)
Token handleAHref(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
Token internalValidatingParseDoc(DocNodeVariant *parent, DocNodeList &children, const QCString &doc)
void handleInitialStyleCommands(DocNodeVariant *parent, DocNodeList &children)
void handleStyleLeave(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName)
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children)
void checkUnOrMultipleDocumentedParams()
bool findDocsForMemberOrCompound(const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef)
void handleImage(DocNodeVariant *parent, DocNodeList &children)
void handleStyleEnter(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
void handlePrefix(DocNodeVariant *parent, DocNodeList &children)
Token handleStyleArgument(DocNodeVariant *parent, DocNodeList &children, const QCString &cmdName)
void handleAnchor(DocNodeVariant *parent, DocNodeList &children)
void handleImg(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
void defaultHandleTitleAndSize(const CommandType cmd, DocNodeVariant *parent, DocNodeList &children, QCString &width, QCString &height)
void handleUnclosedStyleCommands()
void errorHandleDefaultToken(DocNodeVariant *parent, Token tok, DocNodeList &children, const QCString &txt)
Node representing a reference to some item.
Root node of documentation tree.
const HtmlAttribList & attribs() const
static HtmlEntityMapper::SymType decodeSymbol(const QCString &symName)
Root node of a text fragment.
void init(const char *input, const QCString &fileName, bool markdownSupport, bool insideHtmlLink)
void setLineNr(int lineno)
void findSections(const QCString &input, const Definition *d, const QCString &fileName)
static NamespaceLinkedMap * namespaceLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
static NamespaceDefMutable * globalScope
static FileNameLinkedMap * imageNameLinkedMap
static IndexList * indexList
static PageLinkedMap * pageLinkedMap
static FileNameLinkedMap * exampleNameLinkedMap
static SearchIndexIntf searchIndex
static GroupLinkedMap * groupLinkedMap
virtual QCString absFilePath() const =0
virtual QCString groupTitle() const =0
void addStr(const QCString &s)
T & back()
access the last element
void pop_back()
removes the last element
bool empty() const
checks whether the container is empty
Class representing a list of HTML attributes.
void addImageFile(const QCString &name)
const T * find(const std::string &key) const
Find an object given the key.
A model of a class/file/namespace member symbol.
virtual bool isObjCMethod() const =0
virtual const ClassDef * getClassDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual bool isFunction() const =0
virtual QCString objCMethodName(bool localLink, bool showStatic) const =0
virtual const MemberDef * templateMaster() const =0
virtual void detectUndocumentedParams(bool hasParamCommand, bool hasReturnCommand) const =0
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool startsWith(const char *s) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
bool endsWith(const char *s) const
char & at(size_t i)
Returns a reference to the character at index i.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
const std::string & str() const
QCString right(size_t len) const
size_t size() const
Returns the length of the string, not counting the 0-terminator.
QCString & sprintf(const char *format,...)
int findRev(char c, int index=-1, bool cs=TRUE) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
bool is(TokenRetval rv) const
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
TokenRetval value() const
bool is_any_of(ARGS... args) const
char command_to_char() const
ClassDef * getClass(const QCString &n)
#define Config_getBool(name)
#define Config_getString(name)
std::vector< std::string > StringVector
DirIterator end(const DirIterator &) noexcept
#define AUTO_TRACE_ADD(...)
#define AUTO_TRACE_EXIT(...)
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
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
static QCString extractCopyDocId(const char *data, size_t &j, size_t len)
static size_t skipToEndMarker(const char *data, size_t i, size_t len, const QCString &endMarker)
IDocNodeASTPtr validatingParseText(IDocParser &parserIntf, const QCString &input)
IDocParserPtr createDocParser()
factory function to create a parser
IDocNodeASTPtr createRef(IDocParser &parserIntf, const QCString &target, const QCString &context, const QCString &srcFile, int srcLine)
static size_t isVerbatimSection(const char *data, size_t i, size_t len, QCString &endMarker)
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
static size_t isCopyBriefOrDetailsCmd(const char *data, size_t i, size_t len, bool &brief)
#define CHECK_FOR_COMMAND(str, action)
std::unique_ptr< IDocNodeAST > IDocNodeASTPtr
std::unique_ptr< IDocParser > IDocParserPtr
pointer to parser interface
Private header shared between docparser.cpp and docnode.cpp.
IterableStack< const DocNodeVariant * > DocStyleChangeStack
bool insidePRE(const DocNodeVariant *n)
bool insideLI(const DocNodeVariant *n)
FileDef * toFileDef(Definition *d)
GroupDef * toGroupDef(Definition *d)
MemberDef * toMemberDef(Definition *d)
#define warn_incomplete_doc(file, line, fmt,...)
#define warn_doc_error(file, line, fmt,...)
const Mapper< HtmlTagType > * htmlTagMapper
const Mapper< CommandType > * cmdMapper
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
QCString trunc(const QCString &s, size_t numChars=15)
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
PageDef * toPageDef(Definition *d)
Portable versions of functions that are platform dependent.
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
int qstrncmp(const char *str1, const char *str2, size_t len)
const char * qPrint(const char *s)
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
StringMultiSet retvalsFound
DocStyleChangeStack styleStack
StringMultiSet paramsFound
DocStyleChangeStack initialStyleStack
const MemberDef * memberDef
SrcLangExt
Language as given by extension.
QCString removeRedundantWhiteSpace(const QCString &s)
QCString findFilePath(const QCString &file, bool &ambig)
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, bool lookForSpecialization, const FileDef *currentFile, bool checkScope)
QCString relativePathToRoot(const QCString &name)
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
GetDefResult getDefs(const GetDefInput &input)
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
QCString inlineArgListToDoc(const ArgumentList &al)
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
A bunch of utility functions.