The LinkedMap
Class Template Reference
Container class representing a vector of objects with keys. More...
Declaration
Included Headers
Public Member Typedefs Index
template < ... > | |
using | Ptr = std::unique_ptr< T > |
template < ... > | |
using | Vec = std::vector< Ptr > |
template < ... > | |
using | iterator = typename Vec::iterator |
template < ... > | |
using | const_iterator = typename Vec::const_iterator |
template < ... > | |
using | reverse_iterator = typename Vec::reverse_iterator |
template < ... > | |
using | const_reverse_iterator = typename Vec::const_reverse_iterator |
Public Operators Index
template < ... > | |
Ptr & | operator[] (size_t pos) |
template < ... > | |
const Ptr & | operator[] (size_t pos) const |
Public Member Functions Index
template < ... > | |
const T * | find (const std::string &key) const |
template < ... > | |
const T * | find (const QCString &key) const |
template < ... > | |
const T * | find (const char *key) const |
template < ... > | |
T * | find (const char *key) |
A non-const wrapper for find() const. More... | |
template < ... > | |
T * | find (const QCString &key) |
A non-const wrapper for find() const. More... | |
template < ... > | |
T * | find (const std::string &key) |
A non-const wrapper for find() const. More... | |
template <class... Args> | |
T * | add (const char *k, Args &&... args) |
template <class... Args> | |
T * | add (const QCString &k, Args &&... args) |
template < ... > | |
T * | add (const char *k, Ptr &&ptr) |
template < ... > | |
T * | add (const QCString &k, Ptr &&ptr) |
template <class... Args> | |
T * | prepend (const char *k, Args &&... args) |
template <class... Args> | |
T * | prepend (const QCString &key, Args &&... args) |
template < ... > | |
bool | del (const QCString &key) |
template < ... > | |
iterator | begin () |
template < ... > | |
iterator | end () |
template < ... > | |
const_iterator | begin () const |
template < ... > | |
const_iterator | end () const |
template < ... > | |
reverse_iterator | rbegin () |
template < ... > | |
reverse_iterator | rend () |
template < ... > | |
const_reverse_iterator | rbegin () const |
template < ... > | |
const_reverse_iterator | rend () const |
template < ... > | |
bool | empty () const |
template < ... > | |
size_t | size () const |
template < ... > | |
void | clear () |
Private Member Attributes Index
template < ... > | |
Map | m_lookup |
template < ... > | |
Vec | m_entries |
Description
Container class representing a vector of objects with keys.
Objects can efficiently be looked up given the key. Objects are owned by the container. When adding objects the order of addition is kept, and used while iterating.
Definition at line 35 of file linkedmap.h.
Public Member Typedefs
const_iterator
|
Definition at line 41 of file linkedmap.h.
const_reverse_iterator
|
Definition at line 43 of file linkedmap.h.
iterator
|
Definition at line 40 of file linkedmap.h.
Ptr
|
Definition at line 38 of file linkedmap.h.
reverse_iterator
|
Definition at line 42 of file linkedmap.h.
Vec
|
Definition at line 39 of file linkedmap.h.
Public Operators
operator[]()
| inline |
Definition at line 199 of file linkedmap.h.
operator[]()
| inline |
Definition at line 200 of file linkedmap.h.
Public Member Functions
add()
| inline |
Adds a new object to the ordered vector if it was not added already. Return a non-owning pointer to the newly added object, or to the existing object if it was already inserted before under the given key.
Definition at line 90 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::m_entries and LinkedMap< T, Hash, KeyEqual, Map >::m_lookup.
Referenced by SectionManager::add, SectionManager::add, addEnumValuesToEnums, addXRefItem, findEnums, ClassDefImpl::mergeCategory, ClassDefImpl::mergeMembersFromBaseClasses, readDir, readFileOrDirectory and SectionManager::replace.
add()
| inline |
Definition at line 105 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::m_entries, LinkedMap< T, Hash, KeyEqual, Map >::m_lookup and QCString::str.
add()
| inline |
Adds an existing object to the ordered vector (unless another object was already added under the same key). Ownership is transferred. Return a non-owning pointer to the newly added object, or to the existing object if it was already inserted before under the given key.
Definition at line 123 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::m_entries and LinkedMap< T, Hash, KeyEqual, Map >::m_lookup.
add()
| inline |
Definition at line 136 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::m_entries, LinkedMap< T, Hash, KeyEqual, Map >::m_lookup and QCString::str.
begin()
| inline |
Definition at line 201 of file linkedmap.h.
begin()
| inline |
Definition at line 203 of file linkedmap.h.
clear()
| inline |
Definition at line 212 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::m_entries and LinkedMap< T, Hash, KeyEqual, Map >::m_lookup.
Referenced by cleanUpDoxygen and clearAll.
del()
| inline |
Removes an object from the container and deletes it. Returns true if the object was deleted or false it is was not found.
Definition at line 183 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::m_entries, LinkedMap< T, Hash, KeyEqual, Map >::m_lookup and QCString::str.
Referenced by ClassDefImpl::hideDerivedVariablesInPython.
empty()
| inline |
Definition at line 209 of file linkedmap.h.
end()
| inline |
Definition at line 202 of file linkedmap.h.
end()
| inline |
Definition at line 204 of file linkedmap.h.
find()
| inline |
Find an object given the key. Returns a pointer to the element if found or nullptr if it is not found.
Definition at line 47 of file linkedmap.h.
Reference LinkedMap< T, Hash, KeyEqual, Map >::m_lookup.
Referenced by LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, addAnchor, addEnumValuesToEnums, addRelatedPage, addSection, DefinitionImpl::addSectionsToDefinition, addXRefItem, computeMemberRelationsForBaseClass, DocAnchor::DocAnchor, DocHtmlCaption::DocHtmlCaption, DocRef::DocRef, LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::find, findFileDef, findMainPage, findUsingDeclImports, PerlModGenerator::generatePerlModForPage, generateSqlite3ForPage, generateXMLForPage, ClassDefImpl::hideDerivedVariablesInPython, ClassDefImpl::mergeCategory, ClassDefImpl::mergeMembersFromBaseClasses, DocRoot::parse, DocSecRefItem::parse, DocSection::parse, DocXRefItem::parse, LinkedMap< T, Hash, KeyEqual, Map >::prepend, LinkedMap< T, Hash, KeyEqual, Map >::prepend, processSection, SectionManager::replace, resolveLink, resolveTypeDef, showFileDefMatches, PageDefImpl::writeDocumentation and writeGroupTreeNode.
find()
| inline |
Find an object given the key. Returns a pointer to the element if found or nullptr if it is not found.
Definition at line 55 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::m_lookup and QCString::str.
find()
| inline |
Find an object given the key. Returns a pointer to the element if found or nullptr if it is not found.
Definition at line 63 of file linkedmap.h.
Reference LinkedMap< T, Hash, KeyEqual, Map >::find.
find()
| inline |
A non-const wrapper for find() const.
Definition at line 69 of file linkedmap.h.
Reference LinkedMap< T, Hash, KeyEqual, Map >::find.
find()
| inline |
A non-const wrapper for find() const.
Definition at line 75 of file linkedmap.h.
Reference LinkedMap< T, Hash, KeyEqual, Map >::find.
find()
| inline |
A non-const wrapper for find() const.
Definition at line 81 of file linkedmap.h.
Reference LinkedMap< T, Hash, KeyEqual, Map >::find.
prepend()
| inline |
Prepends a new object to the ordered vector if it was not added already. Return a non-owning pointer to the newly added object, or to the existing object if it was already inserted before under the given key.
Definition at line 153 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::m_entries and LinkedMap< T, Hash, KeyEqual, Map >::m_lookup.
prepend()
| inline |
Definition at line 168 of file linkedmap.h.
References LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::m_entries, LinkedMap< T, Hash, KeyEqual, Map >::m_lookup and QCString::str.
rbegin()
| inline |
Definition at line 205 of file linkedmap.h.
rbegin()
| inline |
Definition at line 207 of file linkedmap.h.
rend()
| inline |
Definition at line 206 of file linkedmap.h.
rend()
| inline |
Definition at line 208 of file linkedmap.h.
size()
| inline |
Definition at line 210 of file linkedmap.h.
Reference LinkedMap< T, Hash, KeyEqual, Map >::m_entries.
Referenced by computeClassRelations.
Private Member Attributes
m_entries
|
Definition at line 221 of file linkedmap.h.
Referenced by LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::begin, LinkedMap< T, Hash, KeyEqual, Map >::begin, LinkedMap< T, Hash, KeyEqual, Map >::clear, LinkedMap< T, Hash, KeyEqual, Map >::del, LinkedMap< T, Hash, KeyEqual, Map >::empty, LinkedMap< T, Hash, KeyEqual, Map >::end, LinkedMap< T, Hash, KeyEqual, Map >::end, LinkedMap< T, Hash, KeyEqual, Map >::operator[], LinkedMap< T, Hash, KeyEqual, Map >::operator[], LinkedMap< T, Hash, KeyEqual, Map >::prepend, LinkedMap< T, Hash, KeyEqual, Map >::prepend, LinkedMap< T, Hash, KeyEqual, Map >::rbegin, LinkedMap< T, Hash, KeyEqual, Map >::rbegin, LinkedMap< T, Hash, KeyEqual, Map >::rend, LinkedMap< T, Hash, KeyEqual, Map >::rend and LinkedMap< T, Hash, KeyEqual, Map >::size.
m_lookup
|
Definition at line 220 of file linkedmap.h.
Referenced by LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::add, LinkedMap< T, Hash, KeyEqual, Map >::clear, LinkedMap< T, Hash, KeyEqual, Map >::del, LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::find, LinkedMap< T, Hash, KeyEqual, Map >::prepend and LinkedMap< T, Hash, KeyEqual, Map >::prepend.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus by Doxygen 1.14.0.