Skip to main content

The SectionRefs Class Reference

class that represents a list of constant references to sections. More...

Declaration

class SectionRefs { ... }

Included Headers

#include <src/section.h>

Public Member Typedefs Index

usingconst_iterator = SectionInfoVec::const_iterator

Private Member Typedefs Index

usingSectionInfoVec = std::vector< const SectionInfo * >

Public Member Functions Index

const SectionInfo *find (const QCString &label) const
voidadd (const SectionInfo *si)

Adds a non-owning section reference. More...

const_iteratorbegin () const
const_iteratorend () const
boolempty () const
size_tsize () const

Private Member Attributes Index

SectionInfoVecm_entries
std::unordered_map< std::string, const SectionInfo * >m_lookup

Description

class that represents a list of constant references to sections.

Definition at line 101 of file section.h.

Public Member Typedefs

const_iterator

using SectionRefs::const_iterator = SectionInfoVec::const_iterator

Definition at line 105 of file section.h.

105 using const_iterator = SectionInfoVec::const_iterator;

Private Member Typedefs

SectionInfoVec

using SectionRefs::SectionInfoVec = std::vector<const SectionInfo*>

Definition at line 103 of file section.h.

103 using SectionInfoVec = std::vector<const SectionInfo*>;

Public Member Functions

add()

void SectionRefs::add (const SectionInfo * si)
inline

Adds a non-owning section reference.

Definition at line 116 of file section.h.

116 void add(const SectionInfo *si)
117 {
118 m_lookup.emplace(toStdString(si->label()),si);
119 m_entries.push_back(si);
120 }

References SectionInfo::label, m_entries, m_lookup and toStdString.

begin()

const_iterator SectionRefs::begin ()
inline

Definition at line 122 of file section.h.

122 const_iterator begin() const { return m_entries.cbegin(); }

Reference m_entries.

Referenced by PageDefImpl::addSectionsToIndex.

empty()

bool SectionRefs::empty ()
inline

Definition at line 124 of file section.h.

124 bool empty() const { return m_entries.empty(); }

Reference m_entries.

Referenced by PageDefImpl::addSectionsToIndex and generateXMLForPage.

end()

const_iterator SectionRefs::end ()
inline

Definition at line 123 of file section.h.

123 const_iterator end() const { return m_entries.cend(); }

Reference m_entries.

Referenced by PageDefImpl::addSectionsToIndex.

find()

const SectionInfo * SectionRefs::find (const QCString & label)
inline

Returns a constant pointer to the section info given a section label or nullptr if no section with the given label can be found.

Definition at line 109 of file section.h.

109 const SectionInfo *find(const QCString &label) const
110 {
111 auto it = m_lookup.find(label.str());
112 return it!=m_lookup.end() ? it->second : nullptr;
113 }

References m_lookup and QCString::str.

size()

size_t SectionRefs::size ()
inline

Definition at line 125 of file section.h.

125 size_t size() const { return m_entries.size(); }

Reference m_entries.

Private Member Attributes

m_entries

SectionInfoVec SectionRefs::m_entries

Definition at line 128 of file section.h.

Referenced by add, begin, empty, end and size.

m_lookup

std::unordered_map< std::string, const SectionInfo* > SectionRefs::m_lookup

Definition at line 129 of file section.h.

129 std::unordered_map< std::string, const SectionInfo* > m_lookup;

Referenced by add and find.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.