Doxygen
SectionManager类 参考

singleton class that owns the list of all sections 更多...

#include <section.h>

+ 类 SectionManager 继承关系图:
+ SectionManager 的协作图:

Public 成员函数

SectionInfoadd (const SectionInfo &si)
 Add a new section given the data of an existing section. 更多...
 
SectionInfoadd (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 更多...
 
SectionInforeplace (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 更多...
 
- Public 成员函数 继承自 LinkedMap< SectionInfo >
const SectionInfofind (const std::string &key) const
 Find an object given the key. 更多...
 
const SectionInfofind (const QCString &key) const
 Find an object given the key. 更多...
 
const SectionInfofind (const char *key) const
 Find an object given the key. 更多...
 
SectionInfofind (const char *key)
 A non-const wrapper for find() const 更多...
 
SectionInfofind (const QCString &key)
 A non-const wrapper for find() const 更多...
 
SectionInfofind (const std::string &key)
 A non-const wrapper for find() const 更多...
 
SectionInfoadd (const char *k, Args &&... args)
 Adds a new object to the ordered vector if it was not added already. 更多...
 
SectionInfoadd (const QCString &k, Args &&... args)
 
SectionInfoadd (const char *k, Ptr &&ptr)
 Adds an existing object to the ordered vector (unless another object was already added under the same key). 更多...
 
SectionInfoadd (const QCString &k, Ptr &&ptr)
 
SectionInfoprepend (const char *k, Args &&... args)
 Prepends a new object to the ordered vector if it was not added already. 更多...
 
SectionInfoprepend (const QCString &key, Args &&... args)
 
bool del (const QCString &key)
 Removes an object from the container and deletes it. 更多...
 
Ptroperator[] (size_t pos)
 
const Ptroperator[] (size_t pos) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
bool empty () const
 
size_t size () const
 
void clear ()
 

静态 Public 成员函数

static SectionManagerinstance ()
 returns a reference to the singleton 更多...
 

Private 成员函数

 SectionManager ()
 
 SectionManager (const SectionManager &other)=delete
 
SectionManageroperator= (const SectionManager &other)=delete
 

额外继承的成员函数

- Public 类型 继承自 LinkedMap< SectionInfo >
using Ptr = std::unique_ptr< SectionInfo >
 
using Vec = std::vector< Ptr >
 
using iterator = typename Vec::iterator
 
using const_iterator = typename Vec::const_iterator
 
using reverse_iterator = typename Vec::reverse_iterator
 
using const_reverse_iterator = typename Vec::const_reverse_iterator
 

详细描述

singleton class that owns the list of all sections

在文件 section.h130 行定义.

构造及析构函数说明

◆ SectionManager() [1/2]

SectionManager::SectionManager ( )
inlineprivate

在文件 section.h179 行定义.

179 {}

◆ SectionManager() [2/2]

SectionManager::SectionManager ( const SectionManager other)
privatedelete

成员函数说明

◆ add() [1/2]

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

在文件 section.h143 行定义.

145  {
146  return LinkedMap<SectionInfo>::add(label.data(),fileName,lineNr,title,type,level,ref);
147  }

引用了 LinkedMap< T, Hash, KeyEqual, Map >::add() , 以及 QCString::data().

◆ add() [2/2]

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.

在文件 section.h135 行定义.

136  {
137  return LinkedMap<SectionInfo>::add(si.label(),si.fileName(),
138  si.lineNr(),si.title(),si.type(),si.level(),si.ref());
139  }

引用了 LinkedMap< T, Hash, KeyEqual, Map >::add(), SectionInfo::fileName(), SectionInfo::label(), SectionInfo::level(), SectionInfo::lineNr(), SectionInfo::ref(), SectionInfo::title() , 以及 SectionInfo::type().

被这些函数引用 TagFileParser::addDocAnchors(), addRelatedPage(), DefinitionImpl::addSectionsToDefinition() , 以及 findMainPage().

◆ instance()

◆ operator=()

SectionManager& SectionManager::operator= ( const SectionManager other)
privatedelete

◆ 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

在文件 section.h151 行定义.

153  {
155  if (si)
156  {
157  si->setFileName(fileName);
158  si->setLineNr(lineNr);
159  si->setTitle(title);
160  si->setType(type);
161  si->setLevel(level);
162  si->setReference(ref);
163  return si;
164  }
165  else
166  {
167  return LinkedMap<SectionInfo>::add(label.data(),fileName,lineNr,title,type,level,ref);
168  }
169  }

引用了 LinkedMap< T, Hash, KeyEqual, Map >::add(), QCString::data(), LinkedMap< T, Hash, KeyEqual, Map >::find(), SectionInfo::setFileName(), SectionInfo::setLevel(), SectionInfo::setLineNr(), SectionInfo::setReference(), SectionInfo::setTitle() , 以及 SectionInfo::setType().

被这些函数引用 addRelatedPage() , 以及 findMainPage().


该类的文档由以下文件生成:
SectionInfo::setLineNr
void setLineNr(int l)
Definition: section.h:83
SectionInfo::setReference
void setReference(const QCString &r)
Definition: section.h:82
LinkedMap::add
T * add(const char *k, Args &&... args)
Adds a new object to the ordered vector if it was not added already.
Definition: linkedmap.h:103
SectionInfo::lineNr
int lineNr() const
Definition: section.h:69
SectionInfo::label
QCString label() const
Definition: section.h:65
SectionInfo::ref
QCString ref() const
Definition: section.h:68
SectionInfo::level
int level() const
Definition: section.h:72
SectionManager
singleton class that owns the list of all sections
Definition: section.h:130
SectionInfo::setType
void setType(SectionType t)
Definition: section.h:77
SectionInfo::fileName
QCString fileName() const
Definition: section.h:70
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
SectionInfo::title
QCString title() const
Definition: section.h:66
SectionInfo::setFileName
void setFileName(const QCString &fn)
Definition: section.h:76
SectionInfo::setTitle
void setTitle(const QCString &t)
Definition: section.h:80
SectionInfo
class that provide information about a section.
Definition: section.h:49
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
SectionInfo::setLevel
void setLevel(int l)
Definition: section.h:81
SectionInfo::type
SectionType type() const
Definition: section.h:67