LinkedList
LinkedList.h

LinkedList

A linked list
Description
Encapsulates the functionality of a linked list. To incorporate a linked list into
a class, the class should first inherit from ListNode using the format
class SomeDataClass : public ListNode<SomeDataClass>. The class may then be
instanced using the LinkedList template like so: LinkedList<SomeDataClass> MyListOfData;.
Definition
template <typename ELEMENT> class LinkedList : public LinkedListBase
Base Classes
LinkedListBase Used internally to encapsulate functionality that is independent of the template parameter.
Contructor
LinkedList();
Member Functions
LinkedList::ClearClears all entries from the list
LinkedList::Push_BackAppends a new element to the list
LinkedList::Push_FrontPrepends a new element to the list
LinkedList::Pop_BackRemoves the element from the end of the list
LinkedList::Pop_FrontRemoves the element from the start of the list
LinkedList::InsertAdds an element to the list at a given position
LinkedList::EraseRemoves an element from the list at a given position
LinkedList::SizeReturns the number of elements in the list
LinkedList::BeginReturns the index to the first member of the list
LinkedList::EndReturns the index to the last member of the list
LinkedList::FrontReturns a reference to the first member of the list
LinkedList::BackReturns a reference to the last member of the list
Operators
ELEMENT& operator[](unsigned int Index);Returns the element of a list whose zero-based index is Index. If Index is
greater than or equal to the number of elements in the list, then the return
value is nullptr.
See Also
ListNode