Colobot
Loading...
Searching...
No Matches
CBot::CBotDoublyLinkedList< T > Class Template Reference

Public Member Functions

virtual ~CBotDoublyLinkedList ()
 Destructor. Be careful, destroys the whole linked list!
T * GetNext ()
 Returns the next variable in the linked list.
T * GetPrev ()
 Returns the previous variable in the linked list.
void AddNext (T *elem)
 Appends a new element at the end of the linked list.

Protected Attributes

T * m_next = nullptr
T * m_prev = nullptr

Constructor & Destructor Documentation

◆ ~CBotDoublyLinkedList()

template<typename T>
virtual CBot::CBotDoublyLinkedList< T >::~CBotDoublyLinkedList ( )
inlinevirtual

Destructor. Be careful, destroys the whole linked list!

Member Function Documentation

◆ GetNext()

template<typename T>
T * CBot::CBotDoublyLinkedList< T >::GetNext ( )
inline

Returns the next variable in the linked list.

Returns
Next element in the list, or nullptr if this was the last element

◆ GetPrev()

template<typename T>
T * CBot::CBotDoublyLinkedList< T >::GetPrev ( )
inline

Returns the previous variable in the linked list.

Returns
Previous element in the list, or nullptr if this was the last element

◆ AddNext()

template<typename T>
void CBot::CBotDoublyLinkedList< T >::AddNext ( T * elem)
inline

Appends a new element at the end of the linked list.

Parameters
elemElement to add

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