Colobot
Public Member Functions | Protected Attributes | List of all members
CBot::CBotDoublyLinkedList< T > Class Template Reference

Public Member Functions

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

Protected Attributes

T * m_next = nullptr
 
T * m_prev = nullptr
 

Constructor & Destructor Documentation

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

Destructor. Be careful, destroys the whole linked list!

Member Function Documentation

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