Doxygen
DocParser类 参考
+ 类 DocParser 继承关系图:
+ DocParser 的协作图:

Public 成员函数

void pushContext ()
 
void popContext ()
 
void handleImg (DocNode *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
 
int internalValidatingParseDoc (DocNode *parent, DocNodeList &children, const QCString &doc)
 
QCString processCopyDoc (const char *data, uint &len)
 
QCString findAndCopyImage (const QCString &fileName, DocImage::Type type, bool doWarn=true)
 
void checkArgumentName ()
 
void checkRetvalName ()
 
void checkUnOrMultipleDocumentedParams ()
 
bool findDocsForMemberOrCompound (const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef)
 
bool defaultHandleToken (DocNode *parent, int tok, DocNodeList &children, bool handleWord=TRUE)
 
void errorHandleDefaultToken (DocNode *parent, int tok, DocNodeList &children, const QCString &txt)
 
void defaultHandleTitleAndSize (const int cmd, DocNode *parent, DocNodeList &children, QCString &width, QCString &height)
 
int handleStyleArgument (DocNode *parent, DocNodeList &children, const QCString &cmdName)
 
void handleStyleEnter (DocNode *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
 
void handleStyleLeave (DocNode *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName)
 
void handlePendingStyleCommands (DocNode *parent, DocNodeList &children)
 
void handleInitialStyleCommands (DocPara *parent, DocNodeList &children)
 
int handleAHref (DocNode *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
 
void handleUnclosedStyleCommands ()
 
void handleLinkedWord (DocNode *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
 
void handleParameterType (DocNode *parent, DocNodeList &children, const QCString &paramTypes)
 
DocInternalRefhandleInternalRef (DocNode *parent)
 
DocAnchorhandleAnchor (DocNode *parent)
 
void readTextFileByName (const QCString &file, QCString &text)
 
- Public 成员函数 继承自 IDocParser
virtual ~IDocParser ()
 

Public 属性

std::stack< DocParserContextcontextStack
 
DocParserContext context
 
DocTokenizer tokenizer
 

详细描述

在文件 docparser.cpp134 行定义.

成员函数说明

◆ checkArgumentName()

void DocParser::checkArgumentName ( )

Collects the parameters found with @param command in a list context.paramsFound. If the parameter is not an actual parameter of the current member context.memberDef, then a warning is raised (unless warnings are disabled altogether).

在文件 docparser.cpp380 行定义.

381 {
382  if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
383  if (context.memberDef==0) return; // not a member
384  std::string name = context.token->name.str();
389  //printf("isDocsForDefinition()=%d\n",context.memberDef->isDocsForDefinition());
390  if (al.empty()) return; // no argument list
391 
392  static const reg::Ex re(R"(\$?\w+\.*)");
393  reg::Iterator it(name,re);
395  for (; it!=end ; ++it)
396  {
397  const auto &match = *it;
398  QCString aName=match.str();
399  if (lang==SrcLangExt_Fortran) aName=aName.lower();
400  //printf("aName='%s'\n",qPrint(aName));
401  bool found=FALSE;
402  for (const Argument &a : al)
403  {
404  QCString argName = context.memberDef->isDefine() ? a.type : a.name;
405  if (lang==SrcLangExt_Fortran) argName=argName.lower();
406  argName=argName.stripWhiteSpace();
407  //printf("argName='%s' aName=%s\n",qPrint(argName),qPrint(aName));
408  if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
409  if (aName==argName)
410  {
411  context.paramsFound.insert(aName.str());
412  found=TRUE;
413  break;
414  }
415  }
416  if (!found)
417  {
418  //printf("member type=%d\n",context.memberDef->memberType());
420  if (!scope.isEmpty()) scope+="::"; else scope="";
421  QCString inheritedFrom = "";
422  QCString docFile = context.memberDef->docFile();
423  int docLine = context.memberDef->docLine();
424  const MemberDef *inheritedMd = context.memberDef->inheritsDocsFrom();
425  if (inheritedMd) // documentation was inherited
426  {
427  inheritedFrom.sprintf(" inherited from member %s at line "
428  "%d in file %s",qPrint(inheritedMd->name()),
429  inheritedMd->docLine(),qPrint(inheritedMd->docFile()));
430  docFile = context.memberDef->getDefFileName();
431  docLine = context.memberDef->getDefLine();
432  }
433  QCString alStr = argListToString(al);
434  warn_doc_error(docFile,docLine,
435  "argument '%s' of command @param "
436  "is not found in the argument list of %s%s%s%s",
437  qPrint(aName), qPrint(scope), qPrint(context.memberDef->name()),
438  qPrint(alStr), qPrint(inheritedFrom));
439  }
440  }
441 }

引用了 argListToString(), MemberDef::argumentList(), Config_getBool, context, MemberDef::declArgumentList(), Definition::docFile(), Definition::docLine(), ArgumentList::empty(), end(), FALSE, Definition::getDefFileName(), Definition::getDefLine(), Definition::getLanguage(), MemberDef::getScopeString(), MemberDef::inheritsDocsFrom(), MemberDef::isDefine(), MemberDef::isDocsForDefinition(), QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), reg::match(), DocParserContext::memberDef, TokenInfo::name, Definition::name(), DocParserContext::paramsFound, qPrint(), QCString::right(), QCString::sprintf(), SrcLangExt_Fortran, QCString::str(), QCString::stripWhiteSpace(), DocParserContext::token, TRUE , 以及 warn_doc_error().

被这些函数引用 DocParamList::parse() , 以及 DocParamList::parseXml().

◆ checkRetvalName()

void DocParser::checkRetvalName ( )

Collects the return values found with @retval command in a global list g_parserContext.retvalsFound.

在文件 docparser.cpp445 行定义.

446 {
447  QCString name = context.token->name;
448  if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
449  if (context.memberDef==0 || name.isEmpty()) return; // not a member or no valid name
450  if (context.retvalsFound.count(name.str())==1) // only report the first double entry
451  {
454  "%s",
455  qPrint("return value '" + name + "' of " +
457  " has multiple documentation sections"));
458  }
459  context.retvalsFound.insert(name.str());
460 }

引用了 Config_getBool, context, Definition::getDefFileName(), Definition::getDefLine(), QCString::isEmpty(), DocParserContext::memberDef, TokenInfo::name, qPrint(), MemberDef::qualifiedName(), DocParserContext::retvalsFound, QCString::str(), DocParserContext::token , 以及 warn_doc_error().

被这些函数引用 DocParamList::parse() , 以及 DocParamList::parseXml().

◆ checkUnOrMultipleDocumentedParams()

void DocParser::checkUnOrMultipleDocumentedParams ( )

Checks if the parameters that have been specified using @param are indeed all parameters and that a parameter does not have multiple @param blocks. Must be called after checkArgumentName() has been called for each argument.

在文件 docparser.cpp468 行定义.

469 {
471  {
476  if (!al.empty())
477  {
478  ArgumentList undocParams;
479  for (const Argument &a: al)
480  {
481  QCString argName = context.memberDef->isDefine() ? a.type : a.name;
482  if (lang==SrcLangExt_Fortran) argName = argName.lower();
483  argName=argName.stripWhiteSpace();
484  QCString aName = argName;
485  if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
486  if (lang==SrcLangExt_Python && (argName=="self" || argName=="cls"))
487  {
488  // allow undocumented self / cls parameter for Python
489  }
490  else if (!argName.isEmpty())
491  {
492  size_t count = context.paramsFound.count(argName.str());
493  if (count==0 && a.docs.isEmpty())
494  {
495  undocParams.push_back(a);
496  }
497  else if (count>1 && Config_getBool(WARN_IF_DOC_ERROR))
498  {
501  "%s",
502  qPrint("argument '" + aName +
503  "' from the argument list of " +
505  " has multiple @param documentation sections"));
506  }
507  }
508  }
509  if (!undocParams.empty() && Config_getBool(WARN_IF_INCOMPLETE_DOC))
510  {
511  bool first=TRUE;
512  QCString errMsg = "The following parameter";
513  if (undocParams.size()>1) errMsg+="s";
514  errMsg+=" of "+
517  (undocParams.size()>1 ? " are" : " is") + " not documented:\n";
518  for (const Argument &a : undocParams)
519  {
520  QCString argName = context.memberDef->isDefine() ? a.type : a.name;
521  if (lang==SrcLangExt_Fortran) argName = argName.lower();
522  argName=argName.stripWhiteSpace();
523  if (!first) errMsg+="\n";
524  first=FALSE;
525  errMsg+=" parameter '"+argName+"'";
526  }
529  "%s",
530  qPrint(substitute(errMsg,"%","%%")));
531  }
532  }
533  }
534 }

引用了 argListToString(), MemberDef::argumentList(), Config_getBool, context, MemberDef::declArgumentList(), ArgumentList::empty(), FALSE, Definition::getDefFileName(), Definition::getDefLine(), Definition::getLanguage(), DocParserContext::hasParamCommand, MemberDef::isDefine(), MemberDef::isDocsForDefinition(), QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), DocParserContext::memberDef, DocParserContext::paramsFound, ArgumentList::push_back(), qPrint(), MemberDef::qualifiedName(), QCString::right(), ArgumentList::size(), SrcLangExt_Fortran, SrcLangExt_Python, QCString::str(), QCString::stripWhiteSpace(), substitute(), TRUE, warn_doc_error() , 以及 warn_incomplete_doc().

被这些函数引用 validatingParseDoc().

◆ defaultHandleTitleAndSize()

void DocParser::defaultHandleTitleAndSize ( const int  cmd,
DocNode parent,
DocNodeList children,
QCString width,
QCString height 
)

在文件 docparser.cpp1209 行定义.

1210 {
1211  auto ns = AutoNodeStack(*this,parent);
1212 
1213  // parse title
1215  int tok;
1216  while ((tok=tokenizer.lex()))
1217  {
1218  if (tok==TK_WORD && (context.token->name=="width=" || context.token->name=="height="))
1219  {
1220  // special case: no title, but we do have a size indicator
1221  break;
1222  }
1223  if (!defaultHandleToken(parent,tok,children))
1224  {
1225  errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd));
1226  }
1227  }
1228  // parse size attributes
1229  if (tok == 0)
1230  {
1231  tok=tokenizer.lex();
1232  }
1233  while (tok==TK_WHITESPACE || tok==TK_WORD) // there are values following the title
1234  {
1235  if(tok == TK_WORD)
1236  {
1237  if (context.token->name=="width=" || context.token->name=="height=")
1238  {
1241  }
1242 
1243  if (context.token->name=="width")
1244  {
1245  width = context.token->chars;
1246  }
1247  else if (context.token->name=="height")
1248  {
1249  height = context.token->chars;
1250  }
1251  else
1252  {
1253  warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
1255  break;
1256  }
1257  }
1258 
1259  tok=tokenizer.lex();
1260  }
1262 
1263  handlePendingStyleCommands(parent,children);
1264 }

引用了 TokenInfo::chars, Mappers::cmdMapper, context, defaultHandleToken(), errorHandleDefaultToken(), DocParserContext::fileName, DocTokenizer::getLineNr(), handlePendingStyleCommands(), QCString::left(), QCString::length(), DocTokenizer::lex(), TokenInfo::name, qPrint(), DocTokenizer::setStatePara(), DocTokenizer::setStateTitle(), DocTokenizer::setStateTitleAttrValue(), TK_WHITESPACE, TK_WORD, DocParserContext::token, tokenizer , 以及 warn_doc_error().

被这些函数引用 DocPara::handleCommand(), DocImage::parse(), DocDotFile::parse(), DocMscFile::parse() , 以及 DocDiaFile::parse().

◆ defaultHandleToken()

bool DocParser::defaultHandleToken ( DocNode parent,
int  tok,
DocNodeList children,
bool  handleWord = TRUE 
)

在文件 docparser.cpp1277 行定义.

1278 {
1279  DBG(("token %s at %d",DocTokenizer::tokToString(tok),tokenizer.getLineNr()));
1280  if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL ||
1281  tok==TK_COMMAND_AT || tok==TK_COMMAND_BS || tok==TK_HTMLTAG
1282  )
1283  {
1284  DBG((" name=%s",qPrint(context.token->name)));
1285  }
1286  DBG(("\n"));
1287 reparsetoken:
1288  QCString tokenName = context.token->name;
1289  switch (tok)
1290  {
1291  case TK_COMMAND_AT:
1292  // fall through
1293  case TK_COMMAND_BS:
1294  switch (Mappers::cmdMapper->map(tokenName))
1295  {
1296  case CMD_BSLASH:
1297  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_BSlash));
1298  break;
1299  case CMD_AT:
1300  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_At));
1301  break;
1302  case CMD_LESS:
1303  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Less));
1304  break;
1305  case CMD_GREATER:
1306  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Greater));
1307  break;
1308  case CMD_AMP:
1309  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Amp));
1310  break;
1311  case CMD_DOLLAR:
1312  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Dollar));
1313  break;
1314  case CMD_HASH:
1315  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Hash));
1316  break;
1317  case CMD_DCOLON:
1318  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_DoubleColon));
1319  break;
1320  case CMD_PERCENT:
1321  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Percent));
1322  break;
1323  case CMD_NDASH:
1324  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
1325  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
1326  break;
1327  case CMD_MDASH:
1328  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
1329  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
1330  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
1331  break;
1332  case CMD_QUOTE:
1333  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Quot));
1334  break;
1335  case CMD_PUNT:
1336  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Dot));
1337  break;
1338  case CMD_PLUS:
1339  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Plus));
1340  break;
1341  case CMD_MINUS:
1342  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
1343  break;
1344  case CMD_EQUAL:
1345  children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Equal));
1346  break;
1347  case CMD_EMPHASIS:
1348  {
1349  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Italic,tokenName,TRUE));
1350  tok=handleStyleArgument(parent,children,tokenName);
1351  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Italic,tokenName,FALSE));
1352  if (tok!=TK_WORD) children.push_back(std::make_unique<DocWhiteSpace>(*this,parent," "));
1353  if (tok==TK_NEWPARA) goto handlepara;
1354  else if (tok==TK_WORD || tok==TK_HTMLTAG)
1355  {
1356  DBG(("CMD_EMPHASIS: reparsing command %s\n",qPrint(context.token->name)));
1357  goto reparsetoken;
1358  }
1359  }
1360  break;
1361  case CMD_BOLD:
1362  {
1363  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Bold,tokenName,TRUE));
1364  tok=handleStyleArgument(parent,children,tokenName);
1365  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Bold,tokenName,FALSE));
1366  if (tok!=TK_WORD) children.push_back(std::make_unique<DocWhiteSpace>(*this,parent," "));
1367  if (tok==TK_NEWPARA) goto handlepara;
1368  else if (tok==TK_WORD || tok==TK_HTMLTAG)
1369  {
1370  DBG(("CMD_BOLD: reparsing command %s\n",qPrint(context.token->name)));
1371  goto reparsetoken;
1372  }
1373  }
1374  break;
1375  case CMD_CODE:
1376  {
1377  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Code,tokenName,TRUE));
1378  tok=handleStyleArgument(parent,children,tokenName);
1379  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Code,tokenName,FALSE));
1380  if (tok!=TK_WORD) children.push_back(std::make_unique<DocWhiteSpace>(*this,parent," "));
1381  if (tok==TK_NEWPARA) goto handlepara;
1382  else if (tok==TK_WORD || tok==TK_HTMLTAG)
1383  {
1384  DBG(("CMD_CODE: reparsing command %s\n",qPrint(context.token->name)));
1385  goto reparsetoken;
1386  }
1387  }
1388  break;
1389  case CMD_HTMLONLY:
1390  {
1392  tok = tokenizer.lex();
1393  children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::HtmlOnly,context.isExample,context.exampleName,context.token->name=="block"));
1394  if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"htmlonly section ended without end marker");
1396  }
1397  break;
1398  case CMD_MANONLY:
1399  {
1401  tok = tokenizer.lex();
1402  children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::ManOnly,context.isExample,context.exampleName));
1403  if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"manonly section ended without end marker");
1405  }
1406  break;
1407  case CMD_RTFONLY:
1408  {
1410  tok = tokenizer.lex();
1411  children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::RtfOnly,context.isExample,context.exampleName));
1412  if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"rtfonly section ended without end marker");
1414  }
1415  break;
1416  case CMD_LATEXONLY:
1417  {
1419  tok = tokenizer.lex();
1420  children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::LatexOnly,context.isExample,context.exampleName));
1421  if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"latexonly section ended without end marker");
1423  }
1424  break;
1425  case CMD_XMLONLY:
1426  {
1428  tok = tokenizer.lex();
1429  children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::XmlOnly,context.isExample,context.exampleName));
1430  if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"xmlonly section ended without end marker");
1432  }
1433  break;
1434  case CMD_DBONLY:
1435  {
1437  tok = tokenizer.lex();
1438  children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::DocbookOnly,context.isExample,context.exampleName));
1439  if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"docbookonly section ended without end marker");
1441  }
1442  break;
1443  case CMD_FORMULA:
1444  {
1445  children.push_back(std::make_unique<DocFormula>(*this,parent,context.token->id));
1446  }
1447  break;
1448  case CMD_ANCHOR:
1449  {
1450  DocAnchor *anchor = handleAnchor(parent);
1451  if (anchor)
1452  {
1453  children.push_back(std::unique_ptr<DocAnchor>(anchor));
1454  }
1455  }
1456  break;
1457  case CMD_INTERNALREF:
1458  {
1459  DocInternalRef *ref = handleInternalRef(parent);
1460  if (ref)
1461  {
1462  children.push_back(std::unique_ptr<DocInternalRef>(ref));
1463  ref->parse();
1464  }
1466  }
1467  break;
1468  case CMD_SETSCOPE:
1469  {
1470  QCString scope;
1472  (void)tokenizer.lex();
1473  scope = context.token->name;
1474  context.context = scope;
1475  //printf("Found scope='%s'\n",qPrint(scope));
1477  }
1478  break;
1479  case CMD_IMAGE:
1480  ((DocPara *)parent) -> handleImage("image");
1481  break;
1482  default:
1483  return FALSE;
1484  }
1485  break;
1486  case TK_HTMLTAG:
1487  {
1488  switch (Mappers::htmlTagMapper->map(tokenName))
1489  {
1490  case HTML_DIV:
1491  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <div> tag in heading\n");
1492  break;
1493  case HTML_PRE:
1494  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <pre> tag in heading\n");
1495  break;
1496  case HTML_BOLD:
1497  if (!context.token->endTag)
1498  {
1499  handleStyleEnter(parent,children,DocStyleChange::Bold,tokenName,&context.token->attribs);
1500  }
1501  else
1502  {
1503  handleStyleLeave(parent,children,DocStyleChange::Bold,tokenName);
1504  }
1505  break;
1506  case HTML_S:
1507  if (!context.token->endTag)
1508  {
1509  handleStyleEnter(parent,children,DocStyleChange::S,tokenName,&context.token->attribs);
1510  }
1511  else
1512  {
1513  handleStyleLeave(parent,children,DocStyleChange::S,tokenName);
1514  }
1515  break;
1516  case HTML_STRIKE:
1517  if (!context.token->endTag)
1518  {
1519  handleStyleEnter(parent,children,DocStyleChange::Strike,tokenName,&context.token->attribs);
1520  }
1521  else
1522  {
1523  handleStyleLeave(parent,children,DocStyleChange::Strike,tokenName);
1524  }
1525  break;
1526  case HTML_DEL:
1527  if (!context.token->endTag)
1528  {
1529  handleStyleEnter(parent,children,DocStyleChange::Del,tokenName,&context.token->attribs);
1530  }
1531  else
1532  {
1533  handleStyleLeave(parent,children,DocStyleChange::Del,tokenName);
1534  }
1535  break;
1536  case HTML_UNDERLINE:
1537  if (!context.token->endTag)
1538  {
1539  handleStyleEnter(parent,children,DocStyleChange::Underline,tokenName,&context.token->attribs);
1540  }
1541  else
1542  {
1543  handleStyleLeave(parent,children,DocStyleChange::Underline,tokenName);
1544  }
1545  break;
1546  case HTML_INS:
1547  if (!context.token->endTag)
1548  {
1549  handleStyleEnter(parent,children,DocStyleChange::Ins,tokenName,&context.token->attribs);
1550  }
1551  else
1552  {
1553  handleStyleLeave(parent,children,DocStyleChange::Ins,tokenName);
1554  }
1555  break;
1556  case HTML_CODE:
1557  case XML_C:
1558  if (!context.token->endTag)
1559  {
1560  handleStyleEnter(parent,children,DocStyleChange::Code,tokenName,&context.token->attribs);
1561  }
1562  else
1563  {
1564  handleStyleLeave(parent,children,DocStyleChange::Code,tokenName);
1565  }
1566  break;
1567  case HTML_EMPHASIS:
1568  if (!context.token->endTag)
1569  {
1570  handleStyleEnter(parent,children,DocStyleChange::Italic,tokenName,&context.token->attribs);
1571  }
1572  else
1573  {
1574  handleStyleLeave(parent,children,DocStyleChange::Italic,tokenName);
1575  }
1576  break;
1577  case HTML_SUB:
1578  if (!context.token->endTag)
1579  {
1580  handleStyleEnter(parent,children,DocStyleChange::Subscript,tokenName,&context.token->attribs);
1581  }
1582  else
1583  {
1584  handleStyleLeave(parent,children,DocStyleChange::Subscript,tokenName);
1585  }
1586  break;
1587  case HTML_SUP:
1588  if (!context.token->endTag)
1589  {
1590  handleStyleEnter(parent,children,DocStyleChange::Superscript,tokenName,&context.token->attribs);
1591  }
1592  else
1593  {
1594  handleStyleLeave(parent,children,DocStyleChange::Superscript,tokenName);
1595  }
1596  break;
1597  case HTML_CENTER:
1598  if (!context.token->endTag)
1599  {
1600  handleStyleEnter(parent,children,DocStyleChange::Center,tokenName,&context.token->attribs);
1601  }
1602  else
1603  {
1604  handleStyleLeave(parent,children,DocStyleChange::Center,tokenName);
1605  }
1606  break;
1607  case HTML_SMALL:
1608  if (!context.token->endTag)
1609  {
1610  handleStyleEnter(parent,children,DocStyleChange::Small,tokenName,&context.token->attribs);
1611  }
1612  else
1613  {
1614  handleStyleLeave(parent,children,DocStyleChange::Small,tokenName);
1615  }
1616  break;
1617  case HTML_IMG:
1618  if (!context.token->endTag)
1619  handleImg(parent,children,context.token->attribs);
1620  break;
1621  default:
1622  return FALSE;
1623  break;
1624  }
1625  }
1626  break;
1627  case TK_SYMBOL:
1628  {
1630  if (s!=DocSymbol::Sym_Unknown)
1631  {
1632  children.push_back(std::make_unique<DocSymbol>(*this,parent,s));
1633  }
1634  else
1635  {
1636  return FALSE;
1637  }
1638  }
1639  break;
1640  case TK_WHITESPACE:
1641  case TK_NEWPARA:
1642 handlepara:
1643  if (insidePRE(parent) || !children.empty())
1644  {
1645  children.push_back(std::make_unique<DocWhiteSpace>(*this,parent,context.token->chars));
1646  }
1647  break;
1648  case TK_LNKWORD:
1649  if (handleWord)
1650  {
1651  handleLinkedWord(parent,children);
1652  }
1653  else
1654  return FALSE;
1655  break;
1656  case TK_WORD:
1657  if (handleWord)
1658  {
1659  children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
1660  }
1661  else
1662  return FALSE;
1663  break;
1664  case TK_URL:
1665  if (context.insideHtmlLink)
1666  {
1667  children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
1668  }
1669  else
1670  {
1671  children.push_back(std::make_unique<DocURL>(*this,parent,context.token->name,context.token->isEMailAddr));
1672  }
1673  break;
1674  default:
1675  return FALSE;
1676  }
1677  return TRUE;
1678 }

引用了 TokenInfo::attribs, DocStyleChange::Bold, DocStyleChange::Center, TokenInfo::chars, CMD_AMP, CMD_ANCHOR, CMD_AT, CMD_BOLD, CMD_BSLASH, CMD_CODE, CMD_DBONLY, CMD_DCOLON, CMD_DOLLAR, CMD_EMPHASIS, CMD_EQUAL, CMD_FORMULA, CMD_GREATER, CMD_HASH, CMD_HTMLONLY, CMD_IMAGE, CMD_INTERNALREF, CMD_LATEXONLY, CMD_LESS, CMD_MANONLY, CMD_MDASH, CMD_MINUS, CMD_NDASH, CMD_PERCENT, CMD_PLUS, CMD_PUNT, CMD_QUOTE, CMD_RTFONLY, CMD_SETSCOPE, CMD_XMLONLY, Mappers::cmdMapper, DocStyleChange::Code, DocParserContext::context, context, DBG, DocSymbol::decodeSymbol(), DocStyleChange::Del, DocVerbatim::DocbookOnly, TokenInfo::endTag, DocParserContext::exampleName, FALSE, DocParserContext::fileName, DocTokenizer::getLineNr(), handleAnchor(), handleImg(), handleInternalRef(), handleLinkedWord(), handleStyleArgument(), handleStyleEnter(), handleStyleLeave(), HTML_BOLD, HTML_CENTER, HTML_CODE, HTML_DEL, HTML_DIV, HTML_EMPHASIS, HTML_IMG, HTML_INS, HTML_PRE, HTML_S, HTML_SMALL, HTML_STRIKE, HTML_SUB, HTML_SUP, HTML_UNDERLINE, DocVerbatim::HtmlOnly, Mappers::htmlTagMapper, TokenInfo::id, DocStyleChange::Ins, DocParserContext::insideHtmlLink, insidePRE(), TokenInfo::isEMailAddr, DocParserContext::isExample, DocStyleChange::Italic, DocVerbatim::LatexOnly, DocTokenizer::lex(), DocVerbatim::ManOnly, TokenInfo::name, DocParserContext::nodeStack, DocInternalRef::parse(), qPrint(), DocVerbatim::RtfOnly, DocStyleChange::S, DocTokenizer::setStateDbOnly(), DocTokenizer::setStateHtmlOnly(), DocTokenizer::setStateLatexOnly(), DocTokenizer::setStateManOnly(), DocTokenizer::setStatePara(), DocTokenizer::setStateRtfOnly(), DocTokenizer::setStateSetScope(), DocTokenizer::setStateXmlOnly(), DocStyleChange::Small, DocStyleChange::Strike, DocStyleChange::Subscript, DocStyleChange::Superscript, DocSymbol::Sym_Amp, DocSymbol::Sym_At, DocSymbol::Sym_BSlash, DocSymbol::Sym_Dollar, DocSymbol::Sym_Dot, DocSymbol::Sym_DoubleColon, DocSymbol::Sym_Equal, DocSymbol::Sym_Greater, DocSymbol::Sym_Hash, DocSymbol::Sym_Less, DocSymbol::Sym_Minus, DocSymbol::Sym_Percent, DocSymbol::Sym_Plus, DocSymbol::Sym_Quot, DocSymbol::Sym_Unknown, TK_COMMAND_AT, TK_COMMAND_BS, TK_HTMLTAG, TK_LNKWORD, TK_NEWPARA, TK_SYMBOL, TK_URL, TK_WHITESPACE, TK_WORD, DocParserContext::token, tokenizer, DocTokenizer::tokToString(), TRUE, DocStyleChange::Underline, TokenInfo::verb, warn_doc_error(), XML_C , 以及 DocVerbatim::XmlOnly.

被这些函数引用 defaultHandleTitleAndSize(), handleStyleArgument(), DocPara::injectToken(), DocTitle::parse(), DocVhdlFlow::parse(), DocLink::parse(), DocRef::parse(), DocInternalRef::parse(), DocHRef::parse(), DocHtmlHeader::parse(), DocHtmlDescTitle::parse(), DocSecRefItem::parse() , 以及 DocHtmlCaption::parse().

◆ errorHandleDefaultToken()

void DocParser::errorHandleDefaultToken ( DocNode parent,
int  tok,
DocNodeList children,
const QCString txt 
)

在文件 docparser.cpp775 行定义.

777 {
778  const char *cmd_start = "\\";
779  switch (tok)
780  {
781  case TK_COMMAND_AT:
782  cmd_start = "@";
783  // fall through
784  case TK_COMMAND_BS:
785  children.push_back(std::make_unique<DocWord>(*this,parent,TK_COMMAND_CHAR(tok) + context.token->name));
786  warn_doc_error(context.fileName,tokenizer.getLineNr(),"Illegal command %s as part of a %s",
787  qPrint(cmd_start + context.token->name),qPrint(txt));
788  break;
789  case TK_SYMBOL:
790  warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported symbol %s found found as part of a %s",
791  qPrint(context.token->name), qPrint(txt));
792  break;
793  default:
794  children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
795  warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unexpected token %s found as part of a %s",
796  DocTokenizer::tokToString(tok), qPrint(txt));
797  break;
798  }
799 }

引用了 context, DocParserContext::fileName, DocTokenizer::getLineNr(), TokenInfo::name, qPrint(), TK_COMMAND_AT, TK_COMMAND_BS, TK_COMMAND_CHAR, TK_SYMBOL, DocParserContext::token, tokenizer, DocTokenizer::tokToString() , 以及 warn_doc_error().

被这些函数引用 defaultHandleTitleAndSize(), handleStyleArgument(), DocTitle::parse(), DocVhdlFlow::parse(), DocRef::parse(), DocInternalRef::parse(), DocHRef::parse(), DocHtmlHeader::parse(), DocSecRefItem::parse() , 以及 DocHtmlCaption::parse().

◆ findAndCopyImage()

QCString DocParser::findAndCopyImage ( const QCString fileName,
DocImage::Type  type,
bool  doWarn = true 
)

search for an image in the imageNameDict and if found copies the image to the output directory (which depends on the type parameter).

在文件 docparser.cpp266 行定义.

267 {
268  QCString result;
269  bool ambig;
270  FileDef *fd = findFileDef(Doxygen::imageNameLinkedMap,fileName,ambig);
271  //printf("Search for %s\n",fileName);
272  if (fd)
273  {
274  if (ambig & doWarn)
275  {
276  QCString text;
277  text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
278  text+="Possible candidates:\n";
281  }
282 
283  QCString inputFile = fd->absFilePath();
284  FileInfo infi(inputFile.str());
285  if (infi.exists())
286  {
287  result = fileName;
288  int i;
289  if ((i=result.findRev('/'))!=-1 || (i=result.findRev('\\'))!=-1)
290  {
291  result = result.right((int)result.length()-i-1);
292  }
293  //printf("fileName=%s result=%s\n",fileName,qPrint(result));
294  QCString outputDir;
295  switch(type)
296  {
297  case DocImage::Html:
298  if (!Config_getBool(GENERATE_HTML)) return result;
299  outputDir = Config_getString(HTML_OUTPUT);
300  break;
301  case DocImage::Latex:
302  if (!Config_getBool(GENERATE_LATEX)) return result;
303  outputDir = Config_getString(LATEX_OUTPUT);
304  break;
305  case DocImage::DocBook:
306  if (!Config_getBool(GENERATE_DOCBOOK)) return result;
307  outputDir = Config_getString(DOCBOOK_OUTPUT);
308  break;
309  case DocImage::Rtf:
310  if (!Config_getBool(GENERATE_RTF)) return result;
311  outputDir = Config_getString(RTF_OUTPUT);
312  break;
313  case DocImage::Xml:
314  if (!Config_getBool(GENERATE_XML)) return result;
315  outputDir = Config_getString(XML_OUTPUT);
316  break;
317  }
318  QCString outputFile = outputDir+"/"+result;
319  FileInfo outfi(outputFile.str());
320  if (outfi.isSymLink())
321  {
322  Dir().remove(outputFile.str());
324  "destination of image %s is a symlink, replacing with image",
325  qPrint(outputFile));
326  }
327  if (outputFile!=inputFile) // prevent copying to ourself
328  {
329  if (copyFile(inputFile,outputFile) && type==DocImage::Html)
330  {
332  }
333  }
334  }
335  else
336  {
338  "could not open image %s",qPrint(fileName));
339  }
340 
341  if (type==DocImage::Latex && Config_getBool(USE_PDFLATEX) &&
342  fd->name().right(4)==".eps"
343  )
344  { // we have an .eps image in pdflatex mode => convert it to a pdf.
345  QCString outputDir = Config_getString(LATEX_OUTPUT);
346  QCString baseName = fd->name().left(fd->name().length()-4);
347  QCString epstopdfArgs(4096);
348  epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
349  qPrint(outputDir), qPrint(baseName),
350  qPrint(outputDir), qPrint(baseName));
352  if (Portable::system("epstopdf",epstopdfArgs)!=0)
353  {
354  err("Problems running epstopdf. Check your TeX installation!\n");
355  }
357  return baseName;
358  }
359  }
360  else
361  {
362  result=fileName;
363  if (result.left(5)!="http:" && result.left(6)!="https:" && doWarn)
364  {
366  "image file %s is not found in IMAGE_PATH: "
367  "assuming external image.",qPrint(fileName)
368  );
369  }
370  }
371  return result;
372 }

引用了 FileDef::absFilePath(), IndexList::addImageFile(), Config_getBool, Config_getString, context, copyFile(), DocImage::DocBook, err(), FileInfo::exists(), DocParserContext::fileName, findFileDef(), QCString::findRev(), DocTokenizer::getLineNr(), DocImage::Html, Doxygen::imageNameLinkedMap, Doxygen::indexList, FileInfo::isSymLink(), DocImage::Latex, QCString::left(), QCString::length(), FileDef::name(), qPrint(), Dir::remove(), QCString::right(), DocImage::Rtf, showFileDefMatches(), QCString::sprintf(), QCString::str(), Portable::system(), Portable::sysTimerStart(), Portable::sysTimerStop(), tokenizer, warn_doc_error() , 以及 DocImage::Xml.

被这些函数引用 DocPara::handleImage() , 以及 handleImg().

◆ findDocsForMemberOrCompound()

bool DocParser::findDocsForMemberOrCompound ( const QCString commandName,
QCString pDoc,
QCString pBrief,
const Definition **  pDef 
)

Looks for a documentation block with name commandName in the current context (g_parserContext.context). The resulting documentation string is put in pDoc, the definition in which the documentation was found is put in pDef.

返回值
TRUEif name was found.
FALSEif name was not found.

在文件 docparser.cpp629 行定义.

633 {
634  //printf("findDocsForMemberOrCompound(%s)\n",commandName);
635  *pDoc="";
636  *pBrief="";
637  *pDef=0;
638  QCString cmdArg=commandName;
639  if (cmdArg.isEmpty()) return FALSE;
640 
641  const FileDef *fd=0;
642  const GroupDef *gd=0;
643  const PageDef *pd=0;
644  gd = Doxygen::groupLinkedMap->find(cmdArg);
645  if (gd) // group
646  {
647  *pDoc=gd->documentation();
648  *pBrief=gd->briefDescription();
649  *pDef=gd;
650  return TRUE;
651  }
652  pd = Doxygen::pageLinkedMap->find(cmdArg);
653  if (pd) // page
654  {
655  *pDoc=pd->documentation();
656  *pBrief=pd->briefDescription();
657  *pDef=pd;
658  return TRUE;
659  }
660  bool ambig;
661  fd = findFileDef(Doxygen::inputNameLinkedMap,cmdArg,ambig);
662  if (fd && !ambig) // file
663  {
664  *pDoc=fd->documentation();
665  *pBrief=fd->briefDescription();
666  *pDef=fd;
667  return TRUE;
668  }
669 
670  // for symbols we need to normalize the separator, so A#B, or A\B, or A.B becomes A::B
671  cmdArg = substitute(cmdArg,"#","::");
672  cmdArg = substitute(cmdArg,"\\","::");
673  static bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
674  if (extractAnonNs &&
675  cmdArg.startsWith("anonymous_namespace{")
676  )
677  {
678  size_t rightBracePos = cmdArg.find("}", static_cast<int>(qstrlen("anonymous_namespace{")));
679  QCString leftPart = cmdArg.left(rightBracePos + 1);
680  QCString rightPart = cmdArg.right(cmdArg.size() - rightBracePos - 1);
681  rightPart = substitute(rightPart, ".", "::");
682  cmdArg = leftPart + rightPart;
683  }
684  else
685  {
686  cmdArg = substitute(cmdArg,".","::");
687  }
688 
689  int l=(int)cmdArg.length();
690 
691  int funcStart=cmdArg.find('(');
692  if (funcStart==-1)
693  {
694  funcStart=l;
695  }
696  else
697  {
698  // Check for the case of operator() and the like.
699  // beware of scenarios like operator()((foo)bar)
700  int secondParen = cmdArg.find('(', funcStart+1);
701  int leftParen = cmdArg.find(')', funcStart+1);
702  if (leftParen!=-1 && secondParen!=-1)
703  {
704  if (leftParen<secondParen)
705  {
706  funcStart=secondParen;
707  }
708  }
709  }
710 
711  QCString name=removeRedundantWhiteSpace(cmdArg.left(funcStart));
712  QCString args=cmdArg.right(l-funcStart);
713  // try if the link is to a member
714  const MemberDef *md=0;
715  const ClassDef *cd=0;
716  const NamespaceDef *nd=0;
717  bool found = getDefs(
718  context.context.find('.')==-1?context.context:QCString(), // find('.') is a hack to detect files
719  name,
720  args.isEmpty() ? QCString() : args,
721  md,cd,fd,nd,gd,FALSE,0,TRUE);
722  //printf("found=%d context=%s name=%s\n",found,qPrint(context.context),qPrint(name));
723  if (found && md)
724  {
725  *pDoc=md->documentation();
726  *pBrief=md->briefDescription();
727  *pDef=md;
728  return TRUE;
729  }
730 
731 
732  int scopeOffset=(int)context.context.length();
733  do // for each scope
734  {
735  QCString fullName=cmdArg;
736  if (scopeOffset>0)
737  {
738  fullName.prepend(context.context.left(scopeOffset)+"::");
739  }
740  //printf("Trying fullName='%s'\n",qPrint(fullName));
741 
742  // try class, namespace, group, page, file reference
743  cd = Doxygen::classLinkedMap->find(fullName);
744  if (cd) // class
745  {
746  *pDoc=cd->documentation();
747  *pBrief=cd->briefDescription();
748  *pDef=cd;
749  return TRUE;
750  }
751  nd = Doxygen::namespaceLinkedMap->find(fullName);
752  if (nd) // namespace
753  {
754  *pDoc=nd->documentation();
755  *pBrief=nd->briefDescription();
756  *pDef=nd;
757  return TRUE;
758  }
759  if (scopeOffset==0)
760  {
761  scopeOffset=-1;
762  }
763  else
764  {
765  scopeOffset = context.context.findRev("::",scopeOffset-1);
766  if (scopeOffset==-1) scopeOffset=0;
767  }
768  } while (scopeOffset>=0);
769 
770 
771  return FALSE;
772 }

引用了 Definition::briefDescription(), MemberDef::briefDescription(), Doxygen::classLinkedMap, Config_getBool, DocParserContext::context, context, Definition::documentation(), MemberDef::documentation(), FALSE, LinkedMap< T, Hash, KeyEqual, Map >::find(), QCString::find(), findFileDef(), QCString::findRev(), getDefs(), Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, QCString::isEmpty(), QCString::left(), QCString::length(), Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap, QCString::prepend(), qstrlen(), removeRedundantWhiteSpace(), QCString::right(), QCString::size(), QCString::startsWith(), substitute() , 以及 TRUE.

被这些函数引用 processCopyDoc().

◆ handleAHref()

int DocParser::handleAHref ( DocNode parent,
DocNodeList children,
const HtmlAttribList tagHtmlAttribs 
)

在文件 docparser.cpp937 行定义.

939 {
940  uint index=0;
941  int retval = RetVal_OK;
942  for (const auto &opt : tagHtmlAttribs)
943  {
944  if (opt.name=="name" || opt.name=="id") // <a name=label> or <a id=label> tag
945  {
946  if (!opt.value.isEmpty())
947  {
948  children.push_back(std::make_unique<DocAnchor>(*this,parent,opt.value,TRUE));
949  break; // stop looking for other tag attribs
950  }
951  else
952  {
953  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <a> tag with name option but without value!");
954  }
955  }
956  else if (opt.name=="href") // <a href=url>..</a> tag
957  {
958  // copy attributes
959  HtmlAttribList attrList = tagHtmlAttribs;
960  // and remove the href attribute
961  attrList.erase(attrList.begin()+index);
962  QCString relPath;
963  if (opt.value.at(0) != '#') relPath = context.relPath;
964  DocHRef *href = new DocHRef(*this,parent,attrList,opt.value,relPath,convertNameToFile(context.fileName,FALSE,TRUE));
965  children.push_back(std::unique_ptr<DocHRef>(href));
967  retval = href->parse();
969  break;
970  }
971  else // unsupported option for tag a
972  {
973  }
974  ++index;
975  }
976  return retval;
977 }

引用了 context, convertNameToFile(), FALSE, DocParserContext::fileName, DocTokenizer::getLineNr(), DocParserContext::insideHtmlLink, DocHRef::parse(), DocParserContext::relPath, RetVal_OK, tokenizer, TRUE , 以及 warn_doc_error().

被这些函数引用 DocPara::handleHtmlStartTag(), DocHtmlHeader::parse() , 以及 DocHtmlDescTitle::parse().

◆ handleAnchor()

DocAnchor * DocParser::handleAnchor ( DocNode parent)

在文件 docparser.cpp1172 行定义.

1173 {
1174  int tok=tokenizer.lex();
1175  if (tok!=TK_WHITESPACE)
1176  {
1177  warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
1178  qPrint(context.token->name));
1179  return 0;
1180  }
1182  tok=tokenizer.lex();
1183  if (tok==0)
1184  {
1185  warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
1186  "argument of command %s",qPrint(context.token->name));
1187  return 0;
1188  }
1189  else if (tok!=TK_WORD && tok!=TK_LNKWORD)
1190  {
1191  warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
1193  return 0;
1194  }
1196  return new DocAnchor(*this,parent,context.token->name,FALSE);
1197 }

引用了 context, FALSE, DocParserContext::fileName, DocTokenizer::getLineNr(), DocTokenizer::lex(), TokenInfo::name, qPrint(), DocTokenizer::setStateAnchor(), DocTokenizer::setStatePara(), TK_LNKWORD, TK_WHITESPACE, TK_WORD, DocParserContext::token, tokenizer, DocTokenizer::tokToString() , 以及 warn_doc_error().

被这些函数引用 defaultHandleToken() , 以及 DocPara::handleCommand().

◆ handleImg()

void DocParser::handleImg ( DocNode parent,
DocNodeList children,
const HtmlAttribList tagHtmlAttribs 
)

在文件 docparser.cpp1682 行定义.

1683 {
1684  bool found=FALSE;
1685  uint index=0;
1686  for (const auto &opt : tagHtmlAttribs)
1687  {
1688  //printf("option name=%s value=%s\n",qPrint(opt.name),qPrint(opt.value));
1689  if (opt.name=="src" && !opt.value.isEmpty())
1690  {
1691  // copy attributes
1692  HtmlAttribList attrList = tagHtmlAttribs;
1693  // and remove the src attribute
1694  attrList.erase(attrList.begin()+index);
1696  children.push_back(
1697  std::make_unique<DocImage>(
1698  *this,parent,attrList,
1699  findAndCopyImage(opt.value,t,false),
1700  t,opt.value));
1701  found = TRUE;
1702  }
1703  ++index;
1704  }
1705  if (!found)
1706  {
1707  warn_doc_error(context.fileName,tokenizer.getLineNr(),"IMG tag does not have a SRC attribute!\n");
1708  }
1709 }

引用了 context, FALSE, DocParserContext::fileName, findAndCopyImage(), DocTokenizer::getLineNr(), DocImage::Html, tokenizer, TRUE , 以及 warn_doc_error().

被这些函数引用 defaultHandleToken() , 以及 DocPara::handleHtmlStartTag().

◆ handleInitialStyleCommands()

void DocParser::handleInitialStyleCommands ( DocPara parent,
DocNodeList children 
)

在文件 docparser.cpp927 行定义.

928 {
929  while (!context.initialStyleStack.empty())
930  {
931  const DocStyleChange *sc = context.initialStyleStack.top();
932  handleStyleEnter(parent,children,sc->style(),sc->tagName(),&sc->attribs());
934  }
935 }

引用了 DocStyleChange::attribs(), context, handleStyleEnter(), DocParserContext::initialStyleStack, DocStyleChange::style() , 以及 DocStyleChange::tagName().

被这些函数引用 DocPara::parse().

◆ handleInternalRef()

DocInternalRef * DocParser::handleInternalRef ( DocNode parent)

在文件 docparser.cpp1150 行定义.

1151 {
1152  //printf("CMD_INTERNALREF\n");
1153  int tok=tokenizer.lex();
1154  QCString tokenName = context.token->name;
1155  if (tok!=TK_WHITESPACE)
1156  {
1157  warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
1158  qPrint(tokenName));
1159  return 0;
1160  }
1162  tok=tokenizer.lex(); // get the reference id
1163  if (tok!=TK_WORD && tok!=TK_LNKWORD)
1164  {
1165  warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
1166  DocTokenizer::tokToString(tok),qPrint(tokenName));
1167  return 0;
1168  }
1169  return new DocInternalRef(*this,parent,context.token->name);
1170 }

引用了 context, DocParserContext::fileName, DocTokenizer::getLineNr(), DocTokenizer::lex(), TokenInfo::name, qPrint(), DocTokenizer::setStateInternalRef(), TK_LNKWORD, TK_WHITESPACE, TK_WORD, DocParserContext::token, tokenizer, DocTokenizer::tokToString() , 以及 warn_doc_error().

被这些函数引用 defaultHandleToken() , 以及 DocPara::handleCommand().

◆ handleLinkedWord()

void DocParser::handleLinkedWord ( DocNode parent,
DocNodeList children,
bool  ignoreAutoLinkFlag = FALSE 
)

在文件 docparser.cpp1015 行定义.

1016 {
1018  static bool autolinkSupport = Config_getBool(AUTOLINK_SUPPORT);
1019  if (!autolinkSupport && !ignoreAutoLinkFlag) // no autolinking -> add as normal word
1020  {
1021  children.push_back(std::make_unique<DocWord>(*this,parent,name));
1022  return;
1023  }
1024 
1025  // ------- try to turn the word 'name' into a link
1026 
1027  const Definition *compound=0;
1028  const MemberDef *member=0;
1029  uint len = context.token->name.length();
1030  ClassDef *cd=0;
1031  bool ambig;
1033  //printf("handleLinkedWord(%s) context.context=%s\n",qPrint(context.token->name),qPrint(context.context));
1034  if (!context.insideHtmlLink &&
1036  || (!context.context.isEmpty() && // also try with global scope
1037  resolveRef("",context.token->name,context.inSeeBlock,&compound,&member,FALSE,0,TRUE))
1038  )
1039  )
1040  {
1041  //printf("resolveRef %s = %p (linkable?=%d)\n",qPrint(context.token->name),member,member ? member->isLinkable() : FALSE);
1042  if (member && member->isLinkable()) // member link
1043  {
1044  if (member->isObjCMethod())
1045  {
1046  bool localLink = context.memberDef ? member->getClassDef()==context.memberDef->getClassDef() : FALSE;
1047  name = member->objCMethodName(localLink,context.inSeeBlock);
1048  }
1049  children.push_back(
1050  std::make_unique<DocLinkedWord>(
1051  *this,parent,name,
1052  member->getReference(),
1053  member->getOutputFileBase(),
1054  member->anchor(),
1055  member->briefDescriptionAsTooltip()));
1056  }
1057  else if (compound->isLinkable()) // compound link
1058  {
1059  QCString anchor = compound->anchor();
1060  if (compound->definitionType()==Definition::TypeFile)
1061  {
1062  name=context.token->name;
1063  }
1064  else if (compound->definitionType()==Definition::TypeGroup)
1065  {
1066  name=toGroupDef(compound)->groupTitle();
1067  }
1068  children.push_back(
1069  std::make_unique<DocLinkedWord>(
1070  *this,parent,name,
1071  compound->getReference(),
1072  compound->getOutputFileBase(),
1073  anchor,
1074  compound->briefDescriptionAsTooltip()));
1075  }
1076  else if (compound->definitionType()==Definition::TypeFile &&
1077  (toFileDef(compound))->generateSourceFile()
1078  ) // undocumented file that has source code we can link to
1079  {
1080  children.push_back(
1081  std::make_unique<DocLinkedWord>(
1082  *this,parent,context.token->name,
1083  compound->getReference(),
1084  compound->getSourceFileBase(),
1085  "",
1086  compound->briefDescriptionAsTooltip()));
1087  }
1088  else // not linkable
1089  {
1090  children.push_back(std::make_unique<DocWord>(*this,parent,name));
1091  }
1092  }
1093  else if (!context.insideHtmlLink && len>1 && context.token->name.at(len-1)==':')
1094  {
1095  // special case, where matching Foo: fails to be an Obj-C reference,
1096  // but Foo itself might be linkable.
1097  context.token->name=context.token->name.left(len-1);
1098  handleLinkedWord(parent,children,ignoreAutoLinkFlag);
1099  children.push_back(std::make_unique<DocWord>(*this,parent,":"));
1100  }
1101  else if (!context.insideHtmlLink && (cd=getClass(context.token->name+"-p")))
1102  {
1103  // special case 2, where the token name is not a class, but could
1104  // be a Obj-C protocol
1105  children.push_back(
1106  std::make_unique<DocLinkedWord>(
1107  *this,parent,name,
1108  cd->getReference(),
1109  cd->getOutputFileBase(),
1110  cd->anchor(),
1111  cd->briefDescriptionAsTooltip()));
1112  }
1113  else // normal non-linkable word
1114  {
1115  if (context.token->name.left(1)=="#" || context.token->name.left(2)=="::")
1116  {
1117  warn_doc_error(context.fileName,tokenizer.getLineNr(),"explicit link request to '%s' could not be resolved",qPrint(name));
1118  children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
1119  }
1120  else
1121  {
1122  children.push_back(std::make_unique<DocWord>(*this,parent,name));
1123  }
1124  }
1125 }

引用了 MemberDef::anchor(), Definition::anchor(), ClassDef::anchor(), QCString::at(), Definition::briefDescriptionAsTooltip(), Config_getBool, DocParserContext::context, context, Definition::definitionType(), FALSE, DocParserContext::fileName, findFileDef(), getClass(), MemberDef::getClassDef(), DocTokenizer::getLineNr(), MemberDef::getOutputFileBase(), ClassDef::getOutputFileBase(), Definition::getOutputFileBase(), MemberDef::getReference(), ClassDef::getReference(), Definition::getReference(), Definition::getSourceFileBase(), GroupDef::groupTitle(), Doxygen::inputNameLinkedMap, DocParserContext::inSeeBlock, DocParserContext::insideHtmlLink, QCString::isEmpty(), MemberDef::isLinkable(), Definition::isLinkable(), MemberDef::isObjCMethod(), QCString::left(), QCString::length(), linkToText(), DocParserContext::memberDef, TokenInfo::name, MemberDef::objCMethodName(), qPrint(), resolveRef(), SrcLangExt_Unknown, toFileDef(), toGroupDef(), DocParserContext::token, tokenizer, TRUE, Definition::TypeFile, Definition::TypeGroup , 以及 warn_doc_error().

被这些函数引用 defaultHandleToken(), DocPara::handleHtmlStartTag(), handleParameterType(), DocPara::parse(), DocParamList::parse() , 以及 DocParamList::parseXml().

◆ handleParameterType()

void DocParser::handleParameterType ( DocNode parent,
DocNodeList children,
const QCString paramTypes 
)

在文件 docparser.cpp1127 行定义.

1128 {
1129  QCString name = context.token->name; // save token name
1130  QCString name1;
1131  int p=0,i,ii;
1132  while ((i=paramTypes.find('|',p))!=-1)
1133  {
1134  name1 = paramTypes.mid(p,i-p);
1135  ii=name1.find('[');
1136  context.token->name=ii!=-1 ? name1.mid(0,ii) : name1; // take part without []
1137  handleLinkedWord(parent,children);
1138  if (ii!=-1) children.push_back(std::make_unique<DocWord>(*this,parent,name1.mid(ii))); // add [] part
1139  p=i+1;
1140  children.push_back(std::make_unique<DocSeparator>(*this,parent,"|"));
1141  }
1142  name1 = paramTypes.mid(p);
1143  ii=name1.find('[');
1144  context.token->name=ii!=-1 ? name1.mid(0,ii) : name1;
1145  handleLinkedWord(parent,children);
1146  if (ii!=-1) children.push_back(std::make_unique<DocWord>(*this,parent,name1.mid(ii)));
1147  context.token->name = name; // restore original token name
1148 }

引用了 context, QCString::find(), handleLinkedWord(), QCString::mid(), TokenInfo::name , 以及 DocParserContext::token.

被这些函数引用 DocParamList::parse().

◆ handlePendingStyleCommands()

void DocParser::handlePendingStyleCommands ( DocNode parent,
DocNodeList children 
)

Called at the end of a paragraph to close all open style changes (e.g. a without a ). The closed styles are pushed onto a stack and entered again at the start of a new paragraph.

在文件 docparser.cpp912 行定义.

913 {
914  if (!context.styleStack.empty())
915  {
916  const DocStyleChange *sc = context.styleStack.top();
917  while (sc && sc->position()>=context.nodeStack.size())
918  { // there are unclosed style modifiers in the paragraph
919  children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),sc->style(),sc->tagName(),FALSE));
920  context.initialStyleStack.push(sc);
921  context.styleStack.pop();
922  sc = !context.styleStack.empty() ? context.styleStack.top() : 0;
923  }
924  }
925 }

引用了 context, FALSE, DocParserContext::initialStyleStack, DocParserContext::nodeStack, DocStyleChange::position(), DocStyleChange::style(), DocParserContext::styleStack , 以及 DocStyleChange::tagName().

被这些函数引用 defaultHandleTitleAndSize(), DocTitle::parse(), DocVhdlFlow::parse(), DocLink::parse(), DocRef::parse(), DocInternalRef::parse(), DocHRef::parse(), DocHtmlHeader::parse(), DocHtmlDescTitle::parse(), DocSecRefItem::parse(), DocPara::parse() , 以及 DocHtmlCaption::parse().

◆ handleStyleArgument()

int DocParser::handleStyleArgument ( DocNode parent,
DocNodeList children,
const QCString cmdName 
)

在文件 docparser.cpp803 行定义.

804 {
805  DBG(("handleStyleArgument(%s)\n",qPrint(cmdName)));
806  QCString saveCmdName = cmdName;
807  int tok=tokenizer.lex();
808  if (tok!=TK_WHITESPACE)
809  {
810  warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
811  qPrint(saveCmdName));
812  return tok;
813  }
814  while ((tok=tokenizer.lex()) &&
815  tok!=TK_WHITESPACE &&
816  tok!=TK_NEWPARA &&
817  tok!=TK_LISTITEM &&
818  tok!=TK_ENDLIST
819  )
820  {
821  static const reg::Ex specialChar(R"([.,|()\[\]:;?])");
822  if (tok==TK_WORD && context.token->name.length()==1 &&
823  reg::match(context.token->name.str(),specialChar))
824  {
825  // special character that ends the markup command
826  return tok;
827  }
828  if (!defaultHandleToken(parent,tok,children))
829  {
830  switch (tok)
831  {
832  case TK_HTMLTAG:
834  { // ignore </li> as the end of a style command
835  continue;
836  }
837  DBG(("handleStyleArgument(%s) end tok=%s\n",qPrint(saveCmdName), DocTokenizer::tokToString(tok)));
838  return tok;
839  break;
840  default:
841  errorHandleDefaultToken(parent,tok,children,"\\" + saveCmdName + " command");
842  break;
843  }
844  break;
845  }
846  }
847  DBG(("handleStyleArgument(%s) end tok=%s\n",qPrint(saveCmdName), DocTokenizer::tokToString(tok)));
848  return (tok==TK_NEWPARA || tok==TK_LISTITEM || tok==TK_ENDLIST
849  ) ? tok : RetVal_OK;
850 }

引用了 context, DBG, defaultHandleToken(), TokenInfo::endTag, errorHandleDefaultToken(), DocParserContext::fileName, DocTokenizer::getLineNr(), Mappers::htmlTagMapper, insideLI(), QCString::length(), DocTokenizer::lex(), reg::match(), TokenInfo::name, qPrint(), RetVal_OK, QCString::str(), TK_ENDLIST, TK_HTMLTAG, TK_LISTITEM, TK_NEWPARA, TK_WHITESPACE, TK_WORD, DocParserContext::token, tokenizer, DocTokenizer::tokToString() , 以及 warn_doc_error().

被这些函数引用 defaultHandleToken() , 以及 DocPara::handleCommand().

◆ handleStyleEnter()

void DocParser::handleStyleEnter ( DocNode parent,
DocNodeList children,
DocStyleChange::Style  s,
const QCString tagName,
const HtmlAttribList attribs 
)

Called when a style change starts. For instance a <b> command is encountered.

在文件 docparser.cpp855 行定义.

857 {
858  DBG(("HandleStyleEnter\n"));
859  DocStyleChange *sc= new DocStyleChange(*this,parent,(uint)context.nodeStack.size(),s,tagName,TRUE,attribs);
860  children.push_back(std::unique_ptr<DocStyleChange>(sc));
861  context.styleStack.push(sc);
862 }

引用了 context, DBG, DocParserContext::nodeStack, DocParserContext::styleStack , 以及 TRUE.

被这些函数引用 defaultHandleToken(), DocPara::handleHtmlStartTag() , 以及 handleInitialStyleCommands().

◆ handleStyleLeave()

void DocParser::handleStyleLeave ( DocNode parent,
DocNodeList children,
DocStyleChange::Style  s,
const QCString tagName 
)

Called when a style change ends. For instance a </b> command is encountered.

在文件 docparser.cpp867 行定义.

869 {
870  DBG(("HandleStyleLeave\n"));
871  QCString tagNameLower = QCString(tagName).lower();
872  if (context.styleStack.empty() || // no style change
873  context.styleStack.top()->style()!=s || // wrong style change
874  context.styleStack.top()->tagName()!=tagNameLower || // wrong style change
875  context.styleStack.top()->position()!=context.nodeStack.size() // wrong position
876  )
877  {
878  if (context.styleStack.empty())
879  {
880  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> tag without matching <%s>",
881  qPrint(tagName),qPrint(tagName));
882  }
883  else if (context.styleStack.top()->tagName()!=tagNameLower)
884  {
885  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> tag while expecting </%s>",
886  qPrint(tagName),qPrint(context.styleStack.top()->tagName()));
887  }
888  else if (context.styleStack.top()->style()!=s)
889  {
890  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> tag while expecting </%s>",
891  qPrint(tagName),qPrint(context.styleStack.top()->tagName()));
892  }
893  else
894  {
895  warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> at different nesting level (%zu) than expected (%d)",
896  qPrint(tagName),context.nodeStack.size(),context.styleStack.top()->position());
897  }
898  }
899  else // end the section
900  {
901  children.push_back(
902  std::make_unique<DocStyleChange>(
903  *this,parent,(uint)context.nodeStack.size(),s,context.styleStack.top()->tagName(),FALSE));
904  context.styleStack.pop();
905  }
906 }

引用了 context, DBG, FALSE, DocParserContext::fileName, DocTokenizer::getLineNr(), QCString::lower(), DocParserContext::nodeStack, qPrint(), DocParserContext::styleStack, tokenizer , 以及 warn_doc_error().

被这些函数引用 defaultHandleToken() , 以及 DocPara::handleHtmlEndTag().

◆ handleUnclosedStyleCommands()

void DocParser::handleUnclosedStyleCommands ( )

在文件 docparser.cpp1002 行定义.

1003 {
1004  if (!context.initialStyleStack.empty())
1005  {
1006  const DocStyleChange *sc = context.initialStyleStack.top();
1007  context.initialStyleStack.pop();
1010  "end of comment block while expecting "
1011  "command </%s>",qPrint(sc->tagName()));
1012  }
1013 }

引用了 context, DocParserContext::fileName, DocTokenizer::getLineNr(), DocParserContext::initialStyleStack, qPrint(), DocStyleChange::tagName(), tokenizer , 以及 warn_doc_error().

被这些函数引用 DocText::parse() , 以及 DocRoot::parse().

◆ internalValidatingParseDoc()

int DocParser::internalValidatingParseDoc ( DocNode parent,
DocNodeList children,
const QCString doc 
)

在文件 docparser.cpp1742 行定义.

1744 {
1745  int retval = RetVal_OK;
1746 
1747  if (doc.isEmpty()) return retval;
1748 
1750 
1751  // first parse any number of paragraphs
1752  bool isFirst=TRUE;
1753  DocPara *lastPar=0;
1754  if (!children.empty() && children.back()->kind()==DocNode::Kind_Para)
1755  { // last child item was a paragraph
1756  lastPar = (DocPara*)children.back().get();
1757  isFirst=FALSE;
1758  }
1759  do
1760  {
1761  DocPara *par = new DocPara(*this,parent);
1762  if (isFirst) { par->markFirst(); isFirst=FALSE; }
1763  retval=par->parse();
1764  if (!par->isEmpty())
1765  {
1766  children.push_back(std::unique_ptr<DocNode>(par));
1767  if (lastPar) lastPar->markLast(FALSE);
1768  lastPar=par;
1769  }
1770  else
1771  {
1772  delete par;
1773  }
1774  } while (retval==TK_NEWPARA);
1775  if (lastPar) lastPar->markLast();
1776 
1777  //printf("internalValidateParsingDoc: %p: isFirst=%d isLast=%d\n",
1778  // lastPar,lastPar?lastPar->isFirst():-1,lastPar?lastPar->isLast():-1);
1779 
1780  return retval;
1781 }

引用了 context, QCString::data(), FALSE, DocParserContext::fileName, DocTokenizer::init(), QCString::isEmpty(), DocPara::isEmpty(), DocNode::Kind_Para, DocParserContext::markdownSupport, DocPara::markFirst(), DocPara::markLast(), DocPara::parse(), RetVal_OK, TK_NEWPARA, tokenizer , 以及 TRUE.

被这些函数引用 DocPara::handleInclude(), DocPara::handleInheritDoc(), DocXRefItem::parse(), DocRef::parse() , 以及 DocSimpleSect::parseRcs().

◆ popContext()

void DocParser::popContext ( )

在文件 docparser.cpp222 行定义.

223 {
224  auto &ctx = contextStack.top();
225  context = ctx;
226  tokenizer.setLineNr(ctx.lineNo);
227  context.token = ctx.token;
229  contextStack.pop();
231 
232  //QCString indent;
233  //indent.fill(' ',contextStack.size()*2+2);
234  //printf("%sdocParserPopContext() count=%zu\n",qPrint(indent),context.nodeStack.size());
235 }

引用了 context, contextStack, DocTokenizer::popContext(), DocTokenizer::replaceToken(), DocTokenizer::setLineNr(), DocParserContext::token , 以及 tokenizer.

被这些函数引用 DocPara::handleInclude(), DocPara::handleInheritDoc(), DocXRefItem::parse(), DocRef::parse(), DocSimpleSect::parseRcs(), validatingParseDoc() , 以及 validatingParseText().

◆ processCopyDoc()

QCString DocParser::processCopyDoc ( const char *  data,
uint len 
)

在文件 docparser.cpp7409 行定义.

7410 {
7411  //printf("processCopyDoc start '%s'\n",data);
7412  GrowBuf buf;
7413  uint i=0;
7414  while (i<len)
7415  {
7416  char c = data[i];
7417  if (c=='@' || c=='\\') // look for a command
7418  {
7419  bool isBrief=TRUE;
7420  uint j=isCopyBriefOrDetailsCmd(data,i,len,isBrief);
7421  if (j>0)
7422  {
7423  // skip whitespace
7424  while (j<len && (data[j]==' ' || data[j]=='\t')) j++;
7425  // extract the argument
7426  QCString id = extractCopyDocId(data,j,len);
7427  const Definition *def = 0;
7428  QCString doc,brief;
7429  //printf("resolving docs='%s'\n",qPrint(id));
7430  if (findDocsForMemberOrCompound(id,&doc,&brief,&def))
7431  {
7432  //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
7433  auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);
7434  if (it==context.copyStack.end()) // definition not parsed earlier
7435  {
7436  context.copyStack.push_back(def);
7437  if (isBrief)
7438  {
7439  uint l=brief.length();
7440  buf.addStr(processCopyDoc(brief.data(),l));
7441  }
7442  else
7443  {
7444  uint l=doc.length();
7445  buf.addStr(processCopyDoc(doc.data(),l));
7446  }
7447  context.copyStack.pop_back();
7448  }
7449  else
7450  {
7452  "Found recursive @copy%s or @copydoc relation for argument '%s'.\n",
7453  isBrief?"brief":"details",qPrint(id));
7454  }
7455  }
7456  else
7457  {
7459  "@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
7460  qPrint(id));
7461  }
7462  // skip over command
7463  i=j;
7464  }
7465  else
7466  {
7467  QCString endMarker;
7468  uint k = isVerbatimSection(data,i,len,endMarker);
7469  if (k>0)
7470  {
7471  int orgPos = i;
7472  i=skipToEndMarker(data,k,len,endMarker);
7473  buf.addStr(data+orgPos,i-orgPos);
7474  }
7475  else
7476  {
7477  buf.addChar(c);
7478  i++;
7479  }
7480  }
7481  }
7482  else // not a command, just copy
7483  {
7484  buf.addChar(c);
7485  i++;
7486  }
7487  }
7488  len = buf.getPos();
7489  buf.addChar(0);
7490  return buf.get();
7491 }

引用了 GrowBuf::addChar(), GrowBuf::addStr(), context, DocParserContext::copyStack, QCString::data(), extractCopyDocId(), DocParserContext::fileName, findDocsForMemberOrCompound(), GrowBuf::get(), DocTokenizer::getLineNr(), GrowBuf::getPos(), isCopyBriefOrDetailsCmd(), isVerbatimSection(), QCString::length(), qPrint(), skipToEndMarker(), tokenizer, TRUE , 以及 warn_doc_error().

被这些函数引用 validatingParseDoc().

◆ pushContext()

void DocParser::pushContext ( )

在文件 docparser.cpp208 行定义.

209 {
210  //QCString indent;
211  //indent.fill(' ',contextStack.size()*2+2);
212  //printf("%sdocParserPushContext() count=%zu\n",qPrint(indent),context.nodeStack.size());
213 
216  auto &ctx = contextStack.top();
217  ctx = context;
218  ctx.lineNo = tokenizer.getLineNr();
220 }

引用了 context, contextStack, DocTokenizer::getLineNr(), DocParserContext::lineNo, DocTokenizer::newToken(), DocTokenizer::pushContext(), DocParserContext::token , 以及 tokenizer.

被这些函数引用 DocPara::handleInclude(), DocPara::handleInheritDoc(), DocXRefItem::parse(), DocRef::parse(), DocSimpleSect::parseRcs(), validatingParseDoc() , 以及 validatingParseText().

◆ readTextFileByName()

void DocParser::readTextFileByName ( const QCString file,
QCString text 
)

在文件 docparser.cpp1785 行定义.

1786 {
1787  if (Portable::isAbsolutePath(file))
1788  {
1789  FileInfo fi(file.str());
1790  if (fi.exists())
1791  {
1792  text = fileToString(file,Config_getBool(FILTER_SOURCE_FILES));
1793  return;
1794  }
1795  }
1796  const StringVector &examplePathList = Config_getList(EXAMPLE_PATH);
1797  for (const auto &s : examplePathList)
1798  {
1799  std::string absFileName = s+(Portable::pathSeparator()+file).str();
1800  FileInfo fi(absFileName);
1801  if (fi.exists())
1802  {
1803  text = fileToString(QCString(absFileName),Config_getBool(FILTER_SOURCE_FILES));
1804  return;
1805  }
1806  }
1807 
1808  // as a fallback we also look in the exampleNameDict
1809  bool ambig;
1811  if (fd)
1812  {
1813  text = fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES));
1814  if (ambig)
1815  {
1816  warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file name %s is ambiguous"
1817  "Possible candidates:\n%s",qPrint(file),
1819  );
1820  }
1821  }
1822  else
1823  {
1824  warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file %s is not found. "
1825  "Check your EXAMPLE_PATH",qPrint(file));
1826  }
1827 }

引用了 FileDef::absFilePath(), Config_getBool, Config_getList, context, Doxygen::exampleNameLinkedMap, FileInfo::exists(), DocParserContext::fileName, fileToString(), findFileDef(), DocTokenizer::getLineNr(), Portable::isAbsolutePath(), Portable::pathSeparator(), qPrint(), showFileDefMatches(), QCString::str(), tokenizer , 以及 warn_doc_error().

被这些函数引用 DocPara::handleInclude() , 以及 DocInclude::parse().

类成员变量说明

◆ context

DocParserContext DocParser::context

在文件 docparser.cpp175 行定义.

被这些函数引用 DocSimpleSect::appendLinkWord(), AutoNodeStack::AutoNodeStack(), checkArgumentName(), checkRetvalName(), checkUnOrMultipleDocumentedParams(), defaultHandleTitleAndSize(), defaultHandleToken(), DocAnchor::DocAnchor(), DocCite::DocCite(), DocDiaFile::DocDiaFile(), DocDotFile::DocDotFile(), DocEmoji::DocEmoji(), DocFormula::DocFormula(), DocHtmlCaption::DocHtmlCaption(), DocLink::DocLink(), DocLinkedWord::DocLinkedWord(), DocMscFile::DocMscFile(), DocRef::DocRef(), DocWord::DocWord(), errorHandleDefaultToken(), findAndCopyImage(), findDocsForMemberOrCompound(), handleAHref(), handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlStartTag(), DocPara::handleIline(), DocPara::handleImage(), handleImg(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), DocPara::handleInheritDoc(), handleInitialStyleCommands(), handleInternalRef(), DocPara::handleLink(), handleLinkedWord(), handleParameterType(), handlePendingStyleCommands(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleStartCode(), handleStyleArgument(), handleStyleEnter(), handleStyleLeave(), handleUnclosedStyleCommands(), DocPara::handleXRefItem(), DocPara::injectToken(), internalValidatingParseDoc(), DocInclude::parse(), DocIncOperator::parse(), DocIndexEntry::parse(), DocAutoList::parse(), DocAutoListItem::parse(), DocXRefItem::parse(), DocDotFile::parse(), DocMscFile::parse(), DocDiaFile::parse(), DocVhdlFlow::parse(), DocLink::parse(), DocRef::parse(), DocHRef::parse(), DocHtmlHeader::parse(), DocHtmlDescTitle::parse(), DocHtmlDescList::parse(), DocSection::parse(), DocSecRefItem::parse(), DocSecRefList::parse(), DocInternal::parse(), DocHtmlList::parse(), DocPara::parse(), DocParamList::parse(), DocHtmlDescData::parse(), DocHtmlCell::parse(), DocHtmlCaption::parse(), DocHtmlRow::parse(), DocHtmlTable::parse(), DocText::parse(), DocRoot::parse(), DocSimpleSect::parseRcs(), DocHtmlList::parseXml(), DocParamList::parseXml(), DocHtmlCell::parseXml(), DocHtmlRow::parseXml(), DocHtmlTable::parseXml(), popContext(), processCopyDoc(), pushContext(), readTextFileByName(), validatingParseDoc(), validatingParseText() , 以及 AutoNodeStack::~AutoNodeStack().

◆ contextStack

std::stack< DocParserContext > DocParser::contextStack

在文件 docparser.cpp174 行定义.

被这些函数引用 popContext() , 以及 pushContext().

◆ tokenizer

DocTokenizer DocParser::tokenizer

在文件 docparser.cpp176 行定义.

被这些函数引用 defaultHandleTitleAndSize(), defaultHandleToken(), DocAnchor::DocAnchor(), DocCite::DocCite(), DocEmoji::DocEmoji(), docFindSections(), DocFormula::DocFormula(), DocHtmlCaption::DocHtmlCaption(), DocLink::DocLink(), DocRef::DocRef(), errorHandleDefaultToken(), findAndCopyImage(), handleAHref(), handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlStartTag(), DocPara::handleIline(), DocPara::handleImage(), handleImg(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), handleInternalRef(), DocPara::handleLink(), handleLinkedWord(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleStartCode(), handleStyleArgument(), handleStyleLeave(), handleUnclosedStyleCommands(), DocPara::handleXRefItem(), internalValidatingParseDoc(), DocInclude::parse(), DocIncOperator::parse(), DocIndexEntry::parse(), DocAutoList::parse(), DocTitle::parse(), DocDotFile::parse(), DocMscFile::parse(), DocDiaFile::parse(), DocVhdlFlow::parse(), DocLink::parse(), DocRef::parse(), DocInternalRef::parse(), DocHRef::parse(), DocHtmlHeader::parse(), DocHtmlDescTitle::parse(), DocHtmlDescList::parse(), DocSection::parse(), DocSecRefItem::parse(), DocSecRefList::parse(), DocInternal::parse(), DocHtmlList::parse(), DocPara::parse(), DocParamList::parse(), DocHtmlCaption::parse(), DocHtmlRow::parse(), DocHtmlTable::parse(), DocText::parse(), DocRoot::parse(), DocHtmlList::parseXml(), DocParamList::parseXml(), DocHtmlRow::parseXml(), DocHtmlTable::parseXml(), popContext(), processCopyDoc(), pushContext(), readTextFileByName(), validatingParseDoc() , 以及 validatingParseText().


该类的文档由以下文件生成:
CMD_DOLLAR
@ CMD_DOLLAR
Definition: cmdmapper.h:42
Definition::getSourceFileBase
virtual QCString getSourceFileBase() const =0
DocHRef
Node representing a Hypertext reference
Definition: docparser.h:936
DocStyleChange
Node representing a style change
Definition: docparser.h:343
StringVector
std::vector< std::string > StringVector
Definition: containers.h:32
DocTokenizer::setStateAnchor
void setStateAnchor()
SrcLangExt_Unknown
@ SrcLangExt_Unknown
Definition: types.h:43
DocParserContext
Parser's context to store all global variables.
Definition: docparser.cpp:99
DocSymbol::Sym_Amp
@ Sym_Amp
Definition: docparser.h:445
TokenInfo::endTag
bool endTag
Definition: doctokenizer.h:100
DocStyleChange::position
uint position() const
Definition: docparser.h:371
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
findFileDef
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition: util.cpp:3222
HTML_UNDERLINE
@ HTML_UNDERLINE
Definition: cmdmapper.h:185
warn_incomplete_doc
void warn_incomplete_doc(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:178
toGroupDef
GroupDef * toGroupDef(Definition *d)
Definition: groupdef.cpp:1766
CMD_BSLASH
@ CMD_BSLASH
Definition: cmdmapper.h:38
Definition::docLine
virtual int docLine() const =0
DocSymbol::SymType
SymType
Definition: docparser.h:388
DocHRef::parse
int parse()
Definition: docparser.cpp:2993
getDefs
bool getDefs(const QCString &scName, const QCString &mbName, const QCString &args, const MemberDef *&md, const ClassDef *&cd, const FileDef *&fd, const NamespaceDef *&nd, const GroupDef *&gd, bool forceEmptyScope, const FileDef *currentFile, bool checkCV)
Definition: util.cpp:2208
DocParserContext::token
TokenInfo * token
Definition: docparser.cpp:129
CMD_FORMULA
@ CMD_FORMULA
Definition: cmdmapper.h:54
DocParser::context
DocParserContext context
Definition: docparser.cpp:175
DocTokenizer::tokToString
static const char * tokToString(int token)
CMD_EMPHASIS
@ CMD_EMPHASIS
Definition: cmdmapper.h:45
CMD_LESS
@ CMD_LESS
Definition: cmdmapper.h:65
ArgumentList::push_back
void push_back(const Argument &a)
Definition: arguments.h:95
DocTokenizer::setStateInternalRef
void setStateInternalRef()
TK_WORD
@ TK_WORD
Definition: doctokenizer.h:46
Portable::pathSeparator
QCString pathSeparator()
Definition: portable.cpp:347
DocParserContext::relPath
QCString relPath
Definition: docparser.cpp:111
MemberDef::briefDescription
virtual QCString briefDescription(bool abbr=FALSE) const =0
CMD_AT
@ CMD_AT
Definition: cmdmapper.h:33
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
DocSymbol::Sym_Dot
@ Sym_Dot
Definition: docparser.h:447
MemberDef::documentation
virtual QCString documentation() const =0
CMD_SETSCOPE
@ CMD_SETSCOPE
Definition: cmdmapper.h:132
Doxygen::imageNameLinkedMap
static FileNameLinkedMap * imageNameLinkedMap
Definition: doxygen.h:89
CMD_BOLD
@ CMD_BOLD
Definition: cmdmapper.h:37
Dir::remove
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Definition: dir.cpp:256
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
Dir
Class representing a directory in the file system
Definition: dir.h:68
DocImage::Xml
@ Xml
Definition: docparser.h:774
DocParserContext::retvalsFound
StringMultiSet retvalsFound
Definition: docparser.cpp:115
DocParser::contextStack
std::stack< DocParserContext > contextStack
Definition: docparser.cpp:174
Definition::isLinkable
virtual bool isLinkable() const =0
DocVerbatim::HtmlOnly
@ HtmlOnly
Definition: docparser.h:513
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
DocStyleChange::Center
@ Center
Definition: docparser.h:349
HtmlAttribList
Class representing a list of HTML attributes.
Definition: htmlattrib.h:30
GrowBuf::get
char * get()
Definition: growbuf.h:94
DocSymbol::Sym_Equal
@ Sym_Equal
Definition: docparser.h:447
ArgumentList
This class represents an function or template argument list.
Definition: arguments.h:59
TokenInfo::name
QCString name
Definition: doctokenizer.h:74
RetVal_OK
@ RetVal_OK
Command starting with \
Definition: doctokenizer.h:59
DocStyleChange::Strike
@ Strike
Definition: docparser.h:356
DocPara::markFirst
void markFirst(bool v=TRUE)
Definition: docparser.h:1186
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:86
Definition::getDefLine
virtual int getDefLine() const =0
DocParserContext::nodeStack
DocNodeStack nodeStack
Definition: docparser.cpp:106
DocTokenizer::setStateManOnly
void setStateManOnly()
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
DocStyleChange::Del
@ Del
Definition: docparser.h:358
TokenInfo::chars
QCString chars
Definition: doctokenizer.h:105
reg::match
bool match(const std::string &str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Definition: regex.cpp:729
DocParser::handlePendingStyleCommands
void handlePendingStyleCommands(DocNode *parent, DocNodeList &children)
Definition: docparser.cpp:912
DocSymbol::Sym_Percent
@ Sym_Percent
Definition: docparser.h:446
DocSymbol::Sym_Dollar
@ Sym_Dollar
Definition: docparser.h:446
Doxygen::pageLinkedMap
static PageLinkedMap * pageLinkedMap
Definition: doxygen.h:82
DocParser::findAndCopyImage
QCString findAndCopyImage(const QCString &fileName, DocImage::Type type, bool doWarn=true)
Definition: docparser.cpp:266
Doxygen::indexList
static IndexList * indexList
Definition: doxygen.h:114
GroupDef::groupTitle
virtual QCString groupTitle() const =0
MemberDef::inheritsDocsFrom
virtual const MemberDef * inheritsDocsFrom() const =0
DocParser::handleLinkedWord
void handleLinkedWord(DocNode *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
Definition: docparser.cpp:1015
DocSymbol::Sym_Hash
@ Sym_Hash
Definition: docparser.h:446
copyFile
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
Definition: util.cpp:6439
QCString::size
uint size() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:150
DocTokenizer::setStateXmlOnly
void setStateXmlOnly()
DocParser::handleStyleEnter
void handleStyleEnter(DocNode *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
Definition: docparser.cpp:855
HTML_CODE
@ HTML_CODE
Definition: cmdmapper.h:155
DocImage::DocBook
@ DocBook
Definition: docparser.h:774
HTML_SMALL
@ HTML_SMALL
Definition: cmdmapper.h:154
DocStyleChange::Italic
@ Italic
Definition: docparser.h:347
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
TokenInfo::attribs
HtmlAttribList attribs
Definition: doctokenizer.h:99
DocTokenizer::init
void init(const char *input, const QCString &fileName, bool markdownSupport)
HTML_PRE
@ HTML_PRE
Definition: cmdmapper.h:157
DocStyleChange::Bold
@ Bold
Definition: docparser.h:346
DocParser::tokenizer
DocTokenizer tokenizer
Definition: docparser.cpp:176
DocSymbol::decodeSymbol
static SymType decodeSymbol(const QCString &symName)
Definition: docparser.cpp:1713
DocVerbatim::RtfOnly
@ RtfOnly
Definition: docparser.h:513
QCString::str
std::string str() const
Definition: qcstring.h:442
CMD_LATEXONLY
@ CMD_LATEXONLY
Definition: cmdmapper.h:64
Definition::TypeGroup
@ TypeGroup
Definition: definition.h:91
warn_doc_error
void warn_doc_error(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:186
DocAnchor
Node representing an anchor
Definition: docparser.h:303
DocStyleChange::Superscript
@ Superscript
Definition: docparser.h:352
CMD_ANCHOR
@ CMD_ANCHOR
Definition: cmdmapper.h:32
err
void err(const char *fmt,...)
Definition: message.cpp:203
QCString::at
char & at(size_t i)
Returns a reference to the character at index i.
Definition: qcstring.h:477
GrowBuf::addStr
void addStr(const QCString &s)
Definition: growbuf.h:57
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
getClass
ClassDef * getClass(const QCString &n)
Definition: classdef.cpp:4974
TK_WHITESPACE
@ TK_WHITESPACE
Definition: doctokenizer.h:48
DocSymbol::Sym_Minus
@ Sym_Minus
Definition: docparser.h:447
HTML_SUP
@ HTML_SUP
Definition: cmdmapper.h:159
DocParser::processCopyDoc
QCString processCopyDoc(const char *data, uint &len)
Definition: docparser.cpp:7409
DocTokenizer::replaceToken
void replaceToken(TokenInfo *newToken)
Doxygen::exampleNameLinkedMap
static FileNameLinkedMap * exampleNameLinkedMap
Definition: doxygen.h:86
DocParserContext::exampleName
QCString exampleName
Definition: docparser.cpp:119
Definition::docFile
virtual QCString docFile() const =0
MemberDef::getReference
virtual QCString getReference() const =0
TK_SYMBOL
@ TK_SYMBOL
Definition: doctokenizer.h:53
Definition::getLanguage
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
DocParser::handleInternalRef
DocInternalRef * handleInternalRef(DocNode *parent)
Definition: docparser.cpp:1150
DocImage::Html
@ Html
Definition: docparser.h:774
TK_LISTITEM
@ TK_LISTITEM
Definition: doctokenizer.h:49
HTML_SUB
@ HTML_SUB
Definition: cmdmapper.h:158
DocVerbatim::DocbookOnly
@ DocbookOnly
Definition: docparser.h:513
reg::Iterator
Iterator class to iterator through matches.
Definition: regex.h:242
MemberDef::isObjCMethod
virtual bool isObjCMethod() const =0
GrowBuf::addChar
void addChar(char c)
Definition: growbuf.h:54
GrowBuf
Class representing a string buffer optimised for growing.
Definition: growbuf.h:12
end
DirIterator end(const DirIterator &) noexcept
Definition: dir.cpp:128
MemberDef::isLinkable
virtual bool isLinkable() const =0
TK_COMMAND_AT
@ TK_COMMAND_AT
Definition: doctokenizer.h:51
DocImage::Type
Type
Definition: docparser.h:774
PageDef
A model of a page symbol.
Definition: pagedef.h:25
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
DocSymbol::Sym_Less
@ Sym_Less
Definition: docparser.h:445
DocParserContext::memberDef
const MemberDef * memberDef
Definition: docparser.cpp:117
Doxygen::inputNameLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
Definition: doxygen.h:88
DocParserContext::inSeeBlock
bool inSeeBlock
Definition: docparser.cpp:103
uint
unsigned uint
Definition: qcstring.h:40
HTML_IMG
@ HTML_IMG
Definition: cmdmapper.h:156
MemberDef::anchor
virtual QCString anchor() const =0
DocParser::defaultHandleToken
bool defaultHandleToken(DocNode *parent, int tok, DocNodeList &children, bool handleWord=TRUE)
Definition: docparser.cpp:1277
Mappers::htmlTagMapper
static Mapper * htmlTagMapper
Definition: cmdmapper.h:235
DocParserContext::fileName
QCString fileName
Definition: docparser.cpp:110
TokenInfo::verb
QCString verb
Definition: doctokenizer.h:93
CMD_HASH
@ CMD_HASH
Definition: cmdmapper.h:56
CMD_MANONLY
@ CMD_MANONLY
Definition: cmdmapper.h:104
insideLI
static bool insideLI(DocNode *n)
Definition: docparser.cpp:571
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
skipToEndMarker
static uint skipToEndMarker(const char *data, uint i, uint len, const QCString &endMarker)
Definition: docparser.cpp:7391
insidePRE
static bool insidePRE(DocNode *n)
Definition: docparser.cpp:558
argListToString
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
Definition: util.cpp:1149
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
QCString::stripWhiteSpace
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition: qcstring.h:243
QCString::left
QCString left(size_t len) const
Definition: qcstring.h:212
HTML_S
@ HTML_S
Definition: cmdmapper.h:188
DocPara::isEmpty
bool isEmpty() const
Definition: docparser.h:1185
FileDef::name
virtual QCString name() const =0
MemberDef::isDefine
virtual bool isDefine() const =0
Portable::sysTimerStart
void sysTimerStart()
Definition: portable.cpp:470
IndexList::addImageFile
void addImageFile(const QCString &name)
Definition: index.h:105
GrowBuf::getPos
uint getPos() const
Definition: growbuf.h:96
ArgumentList::empty
bool empty() const
Definition: arguments.h:92
DocParser::errorHandleDefaultToken
void errorHandleDefaultToken(DocNode *parent, int tok, DocNodeList &children, const QCString &txt)
Definition: docparser.cpp:775
ClassDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
Returns the unique base name (without extension) of the class's file on disk
DocStyleChange::Ins
@ Ins
Definition: docparser.h:359
HTML_STRIKE
@ HTML_STRIKE
Definition: cmdmapper.h:184
Definition::TypeFile
@ TypeFile
Definition: definition.h:88
DocSymbol::Sym_At
@ Sym_At
Definition: docparser.h:445
CMD_GREATER
@ CMD_GREATER
Definition: cmdmapper.h:55
DocImage::Latex
@ Latex
Definition: docparser.h:774
CMD_HTMLONLY
@ CMD_HTMLONLY
Definition: cmdmapper.h:58
DocParser::handleStyleArgument
int handleStyleArgument(DocNode *parent, DocNodeList &children, const QCString &cmdName)
Definition: docparser.cpp:803
removeRedundantWhiteSpace
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:544
DocParserContext::markdownSupport
bool markdownSupport
Definition: docparser.cpp:131
DocNode::Kind_Para
@ Kind_Para
Definition: docparser.h:103
Definition::name
virtual QCString name() const =0
Doxygen::groupLinkedMap
static GroupLinkedMap * groupLinkedMap
Definition: doxygen.h:96
CMD_IMAGE
@ CMD_IMAGE
Definition: cmdmapper.h:59
DocSymbol::Sym_Unknown
@ Sym_Unknown
Definition: docparser.h:388
Argument
This class contains the information about the argument of a function or template
Definition: arguments.h:26
CMD_CODE
@ CMD_CODE
Definition: cmdmapper.h:39
MemberDef::getClassDef
virtual const ClassDef * getClassDef() const =0
DocParserContext::context
QCString context
Definition: docparser.cpp:102
DocVerbatim::ManOnly
@ ManOnly
Definition: docparser.h:513
DocImage::Rtf
@ Rtf
Definition: docparser.h:774
DocTokenizer::pushContext
void pushContext()
SrcLangExt_Python
@ SrcLangExt_Python
Definition: types.h:52
QCString::lower
QCString lower() const
Definition: qcstring.h:232
DocParser::handleUnclosedStyleCommands
void handleUnclosedStyleCommands()
Definition: docparser.cpp:1002
CMD_INTERNALREF
@ CMD_INTERNALREF
Definition: cmdmapper.h:62
DocTokenizer::getLineNr
int getLineNr(void)
DocStyleChange::Small
@ Small
Definition: docparser.h:350
DocSymbol::Sym_DoubleColon
@ Sym_DoubleColon
Definition: docparser.h:446
fileToString
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition: util.cpp:1394
Definition::briefDescription
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
showFileDefMatches
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
Definition: util.cpp:3308
DocParserContext::styleStack
DocStyleChangeStack styleStack
Definition: docparser.cpp:107
TRUE
#define TRUE
Definition: qcstring.h:36
Definition::getOutputFileBase
virtual QCString getOutputFileBase() const =0
HTML_CENTER
@ HTML_CENTER
Definition: cmdmapper.h:151
CMD_MDASH
@ CMD_MDASH
Definition: cmdmapper.h:129
DocSymbol::Sym_Greater
@ Sym_Greater
Definition: docparser.h:445
DocStyleChange::tagName
QCString tagName() const
Definition: docparser.h:374
Portable::system
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition: portable.cpp:42
SrcLangExt_Fortran
@ SrcLangExt_Fortran
Definition: types.h:53
TK_LNKWORD
@ TK_LNKWORD
Definition: doctokenizer.h:47
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
DocInternalRef::parse
void parse()
Definition: docparser.cpp:2366
CMD_XMLONLY
@ CMD_XMLONLY
Definition: cmdmapper.h:99
DocTokenizer::popContext
bool popContext()
DocTokenizer::setStateRtfOnly
void setStateRtfOnly()
CMD_PERCENT
@ CMD_PERCENT
Definition: cmdmapper.h:73
HTML_DEL
@ HTML_DEL
Definition: cmdmapper.h:187
CMD_PUNT
@ CMD_PUNT
Definition: cmdmapper.h:133
DocPara::markLast
void markLast(bool v=TRUE)
Definition: docparser.h:1187
Definition::definitionType
virtual DefType definitionType() const =0
linkToText
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
Definition: util.cpp:2943
DocStyleChange::Subscript
@ Subscript
Definition: docparser.h:351
CMD_QUOTE
@ CMD_QUOTE
Definition: cmdmapper.h:111
DocPara::parse
int parse()
Definition: docparser.cpp:6579
ArgumentList::size
size_t size() const
Definition: arguments.h:93
HTML_EMPHASIS
@ HTML_EMPHASIS
Definition: cmdmapper.h:166
Definition::getReference
virtual QCString getReference() const =0
MemberDef::qualifiedName
virtual QCString qualifiedName() const =0
TokenInfo::id
int id
Definition: doctokenizer.h:96
DocSymbol::Sym_Plus
@ Sym_Plus
Definition: docparser.h:447
DocParserContext::initialStyleStack
DocStyleChangeStack initialStyleStack
Definition: docparser.cpp:108
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
CMD_PLUS
@ CMD_PLUS
Definition: cmdmapper.h:134
substitute
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: qcstring.cpp:465
DocStyleChange::style
Style style() const
Definition: docparser.h:368
DocSymbol::Sym_Quot
@ Sym_Quot
Definition: docparser.h:447
extractCopyDocId
static QCString extractCopyDocId(const char *data, uint &j, uint len)
Definition: docparser.cpp:7296
DocStyleChange::Code
@ Code
Definition: docparser.h:348
MemberDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
CMD_AMP
@ CMD_AMP
Definition: cmdmapper.h:31
Definition::anchor
virtual QCString anchor() const =0
DocParser::handleAnchor
DocAnchor * handleAnchor(DocNode *parent)
Definition: docparser.cpp:1172
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
DocParser::handleImg
void handleImg(DocNode *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
Definition: docparser.cpp:1682
HTML_DIV
@ HTML_DIV
Definition: cmdmapper.h:182
DocSymbol::Sym_BSlash
@ Sym_BSlash
Definition: docparser.h:445
MemberDef::objCMethodName
virtual QCString objCMethodName(bool localLink, bool showStatic) const =0
MemberDef::isDocsForDefinition
virtual bool isDocsForDefinition() const =0
DocParserContext::isExample
bool isExample
Definition: docparser.cpp:118
MemberDef::getScopeString
virtual QCString getScopeString() const =0
CMD_DBONLY
@ CMD_DBONLY
Definition: cmdmapper.h:121
reg::Ex
Class representing a regular expression.
Definition: regex.h:48
ClassDef::getReference
virtual QCString getReference() const =0
If this class originated from a tagfile, this will return the tag file reference
CMD_DCOLON
@ CMD_DCOLON
Definition: cmdmapper.h:113
TokenInfo::isEMailAddr
bool isEMailAddr
Definition: doctokenizer.h:108
DocTokenizer::setStateHtmlOnly
void setStateHtmlOnly()
DocTokenizer::setStateSetScope
void setStateSetScope()
Definition::documentation
virtual QCString documentation() const =0
MemberDef::declArgumentList
virtual const ArgumentList & declArgumentList() const =0
DocTokenizer::setLineNr
void setLineNr(int lineno)
TK_ENDLIST
@ TK_ENDLIST
Definition: doctokenizer.h:50
TK_HTMLTAG
@ TK_HTMLTAG
Command starting with @
Definition: doctokenizer.h:52
DocVerbatim::LatexOnly
@ LatexOnly
Definition: docparser.h:513
QCString::startsWith
bool startsWith(const char *s) const
Definition: qcstring.h:408
FileInfo
Minimal replacement for QFileInfo.
Definition: fileinfo.h:22
FileDef::absFilePath
virtual QCString absFilePath() const =0
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
Config_getString
#define Config_getString(name)
Definition: config.h:32
CMD_MINUS
@ CMD_MINUS
Definition: cmdmapper.h:135
DocParserContext::paramsFound
StringMultiSet paramsFound
Definition: docparser.cpp:116
Definition::getDefFileName
virtual QCString getDefFileName() const =0
Mappers::cmdMapper
static Mapper * cmdMapper
Definition: cmdmapper.h:234
MemberDef::argumentList
virtual const ArgumentList & argumentList() const =0
resolveRef
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, bool lookForSpecialization, const FileDef *currentFile, bool checkScope)
Definition: util.cpp:2757
convertNameToFile
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition: util.cpp:3604
Portable::sysTimerStop
void sysTimerStop()
Definition: portable.cpp:475
DocParserContext::hasParamCommand
bool hasParamCommand
Definition: docparser.cpp:113
Doxygen::namespaceLinkedMap
static NamespaceLinkedMap * namespaceLinkedMap
Definition: doxygen.h:97
DocTokenizer::setStateTitle
void setStateTitle()
AutoNodeStack
Definition: docparser.cpp:186
DocParserContext::copyStack
DefinitionStack copyStack
Definition: docparser.cpp:109
QCString::data
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:153
DocStyleChange::Underline
@ Underline
Definition: docparser.h:357
DocTokenizer::newToken
TokenInfo * newToken()
FileDef
A model of a file symbol.
Definition: filedef.h:73
CMD_RTFONLY
@ CMD_RTFONLY
Definition: cmdmapper.h:117
DocVerbatim::XmlOnly
@ XmlOnly
Definition: docparser.h:513
toFileDef
FileDef * toFileDef(Definition *d)
Definition: filedef.cpp:1778
DocParserContext::insideHtmlLink
bool insideHtmlLink
Definition: docparser.cpp:105
DocTokenizer::lex
int lex()
HTML_BOLD
@ HTML_BOLD
Definition: cmdmapper.h:173
XML_C
@ XML_C
Definition: cmdmapper.h:192
TK_NEWPARA
@ TK_NEWPARA
Definition: doctokenizer.h:54
DocStyleChange::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:373
Portable::isAbsolutePath
bool isAbsolutePath(const QCString &fileName)
Definition: portable.cpp:496
DocParserContext::lineNo
int lineNo
Definition: docparser.cpp:130
HTML_INS
@ HTML_INS
Definition: cmdmapper.h:186
TK_COMMAND_CHAR
#define TK_COMMAND_CHAR(token)
Definition: docparser.cpp:55
CMD_NDASH
@ CMD_NDASH
Definition: cmdmapper.h:128
DocTokenizer::setStatePara
void setStatePara()
Definition::briefDescriptionAsTooltip
virtual QCString briefDescriptionAsTooltip() const =0
DocTokenizer::setStateTitleAttrValue
void setStateTitleAttrValue()
DocInternalRef
Node representing an internal reference to some item
Definition: docparser.h:919
DBG
#define DBG(x)
Definition: docparser.cpp:58
DocTokenizer::setStateDbOnly
void setStateDbOnly()
Doxygen::classLinkedMap
static ClassLinkedMap * classLinkedMap
Definition: doxygen.h:78
DocStyleChange::S
@ S
Definition: docparser.h:360
TK_COMMAND_BS
@ TK_COMMAND_BS
Definition: doctokenizer.h:57
DocParser::handleStyleLeave
void handleStyleLeave(DocNode *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName)
Definition: docparser.cpp:867
isCopyBriefOrDetailsCmd
static uint isCopyBriefOrDetailsCmd(const char *data, uint i, uint len, bool &brief)
Definition: docparser.cpp:7359
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.h:339
DocParser::findDocsForMemberOrCompound
bool findDocsForMemberOrCompound(const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef)
Definition: docparser.cpp:629
qstrlen
uint qstrlen(const char *str)
Definition: qcstring.h:65
QCString::sprintf
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:24
TK_URL
@ TK_URL
Definition: doctokenizer.h:56
Config_getList
#define Config_getList(name)
Definition: config.h:37
DocTokenizer::setStateLatexOnly
void setStateLatexOnly()
FALSE
#define FALSE
Definition: qcstring.h:33
ClassDef::anchor
virtual QCString anchor() const =0
isVerbatimSection
static uint isVerbatimSection(const char *data, uint i, uint len, QCString &endMarker)
Definition: docparser.cpp:7370
CMD_EQUAL
@ CMD_EQUAL
Definition: cmdmapper.h:140
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108