浏览该文件的文档.
20 #include <unordered_map>
109 return it!=
m_lookup.end() ? it->second :
nullptr;
126 std::unordered_map< std::string, const SectionInfo* >
m_lookup;
void setReference(const QCString &r)
The common base class of all entity definitions found in the sources.
void add(const SectionInfo *si)
Adds a non-owning section reference.
Definition * definition() const
SectionInfo(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref)
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
std::string toStdString(const QCString &s)
const_iterator end() const
SectionInfoVec::const_iterator const_iterator
SectionType
enum representing the various types of sections and entities that can be referred to.
void setDefinition(Definition *d)
SectionInfo * replace(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())
Replace an existing section with a new one Return a non-owning pointer to the newly added section
Definition * m_definition
const_iterator begin() const
std::unordered_map< std::string, const SectionInfo * > m_lookup
singleton class that owns the list of all sections
void setGenerated(bool b)
void setType(SectionType t)
QCString fileName() const
const T * find(const std::string &key) const
Find an object given the key.
std::vector< const SectionInfo * > SectionInfoVec
SectionInfo * add(const SectionInfo &si)
Add a new section given the data of an existing section.
void setFileName(const QCString &fn)
void setTitle(const QCString &t)
const SectionInfo * find(const QCString &label) const
Returns a constant pointer to the section info given a section label or nullptr if no section with th...
static SectionManager & instance()
returns a reference to the singleton
class that represents a list of constant references to sections.
constexpr bool isSection(SectionType type)
return true if type is a section, and false if it is a page, anchor or table.
class that provide information about a section.
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Container class representing a vector of objects with keys.
SectionInfo * add(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())
Add a new section Return a non-owning pointer to the newly added section
SectionManager & operator=(const SectionManager &other)=delete
This is an alternative implementation of QCString.