Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBLinkListOf< T > Class Template Reference

TBLinkListOf is a double linked linklist. More...

#include <tb_linklist.h>

Inheritance diagram for tb::TBLinkListOf< T >:
tb::TBLinkListAutoDeleteOf< T >

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...
 

Detailed Description

template<class T>
class tb::TBLinkListOf< T >

TBLinkListOf is a double linked linklist.

Member Function Documentation

template<class T>
void tb::TBLinkListOf< T >::AddAfter ( T *  link,
T *  reference 
)
inline

Add link after the reference link (which must be added to this linklist).

template<class T>
void tb::TBLinkListOf< T >::AddBefore ( T *  link,
T *  reference 
)
inline

Add link before the reference link (which must be added to this linklist).

template<class T>
void tb::TBLinkListOf< T >::AddFirst ( T *  link)
inline

Add link first in this linklist.

template<class T>
void tb::TBLinkListOf< T >::AddLast ( T *  link)
inline

Add link last in this linklist.

template<class T>
bool tb::TBLinkListOf< T >::ContainsLink ( T *  link) const
inline

Return true if the link is currently added to this linklist.

template<class T>
int tb::TBLinkListOf< T >::CountLinks ( ) const
inline

Count the number of links in this list by iterating through all links.

template<class T>
void tb::TBLinkListOf< T >::Delete ( T *  link)
inline

Remove link from this linklist and delete it.

template<class T>
void tb::TBLinkListOf< T >::DeleteAll ( )
inline

Delete all links in this linklist.

template<class T>
T* tb::TBLinkListOf< T >::GetFirst ( ) const
inline

Get the first link, or nullptr.

template<class T>
T* tb::TBLinkListOf< T >::GetLast ( ) const
inline

Get the last link, or nullptr.

template<class T>
bool tb::TBLinkListOf< T >::HasLinks ( ) const
inline

Return true if this linklist contains any links.

template<class T>
Iterator tb::TBLinkListOf< T >::IterateBackward ( )
inline

Get a backward iterator that starts with the last link.

template<class T>
Iterator tb::TBLinkListOf< T >::IterateBackward ( T *  link)
inline

Get a backward iterator that starts with the given link.

template<class T>
Iterator tb::TBLinkListOf< T >::IterateForward ( )
inline

Get a forward iterator that starts with the first link.

template<class T>
Iterator tb::TBLinkListOf< T >::IterateForward ( T *  link)
inline

Get a forward iterator that starts with the given link.

template<class T>
void tb::TBLinkListOf< T >::Remove ( T *  link)
inline

Remove link from this linklist.

template<class T>
void tb::TBLinkListOf< T >::RemoveAll ( )
inline

Remove all links without deleting them.


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