Hasty Badger
Small UI library (a branch of Turbo Badger)
|
TBLinkListOf is a double linked linklist. More...
#include <tb_linklist.h>
Classes | |
class | Iterator |
Typed iterator for safe iteration. More... | |
Public Member Functions | |
void | Remove (T *link) |
Remove link from this linklist. More... | |
void | Delete (T *link) |
Remove link from this linklist and delete it. More... | |
void | RemoveAll () |
Remove all links without deleting them. More... | |
void | DeleteAll () |
Delete all links in this linklist. More... | |
void | AddFirst (T *link) |
Add link first in this linklist. More... | |
void | AddLast (T *link) |
Add link last in this linklist. More... | |
void | AddBefore (T *link, T *reference) |
Add link before the reference link (which must be added to this linklist). More... | |
void | AddAfter (T *link, T *reference) |
Add link after the reference link (which must be added to this linklist). More... | |
bool | ContainsLink (T *link) const |
Return true if the link is currently added to this linklist. More... | |
T * | GetFirst () const |
Get the first link, or nullptr. More... | |
T * | GetLast () const |
Get the last link, or nullptr. More... | |
bool | HasLinks () const |
Return true if this linklist contains any links. More... | |
int | CountLinks () const |
Count the number of links in this list by iterating through all links. More... | |
Iterator | IterateForward () |
Get a forward iterator that starts with the first link. More... | |
Iterator | IterateForward (T *link) |
Get a forward iterator that starts with the given link. More... | |
Iterator | IterateBackward () |
Get a backward iterator that starts with the last link. More... | |
Iterator | IterateBackward (T *link) |
Get a backward iterator that starts with the given link. More... | |
TBLinkListOf is a double linked linklist.
|
inline |
Add link after the reference link (which must be added to this linklist).
|
inline |
Add link before the reference link (which must be added to this linklist).
|
inline |
Add link first in this linklist.
|
inline |
Add link last in this linklist.
|
inline |
Return true if the link is currently added to this linklist.
|
inline |
Count the number of links in this list by iterating through all links.
|
inline |
Remove link from this linklist and delete it.
|
inline |
Delete all links in this linklist.
|
inline |
Get the first link, or nullptr.
|
inline |
Get the last link, or nullptr.
|
inline |
Return true if this linklist contains any links.
|
inline |
Get a backward iterator that starts with the last link.
|
inline |
Get a backward iterator that starts with the given link.
|
inline |
Get a forward iterator that starts with the first link.
|
inline |
Get a forward iterator that starts with the given link.
|
inline |
Remove link from this linklist.
|
inline |
Remove all links without deleting them.