Doxygen
tagreader.cpp 文件参考
#include "tagreader.h"
#include <map>
#include <functional>
#include <utility>
#include <algorithm>
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include "xml.h"
#include "entry.h"
#include "doxygen.h"
#include "util.h"
#include "message.h"
#include "defargs.h"
#include "arguments.h"
#include "filedef.h"
#include "filename.h"
#include "section.h"
#include "containers.h"
#include "debug.h"
+ tagreader.cpp 的引用(Include)关系图:

浏览源代码.

class  TagAnchorInfo
 Information about an linkable anchor 更多...
 
class  TagEnumValueInfo
 Container for enum values that are scoped within an enum 更多...
 
class  TagIncludeInfo
 Container for include info that can be read from a tagfile 更多...
 
class  TagMemberInfo
 Container for member specific info that can be read from a tagfile 更多...
 
class  TagCompoundInfo
 Base class for all compound types 更多...
 
class  TagClassInfo
 Container for class specific info that can be read from a tagfile 更多...
 
class  TagConceptInfo
 Container for concept specific info that can be read from a tagfile 更多...
 
class  TagNamespaceInfo
 Container for namespace specific info that can be read from a tagfile 更多...
 
class  TagPackageInfo
 Container for package specific info that can be read from a tagfile 更多...
 
class  TagFileInfo
 Container for file specific info that can be read from a tagfile 更多...
 
class  TagGroupInfo
 Container for group specific info that can be read from a tagfile 更多...
 
class  TagPageInfo
 Container for page specific info that can be read from a tagfile 更多...
 
class  TagDirInfo
 Container for directory specific info that can be read from a tagfile 更多...
 
class  TagFileParser
 Tag file parser. 更多...
 
struct  ElementCallbacks
 
struct  CompoundFactory
 

函数

ElementCallbacks::StartCallback startCb (void(TagFileParser::*fn)(const XMLHandlers::Attributes &))
 
ElementCallbacks::EndCallback endCb (void(TagFileParser::*fn)())
 
void parseTagFile (const std::shared_ptr< Entry > &root, const char *fullName)
 

变量

static const std::map< std::string, ElementCallbacksg_elementHandlers
 
static const std::map< std::string, CompoundFactoryg_compoundFactory
 

函数说明

◆ endCb()

ElementCallbacks::EndCallback endCb ( void(TagFileParser::*)()  fn)

在文件 tagreader.cpp866 行定义.

867 {
868  return [fn](TagFileParser &parser) { (parser.*fn)(); };
869 }

◆ parseTagFile()

void parseTagFile ( const std::shared_ptr< Entry > &  root,
const char *  fullName 
)

在文件 tagreader.cpp1566 行定义.

1567 {
1568  TagFileParser tagFileParser(fullName);
1569  QCString inputStr = fileToString(fullName);
1570  XMLHandlers handlers;
1571  // connect the generic events handlers of the XML parser to the specific handlers of the tagFileParser object
1572  handlers.startDocument = [&tagFileParser]() { tagFileParser.startDocument(); };
1573  handlers.startElement = [&tagFileParser](const std::string &name,const XMLHandlers::Attributes &attrs) { tagFileParser.startElement(QCString(name),attrs); };
1574  handlers.endElement = [&tagFileParser](const std::string &name) { tagFileParser.endElement(QCString(name)); };
1575  handlers.characters = [&tagFileParser](const std::string &chars) { tagFileParser.characters(QCString(chars)); };
1576  handlers.error = [&tagFileParser](const std::string &fileName,int lineNr,const std::string &msg) { tagFileParser.error(QCString(fileName),lineNr,QCString(msg)); };
1577  XMLParser parser(handlers);
1578  tagFileParser.setDocumentLocator(&parser);
1579  parser.parse(fullName,inputStr.data(),Debug::isFlagSet(Debug::Lex));
1580  tagFileParser.buildLists(root);
1581  tagFileParser.addIncludes();
1582  //tagFileParser.dump();
1583 }

引用了 TagFileParser::addIncludes(), TagFileParser::buildLists(), XMLHandlers::characters, TagFileParser::characters(), QCString::data(), XMLHandlers::endElement, TagFileParser::endElement(), XMLHandlers::error, TagFileParser::error(), fileToString(), Debug::isFlagSet(), Debug::Lex, msg(), XMLParser::parse(), TagFileParser::setDocumentLocator(), XMLHandlers::startDocument, TagFileParser::startDocument(), XMLHandlers::startElement , 以及 TagFileParser::startElement().

被这些函数引用 readTagFile().

◆ startCb()

ElementCallbacks::StartCallback startCb ( void(TagFileParser::*)(const XMLHandlers::Attributes &)  fn)

在文件 tagreader.cpp861 行定义.

862 {
863  return [fn](TagFileParser &parser,const XMLHandlers::Attributes &attr) { (parser.*fn)(attr); };
864 }

变量说明

◆ g_compoundFactory

const std::map< std::string, CompoundFactory > g_compoundFactory
static
初始值:
=
{
{ "class", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Class); } } },
{ "struct", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Struct); } } },
{ "union", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Union); } } },
{ "interface", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Interface); } } },
{ "enum", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Enum); } } },
{ "exception", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Exception); } } },
{ "protocol", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Protocol); } } },
{ "category", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Category); } } },
{ "service", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Service); } } },
{ "singleton", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Singleton); } } },
{ "file", { TagFileParser::InFile, []() { return std::make_unique<TagFileInfo>(); } } },
{ "namespace", { TagFileParser::InNamespace, []() { return std::make_unique<TagNamespaceInfo>(); } } },
{ "concept", { TagFileParser::InConcept, []() { return std::make_unique<TagConceptInfo>(); } } },
{ "group", { TagFileParser::InGroup, []() { return std::make_unique<TagGroupInfo>(); } } },
{ "page", { TagFileParser::InPage, []() { return std::make_unique<TagPageInfo>(); } } },
{ "package", { TagFileParser::InPackage, []() { return std::make_unique<TagPackageInfo>(); } } },
{ "dir", { TagFileParser::InDir, []() { return std::make_unique<TagDirInfo>(); } } }
}

在文件 tagreader.cpp910 行定义.

被这些函数引用 TagFileParser::startCompound().

◆ g_elementHandlers

const std::map< std::string, ElementCallbacks > g_elementHandlers
static
初始值:
=
{
}

在文件 tagreader.cpp871 行定义.

被这些函数引用 TagFileParser::endElement() , 以及 TagFileParser::startElement().

TagClassInfo::Kind::Protocol
@ Protocol
TagClassInfo::Kind::Union
@ Union
TagFileParser::endDocAnchor
void endDocAnchor()
Definition: tagreader.cpp:399
XMLParser
Definition: xml.h:64
XMLHandlers::startElement
std::function< StartElementType > startElement
handler invoked when an opening tag has been found
Definition: xml.h:52
TagFileParser
Tag file parser.
Definition: tagreader.cpp:270
startCb
ElementCallbacks::StartCallback startCb(void(TagFileParser::*fn)(const XMLHandlers::Attributes &))
Definition: tagreader.cpp:861
XMLHandlers::Attributes
std::unordered_map< std::string, std::string > Attributes
Definition: xml.h:42
TagFileParser::InFile
@ InFile
Definition: tagreader.cpp:807
TagFileParser::endIncludes
void endIncludes()
Definition: tagreader.cpp:641
TagFileParser::endPage
void endPage()
Definition: tagreader.cpp:517
TagFileParser::endClangId
void endClangId()
Definition: tagreader.cpp:718
TagFileParser::InPackage
@ InPackage
Definition: tagreader.cpp:813
Debug::Lex
@ Lex
Definition: debug.h:39
TagFileParser::InNamespace
@ InNamespace
Definition: tagreader.cpp:808
TagFileParser::startMember
void startMember(const XMLHandlers::Attributes &attrib)
Definition: tagreader.cpp:318
TagFileParser::endName
void endName()
Definition: tagreader.cpp:567
TagFileParser::startCompound
void startCompound(const XMLHandlers::Attributes &attrib)
Definition: tagreader.cpp:962
TagFileParser::endNamespace
void endNamespace()
Definition: tagreader.cpp:482
TagClassInfo::Kind::Class
@ Class
TagFileParser::endMember
void endMember()
Definition: tagreader.cpp:350
TagFileParser::startIncludes
void startIncludes(const XMLHandlers::Attributes &attrib)
Definition: tagreader.cpp:631
TagFileParser::endSubgroup
void endSubgroup()
Definition: tagreader.cpp:780
Debug::isFlagSet
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:99
TagFileParser::endIgnoreElement
void endIgnoreElement()
Definition: tagreader.cpp:796
TagFileParser::endAnchorFile
void endAnchorFile()
Definition: tagreader.cpp:740
XMLHandlers::error
std::function< ErrorType > error
handler invoked when the parser encounters an error
Definition: xml.h:55
TagFileParser::startDocAnchor
void startDocAnchor(const XMLHandlers::Attributes &attrib)
Definition: tagreader.cpp:548
XMLHandlers::endElement
std::function< EndElementType > endElement
handler invoked when a closing tag has been found
Definition: xml.h:53
TagClassInfo::Kind::Singleton
@ Singleton
TagFileParser::startIgnoreElement
void startIgnoreElement(const XMLHandlers::Attributes &)
Definition: tagreader.cpp:792
TagFileParser::endFilename
void endFilename()
Definition: tagreader.cpp:666
TagFileParser::endFile
void endFile()
Definition: tagreader.cpp:501
TagFileParser::InDir
@ InDir
Definition: tagreader.cpp:814
TagClassInfo::Kind::Enum
@ Enum
TagFileParser::startStringValue
void startStringValue(const XMLHandlers::Attributes &)
Definition: tagreader.cpp:543
TagFileParser::endEnumValue
void endEnumValue()
Definition: tagreader.cpp:387
TagClassInfo::Kind::Service
@ Service
TagFileParser::InConcept
@ InConcept
Definition: tagreader.cpp:806
XMLHandlers::characters
std::function< CharsType > characters
handler invoked when content between tags has been found
Definition: xml.h:54
fileToString
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition: util.cpp:1394
TagFileParser::InGroup
@ InGroup
Definition: tagreader.cpp:809
TagFileParser::endClass
void endClass()
Definition: tagreader.cpp:438
TagFileParser::endTemplateArg
void endTemplateArg()
Definition: tagreader.cpp:654
TagFileParser::endArglist
void endArglist()
Definition: tagreader.cpp:752
TagClassInfo::Kind::Category
@ Category
TagFileParser::endDir
void endDir()
Definition: tagreader.cpp:530
TagFileParser::endAnchor
void endAnchor()
Definition: tagreader.cpp:702
TagFileParser::endTitle
void endTitle()
Definition: tagreader.cpp:764
TagClassInfo::Kind::Exception
@ Exception
XMLHandlers
Event handlers that can installed by the client and called while parsing a XML document.
Definition: xml.h:26
msg
void msg(const char *fmt,...)
Definition: message.cpp:53
TagFileParser::startEnumValue
void startEnumValue(const XMLHandlers::Attributes &attrib)
Definition: tagreader.cpp:369
TagFileParser::endType
void endType()
Definition: tagreader.cpp:555
TagClassInfo::Kind::Struct
@ Struct
XMLHandlers::startDocument
std::function< StartDocType > startDocument
handler invoked at the start of the document
Definition: xml.h:50
TagClassInfo::Kind::Interface
@ Interface
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
endCb
ElementCallbacks::EndCallback endCb(void(TagFileParser::*fn)())
Definition: tagreader.cpp:866
TagFileParser::InClass
@ InClass
Definition: tagreader.cpp:805
TagFileParser::endConcept
void endConcept()
Definition: tagreader.cpp:463
TagFileParser::InPage
@ InPage
Definition: tagreader.cpp:810
TagFileParser::endPath
void endPath()
Definition: tagreader.cpp:686
TagFileParser::endBase
void endBase()
Definition: tagreader.cpp:619
TagFileParser::startBase
void startBase(const XMLHandlers::Attributes &attrib)
Definition: tagreader.cpp:590
TagFileParser::endCompound
void endCompound()
Definition: tagreader.cpp:298
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108