#include <List.h>
|
| List () |
| Default constructor for the List class.
|
| List (const List &listToCopy) |
| Copy constructor for the List class.
|
| ~List () |
| Destructor for the List class.
|
bool | operator== (const List &rhs) const |
| Equality operator for comparing two lists.
|
bool | operator!= (const List &rhs) const |
| Inequality operator for comparing two lists.
|
List & | operator= (const List &rhs) |
| Overloaded assignment operator to copy the contents of another list.
|
void | push_back (const value_type &value) |
| Adds a new element to the end of the list.
|
void | push_front (const value_type &value) |
| Adds a new element to the front of the list.
|
void | pop_back () |
| Removes the last element from the list.
|
void | pop_front () |
| Removes the first element from the list.
|
value_type & | front () |
| Returns a reference to the first element of the list.
|
const value_type & | front () const |
| Returns a const reference to the first element of the list.
|
value_type & | back () |
| Returns a reference to the last element of the list.
|
const value_type & | back () const |
| Returns a const reference to the last element of the list.
|
size_type | size () const |
| Gets the number of elements in the list.
|
bool | empty () const |
| Checks if the list is empty.
|
Iterator | begin () |
| Gets an iterator to the beginning of the list.
|
Iterator | end () |
| Gets an iterator to the end of the list.
|
◆ pointer
◆ reference
◆ size_type
◆ value_type
◆ List() [1/2]
Default constructor for the List class.
Initializes an empty list with no nodes.
◆ List() [2/2]
Copy constructor for the List class.
Creates a deep copy of the provided list.
- Parameters
-
listToCopy | The list to copy from. |
◆ ~List()
Destructor for the List class.
Deletes all nodes in the list and frees allocated memory.
◆ back() [1/2]
Returns a reference to the last element of the list.
- Returns
- A reference to the last element.
- Exceptions
-
std::runtime_error | If the list is empty. |
◆ back() [2/2]
Returns a const reference to the last element of the list.
- Returns
- A const reference to the last element.
- Exceptions
-
std::runtime_error | If the list is empty. |
◆ begin()
Gets an iterator to the beginning of the list.
- Returns
- An iterator pointing to the first element in the list.
◆ empty()
Checks if the list is empty.
- Returns
- True if the list is empty, false otherwise.
◆ end()
Gets an iterator to the end of the list.
- Returns
- An iterator pointing to the position after the last element.
◆ front() [1/2]
Returns a reference to the first element of the list.
- Returns
- A reference to the first element.
- Exceptions
-
std::runtime_error | If the list is empty. |
◆ front() [2/2]
Returns a const reference to the first element of the list.
- Returns
- A const reference to the first element.
- Exceptions
-
std::runtime_error | If the list is empty. |
◆ operator!=()
Inequality operator for comparing two lists.
Checks if two lists are not equal by comparing their sizes and node data.
- Parameters
-
rhs | The list to compare with. |
- Returns
- True if the lists are not equal, otherwise false.
◆ operator=()
Overloaded assignment operator to copy the contents of another list.
- Parameters
-
rhs | The list to copy from. |
- Returns
- A reference to the current list.
◆ operator==()
Equality operator for comparing two lists.
Checks if two lists are equal by comparing their sizes and node data.
- Parameters
-
rhs | The list to compare with. |
- Returns
- True if the lists are equal, otherwise false.
◆ pop_back()
Removes the last element from the list.
◆ pop_front()
Removes the first element from the list.
◆ push_back()
Adds a new element to the end of the list.
- Parameters
-
value | The value to add to the list. |
◆ push_front()
Adds a new element to the front of the list.
- Parameters
-
value | The value to add to the list. |
◆ size()
Gets the number of elements in the list.
- Returns
- The number of elements in the list.
The documentation for this class was generated from the following files:
- FIEAGameEngine/include/FIEAGameEngine/List.h
- FIEAGameEngine/include/FIEAGameEngine/List.inl