Skip to main content

The SectionManager Class Reference

singleton class that owns the list of all sections More...

Declaration

class SectionManager { ... }

Included Headers

#include <src/section.h>

Base class

classLinkedMap<T, Hash, KeyEqual, Map>

Container class representing a vector of objects with keys. More...

Private Constructors Index

SectionManager ()=default

Private Destructor Index

~SectionManager ()=default

Public Member Functions Index

SectionInfo *add (const SectionInfo &si)
SectionInfo *add (const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())
SectionInfo *replace (const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())

Public Static Functions Index

static SectionManager &instance ()

returns a reference to the singleton More...

Description

singleton class that owns the list of all sections

Definition at line 133 of file section.h.

Private Constructors

SectionManager()

SectionManager::SectionManager ()
default

Definition at line 185 of file section.h.

Referenced by instance and ~SectionManager.

Private Destructor

~SectionManager()

SectionManager::~SectionManager ()
default

Definition at line 186 of file section.h.

Reference SectionManager.

Public Member Functions

add()

SectionInfo * SectionManager::add (const SectionInfo & si)
inline

Add a new section given the data of an existing section. Returns a non-owning pointer to the newly added section.

Definition at line 138 of file section.h.

139 {
140 //printf("SectionManager::add(%s,%s,%d,%s)\n",qPrint(si.label()),qPrint(si.fileName()),si.lineNr(),qPrint(si.title()));
142 si.lineNr(),si.title(),si.type(),si.level(),si.ref());
143 }

References LinkedMap< T, Hash, KeyEqual, Map >::add, SectionInfo::fileName, SectionInfo::label, SectionInfo::level, SectionInfo::lineNr, SectionInfo::ref, SectionInfo::title and SectionInfo::type.

Referenced by addAnchor, anonymous{tagreader.cpp}::TagFileParser::addDocAnchors, addRelatedPage, addSection, DefinitionImpl::addSectionsToDefinition, addXRefItem, anonymous{tagreader.cpp}::TagFileParser::buildLists and findMainPage.

add()

SectionInfo * SectionManager::add (const QCString & label, const QCString & fileName, int lineNr, const QCString & title, SectionType type, int level, const QCString & ref=QCString())
inline

Add a new section Return a non-owning pointer to the newly added section

Definition at line 147 of file section.h.

147 SectionInfo *add(const QCString &label, const QCString &fileName, int lineNr,
148 const QCString &title, SectionType type, int level,const QCString &ref=QCString())
149 {
150 //printf("SectionManager::add(%s,%s,%d,%s)\n",qPrint(label),qPrint(fileName),lineNr,qPrint(title));
151 return LinkedMap<SectionInfo>::add(label.data(),fileName,lineNr,title,type,level,ref);
152 }

References LinkedMap< T, Hash, KeyEqual, Map >::add and QCString::data.

replace()

SectionInfo * SectionManager::replace (const QCString & label, const QCString & fileName, int lineNr, const QCString & title, SectionType type, int level, const QCString & ref=QCString())
inline

Replace an existing section with a new one Return a non-owning pointer to the newly added section

Definition at line 156 of file section.h.

156 SectionInfo *replace(const QCString &label, const QCString &fileName, int lineNr,
157 const QCString &title, SectionType type, int level,const QCString &ref=QCString())
158 {
159 //printf("SectionManager::replace(%s,%s,%d,%s)\n",qPrint(label),qPrint(fileName),lineNr,qPrint(title));
161 if (si)
162 {
163 si->setFileName(fileName);
164 si->setLineNr(lineNr);
165 si->setTitle(title);
166 si->setType(type);
167 si->setLevel(level);
168 si->setReference(ref);
169 return si;
170 }
171 else
172 {
173 return LinkedMap<SectionInfo>::add(label.data(),fileName,lineNr,title,type,level,ref);
174 }
175 }

References LinkedMap< T, Hash, KeyEqual, Map >::add, QCString::data, LinkedMap< T, Hash, KeyEqual, Map >::find, SectionInfo::setFileName, SectionInfo::setLevel, SectionInfo::setLineNr, SectionInfo::setReference, SectionInfo::setTitle and SectionInfo::setType.

Referenced by addAnchor, anonymous{tagreader.cpp}::TagFileParser::addDocAnchors, addRelatedPage, addSection, addXRefItem and findMainPage.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.