#include <stdlib.h>
Go to the source code of this file.
◆ List
◆ ListDataType
◆ Node
◆ CreateList()
Create a List object.
- Returns
- List* The created List object
◆ DeleteNode()
void DeleteNode |
( |
List * |
list, |
|
|
Node * |
target |
|
) |
| |
Delete node from list given node.
- Parameters
-
list | The list to delete node from |
target | The node to delete |
◆ DeleteValue()
Deletes a node from the list given the value.
- Parameters
-
list | The list to delete the node from. |
value | The value of the node to delete. |
- Returns
- Node* NULL
◆ Find()
Finds the first node with the given value.
- Parameters
-
list | The list to search. |
value | The value to search for. |
- Returns
- Node* The first node with the given value.
◆ FreeList()
void FreeList |
( |
List * |
list | ) |
|
Free all memory allocated for the list.
- Parameters
-
list | The List to be freed. |
◆ GetListHead()
Get the list's head.
- Parameters
-
- Returns
- Node* The list's head
◆ GetListSize()
size_t GetListSize |
( |
List * |
list | ) |
|
Get the size of the list.
- Parameters
-
list | The list to get the size of |
- Returns
- size_t The size of the list
◆ GetNextNode()
Get the next node for the given node.
- Parameters
-
currentNode | The node to get the next node for |
- Returns
- Node* The next node
◆ GetValue()
Get the value of the Node.
- Parameters
-
node | The Node to get the value from |
- Returns
- ListDataType The value of the Node
◆ Insert()
Inserts a new node after the given node.
- Parameters
-
after | The node after which the new node is inserted. |
newValue | The value of the new node. |
- Returns
- Node* The new node.
◆ PopBack()
Removes the node from the end of the list.
- Parameters
-
list | The list to remove the node from. |
- Returns
- ListDataType The value of the removed node.
◆ PopFront()
Removes the node from the front of the list.
- Parameters
-
list | The list to remove the node from. |
- Returns
- ListDataType The value of the removed node.
◆ PushBack()
Append a new node to the end of the list.
- Parameters
-
list | The list to append to |
newValue | The value to append |
- Returns
- Node* The new node
◆ PushFront()
Appends a new node to the head of the list.
- Parameters
-
list | The list to append to. |
newValue | The value to append. |
- Returns
- Node* The new head of the list.