doxygen
|
Container class representing a vector of objects with keys. More...
#include <linkedmap.h>
Public Member Functions | |
const T * | find (const std::string &key) const |
find an object given the key. More... | |
const T * | find (const QCString &key) const |
find an object given the key. More... | |
const T * | find (const char *key) const |
find an object given the key. More... | |
T * | find (const char *key) |
non-const wrapper for find() const | |
T * | find (const QCString &key) |
T * | find (const std::string &key) |
non-const wrapper for find() const | |
bool | add (const char *k, T *obj) |
Adds an object reference to the ordered vector if it was not added already. More... | |
bool | add (const QCString &k, T *obj) |
bool | prepend (const char *k, T *obj) |
Prepends an object reference to the ordered vector if it was not added already. More... | |
bool | prepend (const QCString &key, T *obj) |
bool | del (const QCString &key) |
Removes an object from the container and deletes it. More... | |
Ptr & | operator[] (size_t pos) |
const Ptr & | operator[] (size_t pos) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
bool | empty () const |
size_t | size () const |
void | clear () |
Container class representing a vector of objects with keys.
Objects can be efficiently be looked up given the key. Objects are not owned by the container, the container will only hold references. When adding objects the order of addition is kept, and used while iterating.
|
inline |
Adds an object reference to the ordered vector if it was not added already.
Return true if the reference was added, and false if an object with the same key was already added before
|
inline |
Removes an object from the container and deletes it.
Returns true if the object was deleted or false it is was not found.
|
inline |
find an object given the key.
Returns a pointer to the object if found or nullptr if it is not found.
|
inline |
find an object given the key.
Returns a pointer to the object if found or nullptr if it is not found.
|
inline |
find an object given the key.
Returns a pointer to the object if found or nullptr if it is not found.
|
inline |
Prepends an object reference to the ordered vector if it was not added already.
Return true if the reference was added, and false if an object with the same key was already added before