Skip to main content

The TagFileParser Class Reference

Tag file parser. More...

Declaration

class anonymous{tagreader.cpp}::TagFileParser { ... }

Enumerations Index

enumState { ... }

Public Constructors Index

TagFileParser (const char *tagName)

Public Member Functions Index

voidsetDocumentLocator (const XMLLocator *locator)
voidstartDocument ()
voidstartElement (const QCString &name, const XMLHandlers::Attributes &attrib)
voidendElement (const QCString &name)
voidcharacters (const QCString &ch)
voiderror (const QCString &fileName, int lineNr, const QCString &msg)
voiddump ()
voidbuildLists (const std::shared_ptr< Entry > &root)
voidaddIncludes ()
voidstartCompound (const XMLHandlers::Attributes &attrib)
voidendCompound ()
voidstartMember (const XMLHandlers::Attributes &attrib)
voidendMember ()
voidstartEnumValue (const XMLHandlers::Attributes &attrib)
voidendEnumValue ()
voidendDocAnchor ()
voidendClass ()
voidendConcept ()
voidendModule ()
voidendNamespace ()
voidendFile ()
voidendPage ()
voidendSubpage ()
voidendDir ()
voidstartStringValue (const XMLHandlers::Attributes &)
voidstartDocAnchor (const XMLHandlers::Attributes &attrib)
voidendType ()
voidendName ()
voidstartBase (const XMLHandlers::Attributes &attrib)
voidendBase ()
voidstartIncludes (const XMLHandlers::Attributes &attrib)
voidendIncludes ()
voidendTemplateArg ()
voidendFilename ()
voidendPath ()
voidendAnchor ()
voidendClangId ()
voidendAnchorFile ()
voidendArglist ()
voidendTitle ()
voidendSubgroup ()
voidstartIgnoreElement (const XMLHandlers::Attributes &)
voidendIgnoreElement ()
voidbuildMemberList (const std::shared_ptr< Entry > &ce, const std::vector< TagMemberInfo > &members)
voidaddDocAnchors (const std::shared_ptr< Entry > &e, const std::vector< TagAnchorInfo > &l)

Private Member Functions Index

voidbuildClassEntry (const std::shared_ptr< Entry > &root, const TagClassInfo *tci)
voidbuildClassTree (const std::shared_ptr< Entry > &root, const ClassNode &node)

Private Member Attributes Index

std::vector< TagCompoundVariant >m_tagFileCompounds
TagCompoundVariantm_curCompound
TagMemberInfom_curMember
TagEnumValueInfom_curEnumValue
TagIncludeInfom_curIncludes
QCStringm_curString
QCStringm_tagName
QCStringm_fileName
QCStringm_title
Statem_state = Invalid
std::stack< State >m_stateStack
const XMLLocator *m_locator = nullptr

Description

Tag file parser.

Reads an XML-structured tagfile and builds up the structure in memory. The method buildLists() is used to transfer/translate the structures to the doxygen engine.

Definition at line 328 of file tagreader.cpp.

Enumerations

State

enum anonymous{tagreader.cpp}::TagFileParser::State
Enumeration values
Invalid
InClass
InConcept
InFile
InNamespace
InGroup
InPage
InMember
InEnumValue
InPackage
InDir
InModule
InTempArgList

Definition at line 989 of file tagreader.cpp.

Public Constructors

TagFileParser()

anonymous{tagreader.cpp}::TagFileParser::TagFileParser (const char * tagName)
inline explicit

Definition at line 336 of file tagreader.cpp.

336 explicit TagFileParser(const char *tagName) : m_tagName(tagName) {}

Reference m_tagName.

Referenced by parseTagFile.

Public Member Functions

addDocAnchors()

void anonymous{tagreader.cpp}::TagFileParser::addDocAnchors (const std::shared_ptr< Entry > & e, const std::vector< TagAnchorInfo > & l)

Definition at line 986 of file tagreader.cpp.

1359void TagFileParser::addDocAnchors(const std::shared_ptr<Entry> &e,const std::vector<TagAnchorInfo> &l)
1360{
1361 for (const auto &ta : l)
1362 {
1363 if (SectionManager::instance().find(QCString(ta.label))==nullptr)
1364 {
1365 //printf("New sectionInfo file=%s anchor=%s\n",
1366 // qPrint(ta->fileName),qPrint(ta->label));
1368 ta.label,ta.fileName,-1,ta.title,
1370 e->anchors.push_back(si);
1371 }
1372 else
1373 {
1374 //printf("Replace sectionInfo file=%s anchor=%s\n",
1375 // qPrint(ta->fileName),qPrint(ta->label));
1377 ta.label,ta.fileName,-1,ta.title,
1379 }
1380 }
1381}

References SectionManager::add, SectionType::Anchor, SectionManager::instance, m_tagName and SectionManager::replace.

Referenced by buildClassEntry, buildLists and buildMemberList.

addIncludes()

void anonymous{tagreader.cpp}::TagFileParser::addIncludes ()

Definition at line 358 of file tagreader.cpp.

1806{
1807 for (const auto &comp : m_tagFileCompounds)
1808 {
1809 const TagFileInfo *tfi = comp.getFileInfo();
1810 if (tfi)
1811 {
1812 //printf("tag file tagName=%s path=%s name=%s\n",qPrint(m_tagName),qPrint(tfi->path),qPrint(tfi->name));
1813 FileName *fn = Doxygen::inputNameLinkedMap->find(tfi->name);
1814 if (fn)
1815 {
1816 for (const auto &fd : *fn)
1817 {
1818 //printf("input file path=%s name=%s\n",qPrint(fd->getPath()),qPrint(fd->name()));
1819 if (fd->getPath()==QCString(m_tagName+":"+tfi->path))
1820 {
1821 //printf("found\n");
1822 for (const auto &ii : tfi->includes)
1823 {
1824 //printf("ii->name='%s'\n",qPrint(ii->name));
1825 FileName *ifn = Doxygen::inputNameLinkedMap->find(ii.name);
1826 ASSERT(ifn!=nullptr);
1827 if (ifn)
1828 {
1829 for (const auto &ifd : *ifn)
1830 {
1831 //printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
1832 // qPrint(ifd->getOutputFileBase()),qPrint(ii->id));
1833 if (ifd->getOutputFileBase()==QCString(ii.id))
1834 {
1836 if (ii.isModule)
1837 {
1839 }
1840 else if (ii.isImported)
1841 {
1843 }
1844 else if (ii.isLocal)
1845 {
1847 }
1848 fd->addIncludeDependency(ifd.get(),ii.text,kind);
1849 }
1850 }
1851 }
1852 }
1853 }
1854 }
1855 }
1856 }
1857 }
1858}

References ASSERT, ImportLocal, ImportModule, ImportSystem, IncludeLocal, anonymous{tagreader.cpp}::TagFileInfo::includes, IncludeSystem, Doxygen::inputNameLinkedMap, m_tagFileCompounds, m_tagName, anonymous{tagreader.cpp}::TagCompoundInfo::name and anonymous{tagreader.cpp}::TagFileInfo::path.

buildLists()

void anonymous{tagreader.cpp}::TagFileParser::buildLists (const std::shared_ptr< Entry > & root)

Injects the info gathered by the XML parser into the Entry tree. This tree contains the information extracted from the input in a "unrelated" form.

Definition at line 357 of file tagreader.cpp.

1567void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
1568{
1569 // First reorganize the entries in m_tagFileCompounds such that
1570 // outer scope is processed before the nested class scope.
1571 // To solve issue #11569, where a class nested in a specialization is
1572 // processed first, which later causes the wrong class to be used
1573 ClassNode classRoot("");
1574 for (const auto &comp : m_tagFileCompounds)
1575 {
1576 const TagClassInfo *tci = comp.getClassInfo();
1577 if (tci)
1578 {
1579 ClassNode *current = &classRoot;
1580 auto parts = split(tci->name.str(),"::");
1581 for (size_t i=0; i<parts.size(); ++i)
1582 {
1583 const auto &part = parts[i];
1584 if (current->children.find(part)==current->children.end()) // new child node
1585 {
1586 current->children[part] = std::make_unique<ClassNode>(part);
1587 }
1588 current = current->children[part].get();
1589 if (i==parts.size()-1)
1590 {
1591 current->tci = tci;
1592 }
1593 }
1594 }
1595 }
1596
1597 // now process the classes following the tree structure
1598 buildClassTree(root,classRoot);
1599
1600
1601 // build file list
1602 for (const auto &comp : m_tagFileCompounds)
1603 {
1604 const TagFileInfo *tfi = comp.getFileInfo();
1605 if (tfi)
1606 {
1607 std::shared_ptr<Entry> fe = std::make_shared<Entry>();
1608 fe->section = guessSection(tfi->name);
1609 fe->name = tfi->name;
1610 addDocAnchors(fe,tfi->docAnchors);
1611 fe->tagInfoData.tagName = m_tagName;
1612 fe->tagInfoData.fileName = tfi->filename;
1613 fe->hasTagInfo = TRUE;
1614
1615 QCString fullName = m_tagName+":"+tfi->path+stripPath(tfi->name);
1616 fe->fileName = fullName;
1617 fe->startLine = tfi->lineNr;
1618 //printf("createFileDef() filename=%s\n",qPrint(tfi->filename));
1619 QCString tagid = m_tagName+":"+tfi->path;
1620 auto fd = createFileDef(tagid, tfi->name,m_tagName, tfi->filename);
1621 FileName *mn = Doxygen::inputNameLinkedMap->find(tfi->name);
1622 if (mn)
1623 {
1624 mn->push_back(std::move(fd));
1625 }
1626 else
1627 {
1628 mn = Doxygen::inputNameLinkedMap->add(tfi->name,fullName);
1629 mn->push_back(std::move(fd));
1630 }
1631 buildMemberList(fe,tfi->members);
1632 root->moveToSubEntryAndKeep(fe);
1633 }
1634 }
1635
1636 // build concept list
1637 for (const auto &comp : m_tagFileCompounds)
1638 {
1639 const TagConceptInfo *tci = comp.getConceptInfo();
1640 if (tci)
1641 {
1642 std::shared_ptr<Entry> ce = std::make_shared<Entry>();
1643 ce->section = EntryType::makeConcept();
1644 ce->name = tci->name;
1645 addDocAnchors(ce,tci->docAnchors);
1646 ce->tagInfoData.tagName = m_tagName;
1647 ce->tagInfoData.fileName = tci->filename;
1648 ce->startLine = tci->lineNr;
1649 ce->fileName = m_tagName;
1650 ce->hasTagInfo = TRUE;
1651 ce->id = tci->clangId;
1652
1653 root->moveToSubEntryAndKeep(ce);
1654 }
1655 }
1656
1657 // build module list
1658 for (const auto &comp : m_tagFileCompounds)
1659 {
1660 const TagModuleInfo *tmi = comp.getModuleInfo();
1661 if (tmi)
1662 {
1663 auto &mm = ModuleManager::instance();
1664 mm.createModuleDef(tmi->filename,tmi->lineNr,1,true,tmi->name,QCString());
1665 mm.addTagInfo(tmi->filename,m_tagName,tmi->clangId);
1666
1667 ModuleDef *mod = mm.getPrimaryInterface(tmi->name);
1668 if (mod && !tmi->docAnchors.empty())
1669 {
1670 std::vector<const SectionInfo *> anchorList;
1671 for (const auto &ta : tmi->docAnchors)
1672 {
1673 if (SectionManager::instance().find(QCString(ta.label))==nullptr)
1674 {
1675 //printf("New sectionInfo file=%s anchor=%s\n",
1676 // qPrint(ta->fileName),qPrint(ta->label));
1678 ta.label,ta.fileName,-1,ta.title,
1680 anchorList.push_back(si);
1681 }
1682 else
1683 {
1684 p_warn("Duplicate anchor {} found",ta.label);
1685 }
1686 }
1687 mod->addSectionsToDefinition(anchorList);
1688 }
1689 }
1690 }
1691
1692
1693 // build namespace list
1694 for (const auto &comp : m_tagFileCompounds)
1695 {
1696 const TagNamespaceInfo *tni = comp.getNamespaceInfo();
1697 if (tni)
1698 {
1699 std::shared_ptr<Entry> ne = std::make_shared<Entry>();
1700 ne->section = EntryType::makeNamespace();
1701 ne->name = tni->name;
1702 addDocAnchors(ne,tni->docAnchors);
1703 ne->tagInfoData.tagName = m_tagName;
1704 ne->tagInfoData.fileName = tni->filename;
1705 ne->startLine = tni->lineNr;
1706 ne->fileName = m_tagName;
1707 ne->hasTagInfo = TRUE;
1708 ne->id = tni->clangId;
1709
1710 buildMemberList(ne,tni->members);
1711 root->moveToSubEntryAndKeep(ne);
1712 }
1713 }
1714
1715 // build package list
1716 for (const auto &comp : m_tagFileCompounds)
1717 {
1718 const TagPackageInfo *tpgi = comp.getPackageInfo();
1719 if (tpgi)
1720 {
1721 std::shared_ptr<Entry> pe = std::make_shared<Entry>();
1722 pe->section = EntryType::makePackage();
1723 pe->name = tpgi->name;
1724 addDocAnchors(pe,tpgi->docAnchors);
1725 pe->tagInfoData.tagName = m_tagName;
1726 pe->tagInfoData.fileName = tpgi->filename;
1727 pe->startLine = tpgi->lineNr;
1728 pe->fileName = m_tagName;
1729 pe->hasTagInfo = TRUE;
1730
1731 buildMemberList(pe,tpgi->members);
1732 root->moveToSubEntryAndKeep(pe);
1733 }
1734 }
1735
1736 // build group list
1737 for (const auto &comp : m_tagFileCompounds)
1738 {
1739 const TagGroupInfo *tgi = comp.getGroupInfo();
1740 if (tgi)
1741 {
1742 std::shared_ptr<Entry> ge = std::make_shared<Entry>();
1743 ge->section = EntryType::makeGroupDoc();
1744 ge->name = tgi->name;
1745 ge->type = tgi->title;
1746 addDocAnchors(ge,tgi->docAnchors);
1747 ge->tagInfoData.tagName = m_tagName;
1748 ge->tagInfoData.fileName = tgi->filename;
1749 ge->startLine = tgi->lineNr;
1750 ge->fileName = m_tagName;
1751 ge->hasTagInfo = TRUE;
1752
1753 buildMemberList(ge,tgi->members);
1754 root->moveToSubEntryAndKeep(ge);
1755 }
1756 }
1757
1758 for (const auto &comp : m_tagFileCompounds)
1759 {
1760 const TagGroupInfo *tgi = comp.getGroupInfo();
1761 if (tgi)
1762 {
1763 // set subgroup relations bug_774118
1764 for (const auto &sg : tgi->subgroupList)
1765 {
1766 const auto &children = root->children();
1767 auto i = std::find_if(children.begin(),children.end(),
1768 [&](const std::shared_ptr<Entry> &e) { return e->name == sg.c_str(); });
1769 if (i!=children.end())
1770 {
1771 (*i)->groups.emplace_back(tgi->name,Grouping::GROUPING_INGROUP);
1772 }
1773 }
1774 }
1775 }
1776
1777 // build page list
1778 for (const auto &comp : m_tagFileCompounds)
1779 {
1780 const TagPageInfo *tpi = comp.getPageInfo();
1781 if (tpi)
1782 {
1783 std::shared_ptr<Entry> pe = std::make_shared<Entry>();
1784 bool isIndex = (stripExtensionGeneral(tpi->filename,getFileNameExtension(tpi->filename))=="index");
1785 pe->section = isIndex ? EntryType::makeMainpageDoc() : EntryType::makePageDoc();
1786 pe->name = tpi->name;
1787 pe->args = tpi->title;
1788 for (const auto &subpage : tpi->subpages)
1789 {
1790 // we add subpage labels as a kind of "inheritance" relation to prevent
1791 // needing to add another list to the Entry class.
1792 pe->extends.emplace_back(stripExtension(QCString(subpage)),Protection::Public,Specifier::Normal);
1793 }
1794 addDocAnchors(pe,tpi->docAnchors);
1795 pe->tagInfoData.tagName = m_tagName;
1796 pe->tagInfoData.fileName = stripExtension(tpi->filename);
1797 pe->startLine = tpi->lineNr;
1798 pe->fileName = m_tagName;
1799 pe->hasTagInfo = TRUE;
1800 root->moveToSubEntryAndKeep(pe);
1801 }
1802 }
1803}

References SectionManager::add, addDocAnchors, DefinitionMutable::addSectionsToDefinition, SectionType::Anchor, buildClassTree, buildMemberList, anonymous{tagreader.cpp}::TagFileParser::ClassNode::children, anonymous{tagreader.cpp}::TagConceptInfo::clangId, anonymous{tagreader.cpp}::TagModuleInfo::clangId, anonymous{tagreader.cpp}::TagNamespaceInfo::clangId, createFileDef, anonymous{tagreader.cpp}::TagCompoundInfo::docAnchors, anonymous{tagreader.cpp}::TagCompoundInfo::filename, getFileNameExtension, Grouping::GROUPING_INGROUP, guessSection, Doxygen::inputNameLinkedMap, ModuleManager::instance, SectionManager::instance, anonymous{tagreader.cpp}::TagCompoundInfo::lineNr, m_tagFileCompounds, m_tagName, anonymous{tagreader.cpp}::TagCompoundInfo::members, anonymous{tagreader.cpp}::TagCompoundInfo::name, p_warn, anonymous{tagreader.cpp}::TagFileInfo::path, split, QCString::str, stripExtension, stripExtensionGeneral, stripPath, anonymous{tagreader.cpp}::TagGroupInfo::subgroupList, anonymous{tagreader.cpp}::TagPageInfo::subpages, anonymous{tagreader.cpp}::TagFileParser::ClassNode::tci, anonymous{tagreader.cpp}::TagGroupInfo::title, anonymous{tagreader.cpp}::TagPageInfo::title and TRUE.

buildMemberList()

void anonymous{tagreader.cpp}::TagFileParser::buildMemberList (const std::shared_ptr< Entry > & ce, const std::vector< TagMemberInfo > & members)

Definition at line 985 of file tagreader.cpp.

1383void TagFileParser::buildMemberList(const std::shared_ptr<Entry> &ce,const std::vector<TagMemberInfo> &members)
1384{
1385 for (const auto &tmi : members)
1386 {
1387 std::shared_ptr<Entry> me = std::make_shared<Entry>();
1388 me->type = tmi.type;
1389 me->name = tmi.name;
1390 me->args = tmi.arglist;
1391 if (!me->args.isEmpty())
1392 {
1393 me->argList = *stringToArgumentList(SrcLangExt::Cpp,me->args);
1394 }
1395 if (tmi.enumValues.size()>0)
1396 {
1397 me->spec.setStrong(true);
1398 for (const auto &evi : tmi.enumValues)
1399 {
1400 std::shared_ptr<Entry> ev = std::make_shared<Entry>();
1401 ev->type = "@";
1402 ev->name = evi.name;
1403 ev->id = evi.clangid;
1404 ev->section = EntryType::makeVariable();
1405 ev->tagInfoData.tagName = m_tagName;
1406 ev->tagInfoData.anchor = evi.anchor;
1407 ev->tagInfoData.fileName = evi.file;
1408 ev->hasTagInfo = TRUE;
1409 me->moveToSubEntryAndKeep(ev);
1410 }
1411 }
1412 me->protection = tmi.prot;
1413 me->virt = tmi.virt;
1414 me->isStatic = tmi.isStatic;
1415 me->fileName = ce->fileName;
1416 me->id = tmi.clangId;
1417 me->startLine = tmi.lineNr;
1418 if (ce->section.isGroupDoc())
1419 {
1420 me->groups.emplace_back(ce->name,Grouping::GROUPING_INGROUP);
1421 }
1422 addDocAnchors(me,tmi.docAnchors);
1423 me->tagInfoData.tagName = m_tagName;
1424 me->tagInfoData.anchor = tmi.anchor;
1425 me->tagInfoData.fileName = tmi.anchorFile;
1426 me->hasTagInfo = TRUE;
1427 if (tmi.kind=="define")
1428 {
1429 me->type="#define";
1430 me->section = EntryType::makeDefine();
1431 }
1432 else if (tmi.kind=="enumvalue")
1433 {
1434 me->section = EntryType::makeVariable();
1435 me->mtype = MethodTypes::Method;
1436 }
1437 else if (tmi.kind=="property")
1438 {
1439 me->section = EntryType::makeVariable();
1440 me->mtype = MethodTypes::Property;
1441 }
1442 else if (tmi.kind=="event")
1443 {
1444 me->section = EntryType::makeVariable();
1445 me->mtype = MethodTypes::Event;
1446 }
1447 else if (tmi.kind=="variable")
1448 {
1449 me->section = EntryType::makeVariable();
1450 me->mtype = MethodTypes::Method;
1451 }
1452 else if (tmi.kind=="typedef")
1453 {
1454 me->section = EntryType::makeVariable();
1455 me->type.prepend("typedef ");
1456 me->mtype = MethodTypes::Method;
1457 }
1458 else if (tmi.kind=="enumeration")
1459 {
1460 me->section = EntryType::makeEnum();
1461 me->mtype = MethodTypes::Method;
1462 }
1463 else if (tmi.kind=="function")
1464 {
1465 me->section = EntryType::makeFunction();
1466 me->mtype = MethodTypes::Method;
1467 }
1468 else if (tmi.kind=="signal")
1469 {
1470 me->section = EntryType::makeFunction();
1471 me->mtype = MethodTypes::Signal;
1472 }
1473 else if (tmi.kind=="prototype")
1474 {
1475 me->section = EntryType::makeFunction();
1476 me->mtype = MethodTypes::Method;
1477 }
1478 else if (tmi.kind=="friend")
1479 {
1480 me->section = EntryType::makeFunction();
1481 me->type.prepend("friend ");
1482 me->mtype = MethodTypes::Method;
1483 }
1484 else if (tmi.kind=="dcop")
1485 {
1486 me->section = EntryType::makeFunction();
1487 me->mtype = MethodTypes::DCOP;
1488 }
1489 else if (tmi.kind=="slot")
1490 {
1491 me->section = EntryType::makeFunction();
1492 me->mtype = MethodTypes::Slot;
1493 }
1494 ce->moveToSubEntryAndKeep(me);
1495 }
1496}

References addDocAnchors, Grouping::GROUPING_INGROUP, m_tagName, stringToArgumentList and TRUE.

Referenced by buildClassEntry and buildLists.

characters()

void anonymous{tagreader.cpp}::TagFileParser::characters (const QCString & ch)
inline

Definition at line 350 of file tagreader.cpp.

350 void characters ( const QCString & ch ) { m_curString+=ch; }

Reference m_curString.

dump()

void anonymous{tagreader.cpp}::TagFileParser::dump ()

Dumps the internal structures. For debugging only!

Definition at line 356 of file tagreader.cpp.

1177{
1178 Debug::print(Debug::Tag,0,"-------- Results --------\n");
1179 //============== CLASSES
1180 for (const auto &comp : m_tagFileCompounds)
1181 {
1182 if (comp.type()==TagCompoundVariant::Type::Class)
1183 {
1184 const TagClassInfo *cd = comp.getClassInfo();
1185 Debug::print(Debug::Tag,0,"class '{}'\n",cd->name);
1186 Debug::print(Debug::Tag,0," filename '{}'\n",cd->filename);
1187 for (const BaseInfo &bi : cd->bases)
1188 {
1189 Debug::print(Debug::Tag,0, " base: {}\n",bi.name);
1190 }
1191
1192 for (const auto &md : cd->members)
1193 {
1194 Debug::print(Debug::Tag,0," member:\n");
1195 Debug::print(Debug::Tag,0," kind: '{}'\n",md.kind);
1196 Debug::print(Debug::Tag,0," name: '{}'\n",md.name);
1197 Debug::print(Debug::Tag,0," anchor: '{}'\n",md.anchor);
1198 Debug::print(Debug::Tag,0," arglist: '{}'\n",md.arglist);
1199 }
1200 }
1201 }
1202 //============== CONCEPTS
1203 for (const auto &comp : m_tagFileCompounds)
1204 {
1205 if (comp.type()==TagCompoundVariant::Type::Concept)
1206 {
1207 const TagConceptInfo *cd = comp.getConceptInfo();
1208
1209 Debug::print(Debug::Tag,0,"concept '{}'\n",cd->name);
1210 Debug::print(Debug::Tag,0," filename '{}'\n",cd->filename);
1211 }
1212 }
1213 //============== MODULES
1214 for (const auto &comp : m_tagFileCompounds)
1215 {
1216 if (comp.type()==TagCompoundVariant::Type::Module)
1217 {
1218 const TagModuleInfo *mi = comp.getModuleInfo();
1219
1220 Debug::print(Debug::Tag,0,"module '{}'\n",mi->name);
1221 Debug::print(Debug::Tag,0," filename '{}'\n",mi->filename);
1222 }
1223 }
1224 //============== NAMESPACES
1225 for (const auto &comp : m_tagFileCompounds)
1226 {
1228 {
1229 const TagNamespaceInfo *nd = comp.getNamespaceInfo();
1230
1231 Debug::print(Debug::Tag,0,"namespace '{}'\n",nd->name);
1232 Debug::print(Debug::Tag,0," filename '{}'\n",nd->filename);
1233 for (const auto &cls : nd->classList)
1234 {
1235 Debug::print(Debug::Tag,0, " class: {}\n",cls);
1236 }
1237
1238 for (const auto &md : nd->members)
1239 {
1240 Debug::print(Debug::Tag,0," member:\n");
1241 Debug::print(Debug::Tag,0," kind: '{}'\n",md.kind);
1242 Debug::print(Debug::Tag,0," name: '{}'\n",md.name);
1243 Debug::print(Debug::Tag,0," anchor: '{}'\n",md.anchor);
1244 Debug::print(Debug::Tag,0," arglist: '{}'\n",md.arglist);
1245 }
1246 }
1247 }
1248
1249 //============== FILES
1250 for (const auto &comp : m_tagFileCompounds)
1251 {
1252 if (comp.type()==TagCompoundVariant::Type::File)
1253 {
1254 const TagFileInfo *fd = comp.getFileInfo();
1255
1256 Debug::print(Debug::Tag,0,"file '{}'\n",fd->name);
1257 Debug::print(Debug::Tag,0," filename '{}'\n",fd->filename);
1258 for (const auto &ns : fd->namespaceList)
1259 {
1260 Debug::print(Debug::Tag,0, " namespace: {}\n",ns);
1261 }
1262 for (const auto &cs : fd->classList)
1263 {
1264 Debug::print(Debug::Tag,0, " class: {} \n",cs);
1265 }
1266
1267 for (const auto &md : fd->members)
1268 {
1269 Debug::print(Debug::Tag,0," member:\n");
1270 Debug::print(Debug::Tag,0," kind: '{}'\n",md.kind);
1271 Debug::print(Debug::Tag,0," name: '{}'\n",md.name);
1272 Debug::print(Debug::Tag,0," anchor: '{}'\n",md.anchor);
1273 Debug::print(Debug::Tag,0," arglist: '{}'\n",md.arglist);
1274 }
1275
1276 for (const auto &ii : fd->includes)
1277 {
1278 Debug::print(Debug::Tag,0," includes id: {} name: {}\n",ii.id,ii.name);
1279 }
1280 }
1281 }
1282
1283 //============== GROUPS
1284 for (const auto &comp : m_tagFileCompounds)
1285 {
1286 if (comp.type()==TagCompoundVariant::Type::Group)
1287 {
1288 const TagGroupInfo *gd = comp.getGroupInfo();
1289 Debug::print(Debug::Tag,0,"group '{}'\n",gd->name);
1290 Debug::print(Debug::Tag,0," filename '{}'\n",gd->filename);
1291
1292 for (const auto &ns : gd->namespaceList)
1293 {
1294 Debug::print(Debug::Tag,0, " namespace: {}\n",ns);
1295 }
1296 for (const auto &cs : gd->classList)
1297 {
1298 Debug::print(Debug::Tag,0, " class: {}\n",cs);
1299 }
1300 for (const auto &fi : gd->fileList)
1301 {
1302 Debug::print(Debug::Tag,0, " file: {}\n",fi);
1303 }
1304 for (const auto &sg : gd->subgroupList)
1305 {
1306 Debug::print(Debug::Tag,0, " subgroup: {}\n",sg);
1307 }
1308 for (const auto &pg : gd->pageList)
1309 {
1310 Debug::print(Debug::Tag,0, " page: {}\n",pg);
1311 }
1312
1313 for (const auto &md : gd->members)
1314 {
1315 Debug::print(Debug::Tag,0," member:\n");
1316 Debug::print(Debug::Tag,0," kind: '{}'\n",md.kind);
1317 Debug::print(Debug::Tag,0," name: '{}'\n",md.name);
1318 Debug::print(Debug::Tag,0," anchor: '{}'\n",md.anchor);
1319 Debug::print(Debug::Tag,0," arglist: '{}'\n",md.arglist);
1320 }
1321 }
1322 }
1323
1324 //============== PAGES
1325 for (const auto &comp : m_tagFileCompounds)
1326 {
1327 if (comp.type()==TagCompoundVariant::Type::Page)
1328 {
1329 const TagPageInfo *pd = comp.getPageInfo();
1330 Debug::print(Debug::Tag,0,"page '{}'\n",pd->name);
1331 Debug::print(Debug::Tag,0," title '{}'\n",pd->title);
1332 Debug::print(Debug::Tag,0," filename '{}'\n",pd->filename);
1333 }
1334 }
1335
1336 //============== DIRS
1337 for (const auto &comp : m_tagFileCompounds)
1338 {
1339 if (comp.type()==TagCompoundVariant::Type::Dir)
1340 {
1341 const TagDirInfo *dd = comp.getDirInfo();
1342 {
1343 Debug::print(Debug::Tag,0,"dir '{}'\n",dd->name);
1344 Debug::print(Debug::Tag,0," path '{}'\n",dd->path);
1345 for (const auto &fi : dd->fileList)
1346 {
1347 Debug::print(Debug::Tag,0, " file: {}\n",fi);
1348 }
1349 for (const auto &sd : dd->subdirList)
1350 {
1351 Debug::print(Debug::Tag,0, " subdir: {}\n",sd);
1352 }
1353 }
1354 }
1355 }
1356 Debug::print(Debug::Tag,0,"-------------------------\n");
1357}

References anonymous{tagreader.cpp}::TagClassInfo::bases, anonymous{tagreader.cpp}::TagCompoundVariant::Class, anonymous{tagreader.cpp}::TagFileInfo::classList, anonymous{tagreader.cpp}::TagGroupInfo::classList, anonymous{tagreader.cpp}::TagNamespaceInfo::classList, anonymous{tagreader.cpp}::TagCompoundVariant::Concept, anonymous{tagreader.cpp}::TagCompoundVariant::Dir, anonymous{tagreader.cpp}::TagCompoundVariant::File, anonymous{tagreader.cpp}::TagDirInfo::fileList, anonymous{tagreader.cpp}::TagGroupInfo::fileList, anonymous{tagreader.cpp}::TagCompoundInfo::filename, anonymous{tagreader.cpp}::TagCompoundVariant::Group, anonymous{tagreader.cpp}::TagFileInfo::includes, m_tagFileCompounds, anonymous{tagreader.cpp}::TagCompoundInfo::members, anonymous{tagreader.cpp}::TagCompoundVariant::Module, anonymous{tagreader.cpp}::TagCompoundInfo::name, BaseInfo::name, anonymous{tagreader.cpp}::TagCompoundVariant::Namespace, anonymous{tagreader.cpp}::TagFileInfo::namespaceList, anonymous{tagreader.cpp}::TagGroupInfo::namespaceList, anonymous{tagreader.cpp}::TagCompoundVariant::Page, anonymous{tagreader.cpp}::TagGroupInfo::pageList, anonymous{tagreader.cpp}::TagDirInfo::path, Debug::print, anonymous{tagreader.cpp}::TagDirInfo::subdirList, anonymous{tagreader.cpp}::TagGroupInfo::subgroupList, Debug::Tag and anonymous{tagreader.cpp}::TagPageInfo::title.

endAnchor()

void anonymous{tagreader.cpp}::TagFileParser::endAnchor ()
inline

Definition at line 877 of file tagreader.cpp.

877 void endAnchor()
878 {
879 if (m_state==InMember)
880 {
881 m_curMember.anchor = m_curString;
882 }
883 else if (m_state==InClass)
884 {
885 TagClassInfo *info = m_curCompound.getClassInfo();
886 if (info) info->anchor = m_curString;
887 }
888 else
889 {
890 p_warn("Unexpected tag 'anchor' found");
891 }
892 }

References anonymous{tagreader.cpp}::TagClassInfo::anchor, InClass, InMember, m_curCompound, m_curMember, m_curString, m_state and p_warn.

endAnchorFile()

void anonymous{tagreader.cpp}::TagFileParser::endAnchorFile ()
inline

Definition at line 918 of file tagreader.cpp.

919 {
920 if (m_state==InMember)
921 {
922 m_curMember.anchorFile = m_curString;
923 }
924 else
925 {
926 p_warn("Unexpected tag 'anchorfile' found");
927 }
928 }

References InMember, m_curMember, m_curString, m_state and p_warn.

endArglist()

void anonymous{tagreader.cpp}::TagFileParser::endArglist ()
inline

Definition at line 930 of file tagreader.cpp.

931 {
932 if (m_state==InMember)
933 {
934 m_curMember.arglist = m_curString;
935 }
936 else
937 {
938 p_warn("Unexpected tag 'arglist' found");
939 }
940 }

References InMember, m_curMember, m_curString, m_state and p_warn.

endBase()

void anonymous{tagreader.cpp}::TagFileParser::endBase ()
inline

Definition at line 779 of file tagreader.cpp.

779 void endBase()
780 {
781 TagClassInfo *info = m_curCompound.getClassInfo();
782 if (m_state==InClass && info)
783 {
784 info->bases.back().name = m_curString;
785 }
786 else
787 {
788 p_warn("Unexpected tag 'base' found");
789 }
790 }

References anonymous{tagreader.cpp}::TagClassInfo::bases, InClass, m_curCompound, m_curString, m_state and p_warn.

endClangId()

void anonymous{tagreader.cpp}::TagFileParser::endClangId ()
inline

Definition at line 894 of file tagreader.cpp.

895 {
896 if (m_state==InMember)
897 {
898 m_curMember.clangId = m_curString;
899 }
900 else if (m_state==InClass)
901 {
902 TagClassInfo *info = m_curCompound.getClassInfo();
903 if (info) info->clangId = m_curString;
904 }
905 else if (m_state==InNamespace)
906 {
907 TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
908 if (info) info->clangId = m_curString;
909 }
910 else
911 {
912 p_warn("Unexpected tag 'clangid' found");
913 }
914 }

References anonymous{tagreader.cpp}::TagClassInfo::clangId, anonymous{tagreader.cpp}::TagNamespaceInfo::clangId, InClass, InMember, InNamespace, m_curCompound, m_curMember, m_curString, m_state and p_warn.

endClass()

void anonymous{tagreader.cpp}::TagFileParser::endClass ()
inline

Definition at line 516 of file tagreader.cpp.

516 void endClass()
517 {
518 switch(m_state)
519 {
520 case InClass:
521 {
522 TagClassInfo *info = m_curCompound.getClassInfo();
523 if (info) info->classList.push_back(m_curString.str());
524 }
525 break;
526 case InFile:
527 {
528 TagFileInfo *info = m_curCompound.getFileInfo();
529 if (info) info->classList.push_back(m_curString.str());
530 }
531 break;
532 case InNamespace:
533 {
534 TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
535 if (info) info->classList.push_back(m_curString.str());
536 }
537 break;
538 case InGroup:
539 {
540 TagGroupInfo *info = m_curCompound.getGroupInfo();
541 if (info) info->classList.push_back(m_curString.str());
542 }
543 break;
544 case InPackage:
545 {
546 TagPackageInfo *info = m_curCompound.getPackageInfo();
547 if (info) info->classList.push_back(m_curString.str());
548 }
549 break;
550 default:
551 p_warn("Unexpected tag 'class' found");
552 break;
553 }
554 }

References anonymous{tagreader.cpp}::TagClassInfo::classList, anonymous{tagreader.cpp}::TagFileInfo::classList, anonymous{tagreader.cpp}::TagGroupInfo::classList, anonymous{tagreader.cpp}::TagNamespaceInfo::classList, anonymous{tagreader.cpp}::TagPackageInfo::classList, InClass, InFile, InGroup, InNamespace, InPackage, m_curCompound, m_curString, m_state and p_warn.

endCompound()

void anonymous{tagreader.cpp}::TagFileParser::endCompound ()
inline

Definition at line 361 of file tagreader.cpp.

362 {
363 switch (m_state)
364 {
365 case InClass:
366 case InConcept:
367 case InFile:
368 case InNamespace:
369 case InGroup:
370 case InPage:
371 case InDir:
372 case InModule:
373 case InPackage:
374 m_tagFileCompounds.push_back(std::move(m_curCompound));
375 break;
376 default:
377 p_warn("tag 'compound' was not expected!");
378 break;
379 }
380 }

References InClass, InConcept, InDir, InFile, InGroup, InModule, InNamespace, InPackage, InPage, m_curCompound, m_state, m_tagFileCompounds and p_warn.

endConcept()

void anonymous{tagreader.cpp}::TagFileParser::endConcept ()
inline

Definition at line 556 of file tagreader.cpp.

557 {
558 switch(m_state)
559 {
560 case InNamespace:
561 {
562 TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
563 if (info) info->conceptList.push_back(m_curString.str());
564 }
565 break;
566 case InFile:
567 {
568 TagFileInfo *info = m_curCompound.getFileInfo();
569 if (info) info->conceptList.push_back(m_curString.str());
570 }
571 break;
572 case InGroup:
573 {
574 TagGroupInfo *info = m_curCompound.getGroupInfo();
575 if (info) info->conceptList.push_back(m_curString.str());
576 }
577 break;
578 default:
579 p_warn("Unexpected tag 'concept' found");
580 break;
581 }
582 }

References anonymous{tagreader.cpp}::TagFileInfo::conceptList, anonymous{tagreader.cpp}::TagGroupInfo::conceptList, anonymous{tagreader.cpp}::TagNamespaceInfo::conceptList, InFile, InGroup, InNamespace, m_curCompound, m_curString, m_state and p_warn.

endDir()

void anonymous{tagreader.cpp}::TagFileParser::endDir ()
inline

Definition at line 682 of file tagreader.cpp.

682 void endDir()
683 {
684 switch(m_state)
685 {
686 case InDir:
687 {
688 TagDirInfo *info = m_curCompound.getDirInfo();
689 if (info) info->subdirList.push_back(m_curString.str());
690 }
691 break;
692 default:
693 p_warn("Unexpected tag 'dir' found");
694 break;
695 }
696 }

References InDir, m_curCompound, m_curString, m_state, p_warn and anonymous{tagreader.cpp}::TagDirInfo::subdirList.

endDocAnchor()

void anonymous{tagreader.cpp}::TagFileParser::endDocAnchor ()
inline

Definition at line 469 of file tagreader.cpp.

470 {
471 // Check whether or not the tag is automatically generate, in that case ignore the tag.
472 switch(m_state)
473 {
474 case InClass:
475 case InConcept:
476 case InFile:
477 case InNamespace:
478 case InGroup:
479 case InPage:
480 case InMember:
481 case InPackage:
482 case InDir:
483 case InModule:
485 break;
486 default:
487 p_warn("Unexpected tag 'docanchor' found");
488 return;
489 }
490 switch(m_state)
491 {
492 case InClass:
493 case InConcept:
494 case InFile:
495 case InNamespace:
496 case InGroup:
497 case InPage:
498 case InPackage:
499 case InDir:
500 case InModule:
501 {
502 TagCompoundInfo *info = m_curCompound.getCompoundInfo();
503 if (info)
504 {
505 info->docAnchors.emplace_back(m_fileName,m_curString,m_title);
506 }
507 }
508 break;
509 case InMember:
510 m_curMember.docAnchors.emplace_back(m_fileName,m_curString,m_title);
511 break;
512 default: break; // will not be reached
513 }
514 }

References anonymous{tagreader.cpp}::TagCompoundInfo::docAnchors, InClass, InConcept, InDir, InFile, InGroup, InMember, InModule, InNamespace, InPackage, InPage, AnchorGenerator::looksGenerated, m_curCompound, m_curMember, m_curString, m_fileName, m_state, m_title and p_warn.

endElement()

void anonymous{tagreader.cpp}::TagFileParser::endElement (const QCString & name)

Definition at line 349 of file tagreader.cpp.

1135{
1136 //printf("endElement '%s'\n",qPrint(name));
1137 auto it = g_elementHandlers.find(name.str());
1138 if (it!=std::end(g_elementHandlers))
1139 {
1140 it->second.endCb(*this);
1141 }
1142 else
1143 {
1144 p_warn("Unknown end tag '{}' found!",name);
1145 }
1146}

References anonymous{tagreader.cpp}::g_elementHandlers, p_warn and QCString::str.

endEnumValue()

void anonymous{tagreader.cpp}::TagFileParser::endEnumValue ()
inline

Definition at line 457 of file tagreader.cpp.

458 {
460 m_state = m_stateStack.top();
461 m_stateStack.pop();
462 if (m_state==InMember)
463 {
464 m_curMember.enumValues.push_back(m_curEnumValue);
466 }
467 }

References InMember, m_curEnumValue, m_curMember, m_curString, m_state, m_stateStack, QCString::str and QCString::stripWhiteSpace.

endFile()

void anonymous{tagreader.cpp}::TagFileParser::endFile ()
inline

Definition at line 628 of file tagreader.cpp.

628 void endFile()
629 {
630 switch(m_state)
631 {
632 case InGroup:
633 {
634 TagGroupInfo *info = m_curCompound.getGroupInfo();
635 if (info) info->fileList.push_back(m_curString.str());
636 }
637 break;
638 case InDir:
639 {
640 TagDirInfo *info = m_curCompound.getDirInfo();
641 if (info) info->fileList.push_back(m_curString.str());
642 }
643 break;
644 default:
645 p_warn("Unexpected tag 'file' found");
646 break;
647 }
648 }

References anonymous{tagreader.cpp}::TagDirInfo::fileList, anonymous{tagreader.cpp}::TagGroupInfo::fileList, InDir, InGroup, m_curCompound, m_curString, m_state and p_warn.

endFilename()

void anonymous{tagreader.cpp}::TagFileParser::endFilename ()
inline

Definition at line 831 of file tagreader.cpp.

832 {
833 switch (m_state)
834 {
835 case InClass:
836 case InConcept:
837 case InNamespace:
838 case InFile:
839 case InGroup:
840 case InPage:
841 case InPackage:
842 case InDir:
843 case InModule:
844 {
845 TagCompoundInfo *info = m_curCompound.getCompoundInfo();
846 if (info) info->filename = m_curString;
847 }
848 break;
849 default:
850 p_warn("Unexpected tag 'filename' found");
851 break;
852 }
853 }

References anonymous{tagreader.cpp}::TagCompoundInfo::filename, InClass, InConcept, InDir, InFile, InGroup, InModule, InNamespace, InPackage, InPage, m_curCompound, m_curString, m_state and p_warn.

endIgnoreElement()

void anonymous{tagreader.cpp}::TagFileParser::endIgnoreElement ()
inline

Definition at line 981 of file tagreader.cpp.

982 {
983 }

endIncludes()

void anonymous{tagreader.cpp}::TagFileParser::endIncludes ()
inline

Definition at line 804 of file tagreader.cpp.

805 {
807 TagFileInfo *info = m_curCompound.getFileInfo();
808 if (m_state==InFile && info)
809 {
810 info->includes.push_back(m_curIncludes);
811 }
812 else
813 {
814 p_warn("Unexpected tag 'includes' found");
815 }
816 }

References anonymous{tagreader.cpp}::TagFileInfo::includes, InFile, m_curCompound, m_curIncludes, m_curString, m_state and p_warn.

endMember()

void anonymous{tagreader.cpp}::TagFileParser::endMember ()
inline

Definition at line 414 of file tagreader.cpp.

414 void endMember()
415 {
416 m_state = m_stateStack.top();
417 m_stateStack.pop();
418 switch(m_state)
419 {
420 case InClass:
421 case InFile:
422 case InNamespace:
423 case InGroup:
424 case InPackage:
425 {
426 TagCompoundInfo *info = m_curCompound.getCompoundInfo();
427 if (info)
428 {
429 info->members.push_back(m_curMember);
430 }
431 }
432 break;
433 default:
434 p_warn("Unexpected tag 'member' found");
435 break;
436 }
437 }

References InClass, InFile, InGroup, InNamespace, InPackage, m_curCompound, m_curMember, m_state, m_stateStack, anonymous{tagreader.cpp}::TagCompoundInfo::members and p_warn.

endModule()

void anonymous{tagreader.cpp}::TagFileParser::endModule ()
inline

Definition at line 584 of file tagreader.cpp.

584 void endModule()
585 {
586 switch(m_state)
587 {
588 case InGroup:
589 {
590 TagGroupInfo *info = m_curCompound.getGroupInfo();
591 if (info) info->moduleList.push_back(m_curString.str());
592 }
593 break;
594 default:
595 p_warn("Unexpected tag 'module' found");
596 break;
597 }
598 }

References InGroup, m_curCompound, m_curString, m_state, anonymous{tagreader.cpp}::TagGroupInfo::moduleList and p_warn.

endName()

void anonymous{tagreader.cpp}::TagFileParser::endName ()
inline

Definition at line 722 of file tagreader.cpp.

722 void endName()
723 {
724 switch (m_state)
725 {
726 case InClass:
727 case InConcept:
728 case InFile:
729 case InNamespace:
730 case InGroup:
731 case InPage:
732 case InDir:
733 case InPackage:
734 case InModule:
735 {
736 TagCompoundInfo *info = m_curCompound.getCompoundInfo();
737 if (info) info->name = m_curString;
738 }
739 break;
740 case InMember:
742 break;
743 default:
744 p_warn("Unexpected tag 'name' found");
745 break;
746 }
747 }

References InClass, InConcept, InDir, InFile, InGroup, InMember, InModule, InNamespace, InPackage, InPage, m_curCompound, m_curMember, m_curString, m_state, anonymous{tagreader.cpp}::TagCompoundInfo::name and p_warn.

endNamespace()

void anonymous{tagreader.cpp}::TagFileParser::endNamespace ()
inline

Definition at line 600 of file tagreader.cpp.

601 {
602 switch(m_state)
603 {
604 case InNamespace:
605 {
606 TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
607 if (info) info->namespaceList.push_back(m_curString.str());
608 }
609 break;
610 case InFile:
611 {
612 TagFileInfo *info = m_curCompound.getFileInfo();
613 if (info) info->namespaceList.push_back(m_curString.str());
614 }
615 break;
616 case InGroup:
617 {
618 TagGroupInfo *info = m_curCompound.getGroupInfo();
619 if (info) info->namespaceList.push_back(m_curString.str());
620 }
621 break;
622 default:
623 p_warn("Unexpected tag 'namespace' found");
624 break;
625 }
626 }

References InFile, InGroup, InNamespace, m_curCompound, m_curString, m_state, anonymous{tagreader.cpp}::TagFileInfo::namespaceList, anonymous{tagreader.cpp}::TagGroupInfo::namespaceList, anonymous{tagreader.cpp}::TagNamespaceInfo::namespaceList and p_warn.

endPage()

void anonymous{tagreader.cpp}::TagFileParser::endPage ()
inline

Definition at line 650 of file tagreader.cpp.

650 void endPage()
651 {
652 switch(m_state)
653 {
654 case InGroup:
655 {
656 TagGroupInfo *info = m_curCompound.getGroupInfo();
657 if (info) info->fileList.push_back(m_curString.str());
658 }
659 break;
660 default:
661 p_warn("Unexpected tag 'page' found");
662 break;
663 }
664 }

References anonymous{tagreader.cpp}::TagGroupInfo::fileList, InGroup, m_curCompound, m_curString, m_state and p_warn.

endPath()

void anonymous{tagreader.cpp}::TagFileParser::endPath ()
inline

Definition at line 855 of file tagreader.cpp.

855 void endPath()
856 {
857 switch (m_state)
858 {
859 case InFile:
860 {
861 TagFileInfo *info = m_curCompound.getFileInfo();
862 if (info) info->path = m_curString;
863 }
864 break;
865 case InDir:
866 {
867 TagDirInfo *info = m_curCompound.getDirInfo();
868 if (info) info->path = m_curString;
869 }
870 break;
871 default:
872 p_warn("Unexpected tag 'path' found");
873 break;
874 }
875 }

References InDir, InFile, m_curCompound, m_curString, m_state, p_warn, anonymous{tagreader.cpp}::TagDirInfo::path and anonymous{tagreader.cpp}::TagFileInfo::path.

endSubgroup()

void anonymous{tagreader.cpp}::TagFileParser::endSubgroup ()
inline

Definition at line 964 of file tagreader.cpp.

965 {
966 if (m_state==InGroup)
967 {
968 TagGroupInfo *info = m_curCompound.getGroupInfo();
969 if (info) info->subgroupList.push_back(m_curString.str());
970 }
971 else
972 {
973 p_warn("Unexpected tag 'subgroup' found");
974 }
975 }

References InGroup, m_curCompound, m_curString, m_state, p_warn and anonymous{tagreader.cpp}::TagGroupInfo::subgroupList.

endSubpage()

void anonymous{tagreader.cpp}::TagFileParser::endSubpage ()
inline

Definition at line 666 of file tagreader.cpp.

667 {
668 switch(m_state)
669 {
670 case InPage:
671 {
672 TagPageInfo *info = m_curCompound.getPageInfo();
673 if (info) info->subpages.push_back(m_curString.str());
674 }
675 break;
676 default:
677 p_warn("Unexpected tag 'subpage' found");
678 break;
679 }
680 }

References InPage, m_curCompound, m_curString, m_state, p_warn and anonymous{tagreader.cpp}::TagPageInfo::subpages.

endTemplateArg()

void anonymous{tagreader.cpp}::TagFileParser::endTemplateArg ()
inline

Definition at line 818 of file tagreader.cpp.

819 {
820 TagClassInfo *info = m_curCompound.getClassInfo();
821 if (m_state==InClass && info)
822 {
823 info->templateArguments.push_back(m_curString.str());
824 }
825 else
826 {
827 p_warn("Unexpected tag 'templarg' found");
828 }
829 }

References InClass, m_curCompound, m_curString, m_state, p_warn and anonymous{tagreader.cpp}::TagClassInfo::templateArguments.

endTitle()

void anonymous{tagreader.cpp}::TagFileParser::endTitle ()
inline

Definition at line 942 of file tagreader.cpp.

942 void endTitle()
943 {
944 switch (m_state)
945 {
946 case InGroup:
947 {
948 TagGroupInfo *info = m_curCompound.getGroupInfo();
949 if (info) info->title = m_curString;
950 }
951 break;
952 case InPage:
953 {
954 TagPageInfo *info = m_curCompound.getPageInfo();
955 if (info) info->title = m_curString;
956 }
957 break;
958 default:
959 p_warn("Unexpected tag 'title' found");
960 break;
961 }
962 }

References InGroup, InPage, m_curCompound, m_curString, m_state, p_warn, anonymous{tagreader.cpp}::TagGroupInfo::title and anonymous{tagreader.cpp}::TagPageInfo::title.

endType()

void anonymous{tagreader.cpp}::TagFileParser::endType ()
inline

Definition at line 710 of file tagreader.cpp.

710 void endType()
711 {
712 if (m_state==InMember)
713 {
715 }
716 else
717 {
718 p_warn("Unexpected tag 'type' found");
719 }
720 }

References InMember, m_curMember, m_curString, m_state and p_warn.

error()

void anonymous{tagreader.cpp}::TagFileParser::error (const QCString & fileName, int lineNr, const QCString & msg)
inline

Definition at line 351 of file tagreader.cpp.

351 void error( const QCString &fileName,int lineNr,const QCString &msg)
352 {
353 warn(fileName,lineNr,"{}",msg);
354 }

References msg and warn.

setDocumentLocator()

void anonymous{tagreader.cpp}::TagFileParser::setDocumentLocator (const XMLLocator * locator)
inline

Definition at line 338 of file tagreader.cpp.

338 void setDocumentLocator ( const XMLLocator * locator )
339 {
340 m_locator = locator;
341 }

Reference m_locator.

startBase()

void anonymous{tagreader.cpp}::TagFileParser::startBase (const XMLHandlers::Attributes & attrib)
inline

Definition at line 749 of file tagreader.cpp.

750 {
751 m_curString="";
752 TagClassInfo *info = m_curCompound.getClassInfo();
753 if (m_state==InClass && info)
754 {
755 QCString protStr = XMLHandlers::value(attrib,"protection");
756 QCString virtStr = XMLHandlers::value(attrib,"virtualness");
757 Protection prot = Protection::Public;
758 Specifier virt = Specifier::Normal;
759 if (protStr=="protected")
760 {
761 prot = Protection::Protected;
762 }
763 else if (protStr=="private")
764 {
765 prot = Protection::Private;
766 }
767 if (virtStr=="virtual")
768 {
769 virt = Specifier::Virtual;
770 }
771 info->bases.emplace_back(m_curString,prot,virt);
772 }
773 else
774 {
775 p_warn("Unexpected tag 'base' found");
776 }
777 }

References anonymous{tagreader.cpp}::TagClassInfo::bases, InClass, m_curCompound, m_curString, m_state, p_warn and XMLHandlers::value.

startCompound()

void anonymous{tagreader.cpp}::TagFileParser::startCompound (const XMLHandlers::Attributes & attrib)

Definition at line 359 of file tagreader.cpp.

1149{
1150 m_curString = "";
1151 std::string kind = XMLHandlers::value(attrib,"kind");
1152 std::string isObjC = XMLHandlers::value(attrib,"objc");
1153
1154 auto it = g_compoundFactory.find(kind);
1155 if (it!=g_compoundFactory.end())
1156 {
1157 m_curCompound = it->second.make_instance();
1158 m_state = it->second.state;
1159 TagCompoundInfo *info = m_curCompound.getCompoundInfo();
1160 if (info) info->lineNr = m_locator->lineNr();
1161 }
1162 else
1163 {
1164 p_warn("Unknown compound attribute '{}' found!",kind);
1166 }
1167
1168 TagClassInfo *classInfo = m_curCompound.getClassInfo();
1169 if (isObjC=="yes" && classInfo)
1170 {
1171 classInfo->isObjC = TRUE;
1172 }
1173}

References anonymous{tagreader.cpp}::g_compoundFactory, Invalid, anonymous{tagreader.cpp}::TagClassInfo::isObjC, anonymous{tagreader.cpp}::TagCompoundInfo::lineNr, m_curCompound, m_curString, m_locator, m_state, p_warn, TRUE and XMLHandlers::value.

startDocAnchor()

void anonymous{tagreader.cpp}::TagFileParser::startDocAnchor (const XMLHandlers::Attributes & attrib)
inline

Definition at line 703 of file tagreader.cpp.

704 {
705 m_fileName = XMLHandlers::value(attrib,"file");
706 m_title = XMLHandlers::value(attrib,"title");
707 m_curString = "";
708 }

References m_curString, m_fileName, m_title and XMLHandlers::value.

startDocument()

void anonymous{tagreader.cpp}::TagFileParser::startDocument ()
inline

Definition at line 343 of file tagreader.cpp.

344 {
346 }

References Invalid and m_state.

startElement()

void anonymous{tagreader.cpp}::TagFileParser::startElement (const QCString & name, const XMLHandlers::Attributes & attrib)

Definition at line 348 of file tagreader.cpp.

1121{
1122 //printf("startElement '%s'\n",qPrint(name));
1123 auto it = g_elementHandlers.find(name.str());
1124 if (it!=std::end(g_elementHandlers))
1125 {
1126 it->second.startCb(*this,attrib);
1127 }
1128 else
1129 {
1130 p_warn("Unknown start tag '{}' found!",name);
1131 }
1132}

References anonymous{tagreader.cpp}::g_elementHandlers, p_warn and QCString::str.

startEnumValue()

void anonymous{tagreader.cpp}::TagFileParser::startEnumValue (const XMLHandlers::Attributes & attrib)
inline

Definition at line 439 of file tagreader.cpp.

440 {
441 if (m_state==InMember)
442 {
443 m_curString = "";
445 m_curEnumValue.file = XMLHandlers::value(attrib,"file");
446 m_curEnumValue.anchor = XMLHandlers::value(attrib,"anchor");
447 m_curEnumValue.clangid = XMLHandlers::value(attrib,"clangid");
450 }
451 else
452 {
453 p_warn("Found 'enumvalue' tag outside of member tag");
454 }
455 }

References InEnumValue, InMember, m_curEnumValue, m_curString, m_state, m_stateStack, p_warn and XMLHandlers::value.

startIgnoreElement()

void anonymous{tagreader.cpp}::TagFileParser::startIgnoreElement (const XMLHandlers::Attributes &)
inline

Definition at line 977 of file tagreader.cpp.

978 {
979 }

startIncludes()

void anonymous{tagreader.cpp}::TagFileParser::startIncludes (const XMLHandlers::Attributes & attrib)
inline

Definition at line 792 of file tagreader.cpp.

793 {
795 m_curIncludes.id = XMLHandlers::value(attrib,"id");
796 m_curIncludes.name = XMLHandlers::value(attrib,"name");
797 m_curIncludes.isLocal = XMLHandlers::value(attrib,"local")=="yes";
798 m_curIncludes.isImported = XMLHandlers::value(attrib,"imported")=="yes";
799 m_curIncludes.isModule = XMLHandlers::value(attrib,"module")=="yes";
800 m_curIncludes.isObjC = XMLHandlers::value(attrib,"objc")=="yes";
801 m_curString="";
802 }

References m_curIncludes, m_curString and XMLHandlers::value.

startMember()

void anonymous{tagreader.cpp}::TagFileParser::startMember (const XMLHandlers::Attributes & attrib)
inline

Definition at line 382 of file tagreader.cpp.

383 {
385 m_curMember.kind = XMLHandlers::value(attrib,"kind");
386 QCString protStr = XMLHandlers::value(attrib,"protection");
387 QCString virtStr = XMLHandlers::value(attrib,"virtualness");
388 QCString staticStr = XMLHandlers::value(attrib,"static");
389 m_curMember.lineNr = m_locator->lineNr();
390 if (protStr=="protected")
391 {
392 m_curMember.prot = Protection::Protected;
393 }
394 else if (protStr=="private")
395 {
396 m_curMember.prot = Protection::Private;
397 }
398 if (virtStr=="virtual")
399 {
400 m_curMember.virt = Specifier::Virtual;
401 }
402 else if (virtStr=="pure")
403 {
404 m_curMember.virt = Specifier::Pure;
405 }
406 if (staticStr=="yes")
407 {
408 m_curMember.isStatic = TRUE;
409 }
412 }

References InMember, m_curMember, m_locator, m_state, m_stateStack, TRUE and XMLHandlers::value.

startStringValue()

void anonymous{tagreader.cpp}::TagFileParser::startStringValue (const XMLHandlers::Attributes &)
inline

Definition at line 698 of file tagreader.cpp.

699 {
700 m_curString = "";
701 }

Reference m_curString.

Private Member Functions

buildClassEntry()

void anonymous{tagreader.cpp}::TagFileParser::buildClassEntry (const std::shared_ptr< Entry > & root, const TagClassInfo * tci)

Definition at line 1013 of file tagreader.cpp.

1498void TagFileParser::buildClassEntry(const std::shared_ptr<Entry> &root, const TagClassInfo *tci)
1499{
1500 std::shared_ptr<Entry> ce = std::make_shared<Entry>();
1501 ce->section = EntryType::makeClass();
1502 switch (tci->kind)
1503 {
1504 case TagClassInfo::Kind::Class: break;
1505 case TagClassInfo::Kind::Struct: ce->spec = TypeSpecifier().setStruct(true); break;
1506 case TagClassInfo::Kind::Union: ce->spec = TypeSpecifier().setUnion(true); break;
1507 case TagClassInfo::Kind::Interface: ce->spec = TypeSpecifier().setInterface(true); break;
1508 case TagClassInfo::Kind::Enum: ce->spec = TypeSpecifier().setEnum(true); break;
1509 case TagClassInfo::Kind::Exception: ce->spec = TypeSpecifier().setException(true); break;
1510 case TagClassInfo::Kind::Protocol: ce->spec = TypeSpecifier().setProtocol(true); break;
1511 case TagClassInfo::Kind::Category: ce->spec = TypeSpecifier().setCategory(true); break;
1512 case TagClassInfo::Kind::Service: ce->spec = TypeSpecifier().setService(true); break;
1513 case TagClassInfo::Kind::Singleton: ce->spec = TypeSpecifier().setSingleton(true); break;
1514 case TagClassInfo::Kind::None: // should never happen, means not properly initialized
1515 assert(tci->kind != TagClassInfo::Kind::None);
1516 break;
1517 }
1518 ce->name = tci->name;
1520 {
1521 ce->name+="-p";
1522 }
1523 addDocAnchors(ce,tci->docAnchors);
1524 ce->tagInfoData.tagName = m_tagName;
1525 ce->tagInfoData.anchor = tci->anchor;
1526 ce->tagInfoData.fileName = tci->filename;
1527 ce->startLine = tci->lineNr;
1528 ce->fileName = m_tagName;
1529 ce->hasTagInfo = TRUE;
1530 ce->id = tci->clangId;
1531 ce->lang = tci->isObjC ? SrcLangExt::ObjC : SrcLangExt::Unknown;
1532 // transfer base class list
1533 ce->extends = tci->bases;
1534 if (!tci->templateArguments.empty())
1535 {
1536 ArgumentList al;
1537 for (const auto &argName : tci->templateArguments)
1538 {
1539 Argument a;
1540 a.type = "class";
1541 a.name = argName.c_str();
1542 al.push_back(a);
1543 }
1544 ce->tArgLists.push_back(al);
1545 }
1546
1547 buildMemberList(ce,tci->members);
1548 root->moveToSubEntryAndKeep(ce);
1549}

References addDocAnchors, anonymous{tagreader.cpp}::TagClassInfo::anchor, anonymous{tagreader.cpp}::TagClassInfo::bases, buildMemberList, anonymous{tagreader.cpp}::TagClassInfo::Category, anonymous{tagreader.cpp}::TagClassInfo::clangId, anonymous{tagreader.cpp}::TagClassInfo::Class, anonymous{tagreader.cpp}::TagCompoundInfo::docAnchors, anonymous{tagreader.cpp}::TagClassInfo::Enum, anonymous{tagreader.cpp}::TagClassInfo::Exception, anonymous{tagreader.cpp}::TagCompoundInfo::filename, anonymous{tagreader.cpp}::TagClassInfo::Interface, anonymous{tagreader.cpp}::TagClassInfo::isObjC, anonymous{tagreader.cpp}::TagClassInfo::kind, anonymous{tagreader.cpp}::TagCompoundInfo::lineNr, m_tagName, anonymous{tagreader.cpp}::TagCompoundInfo::members, anonymous{tagreader.cpp}::TagCompoundInfo::name, Argument::name, anonymous{tagreader.cpp}::TagClassInfo::None, anonymous{tagreader.cpp}::TagClassInfo::Protocol, ArgumentList::push_back, anonymous{tagreader.cpp}::TagClassInfo::Service, anonymous{tagreader.cpp}::TagClassInfo::Singleton, anonymous{tagreader.cpp}::TagClassInfo::Struct, anonymous{tagreader.cpp}::TagClassInfo::templateArguments, TRUE, Argument::type and anonymous{tagreader.cpp}::TagClassInfo::Union.

Referenced by buildClassTree.

buildClassTree()

void anonymous{tagreader.cpp}::TagFileParser::buildClassTree (const std::shared_ptr< Entry > & root, const ClassNode & node)

Definition at line 1014 of file tagreader.cpp.

1551void TagFileParser::buildClassTree(const std::shared_ptr<Entry> &root,const ClassNode &node)
1552{
1553 if (node.tci)
1554 {
1555 buildClassEntry(root,node.tci);
1556 }
1557 for (const auto &child : node.children)
1558 {
1559 buildClassTree(root,*child.second);
1560 }
1561}

References buildClassEntry, buildClassTree, anonymous{tagreader.cpp}::TagFileParser::ClassNode::children and anonymous{tagreader.cpp}::TagFileParser::ClassNode::tci.

Referenced by buildClassTree and buildLists.

Private Member Attributes

m_curCompound

m_curEnumValue

TagEnumValueInfo anonymous{tagreader.cpp}::TagFileParser::m_curEnumValue

Definition at line 1021 of file tagreader.cpp.

Referenced by endEnumValue and startEnumValue.

m_curIncludes

TagIncludeInfo anonymous{tagreader.cpp}::TagFileParser::m_curIncludes

Definition at line 1022 of file tagreader.cpp.

Referenced by endIncludes and startIncludes.

m_curMember

TagMemberInfo anonymous{tagreader.cpp}::TagFileParser::m_curMember

m_curString

m_fileName

QCString anonymous{tagreader.cpp}::TagFileParser::m_fileName

Definition at line 1026 of file tagreader.cpp.

Referenced by endDocAnchor and startDocAnchor.

m_locator

const XMLLocator* anonymous{tagreader.cpp}::TagFileParser::m_locator = nullptr

Definition at line 1030 of file tagreader.cpp.

1030 const XMLLocator *m_locator = nullptr;

Referenced by setDocumentLocator, startCompound and startMember.

m_state

m_stateStack

std::stack<State> anonymous{tagreader.cpp}::TagFileParser::m_stateStack

Definition at line 1029 of file tagreader.cpp.

1029 std::stack<State> m_stateStack;

Referenced by endEnumValue, endMember, startEnumValue and startMember.

m_tagFileCompounds

std::vector< TagCompoundVariant > anonymous{tagreader.cpp}::TagFileParser::m_tagFileCompounds

Definition at line 1017 of file tagreader.cpp.

1017 std::vector< TagCompoundVariant > m_tagFileCompounds;

Referenced by addIncludes, buildLists, dump and endCompound.

m_tagName

QCString anonymous{tagreader.cpp}::TagFileParser::m_tagName

m_title

QCString anonymous{tagreader.cpp}::TagFileParser::m_title

Definition at line 1027 of file tagreader.cpp.

Referenced by endDocAnchor and startDocAnchor.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus by Doxygen 1.14.0.