20#include <unordered_map>
31 static constexpr int Page = 0;
112 return it!=
m_lookup.end() ? it->second :
nullptr;
129 std::unordered_map< std::string, const SectionInfo* >
m_lookup;
The common base class of all entity definitions found in the sources.
Container class representing a vector of objects with keys.
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
const T * find(const std::string &key) const
Find an object given the key.
This is an alternative implementation of QCString.
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
class that provide information about a section.
void setType(SectionType t)
SectionInfo(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref)
Definition * definition() const
void setReference(const QCString &r)
void setDefinition(Definition *d)
void setFileName(const QCString &fn)
QCString fileName() const
void setGenerated(bool b)
Definition * m_definition
void setTitle(const QCString &t)
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.
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.
~SectionManager()=default
SectionInfo * add(const SectionInfo &si)
Add a new section given the data of an existing section.
static SectionManager & instance()
returns a reference to the singleton
class that represents a list of constant references to sections.
SectionInfoVec::const_iterator const_iterator
const_iterator end() const
const_iterator begin() const
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...
void add(const SectionInfo *si)
Adds a non-owning section reference.
std::vector< const SectionInfo * > SectionInfoVec
std::unordered_map< std::string, const SectionInfo * > m_lookup
static constexpr int Anchor
constexpr bool isSection() const
static constexpr int Section
static constexpr int MaxLevel
static constexpr int Subsection
static constexpr int Subsubsection
static constexpr int Table
constexpr int level() const
static constexpr int Page
static constexpr int MinLevel
constexpr SectionType(int lvl)
static constexpr int Paragraph
static constexpr int Subsubparagraph
static constexpr int Subparagraph
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
std::string toStdString(const QCString &s)