#include "ctb_DNode.h"
#include <stdbool.h>
#include "ctb_DList.h"
Go to the source code of this file.
◆ ctb_DListIterator_FindPredicate_t
typedef bool(* ctb_DListIterator_FindPredicate_t) (ctb_DNode_t *const node) |
Typedef for predicate function used to find a node in the doubly linked list.
- Parameters
-
- Returns
- True if the node satisfies the predicate, false otherwise
◆ ctb_DListIterator_ForEachOperation_t
typedef void(* ctb_DListIterator_ForEachOperation_t) (ctb_DNode_t *const node) |
Typedef for operation function to be applied to each node in the doubly linked list.
- Parameters
-
◆ ctb_DListIterator_find()
Finds a node in the doubly linked list that satisfies a predicate.
- Parameters
-
self | Pointer to a doubly linked list iterator |
predicate | Predicate function |
- Returns
- Pointer to the found node, or NULL if no node satisfies the predicate
◆ ctb_DListIterator_forEach()
Applies an operation to each node in the doubly linked list.
- Parameters
-
self | Pointer to a doubly linked list iterator |
operation | Operation to apply to each node |
◆ ctb_DListIterator_hasNext()
Checks if there is a node after the current node.
- Parameters
-
self | Pointer to a doubly linked list iterator |
- Returns
- True if there is a node after the current node, false otherwise
◆ ctb_DListIterator_hasPrevious()
Checks if there is a node before the current node.
- Parameters
-
self | Pointer to a doubly linked list iterator |
- Returns
- True if there is a node before the current node, false otherwise
◆ ctb_DListIterator_init()
Initializes a doubly linked list iterator.
- Parameters
-
self | Pointer to a doubly linked list iterator |
list | Pointer to the doubly linked list |
- Returns
- Pointer to the initialized doubly linked list iterator
◆ ctb_DListIterator_next()
Returns the next node.
- Parameters
-
self | Pointer to a doubly linked list iterator |
- Returns
- Pointer to the next node, or NULL if there is no next node
◆ ctb_DListIterator_previous()
Returns the previous node.
- Parameters
-
self | Pointer to a doubly linked list iterator |
- Returns
- Pointer to the previous node, or NULL if there is no previous node
◆ ctb_DListIterator_resetToFirst()
Resets the iterator to the first node.
- Parameters
-
self | Pointer to a doubly linked list iterator |
- Returns
- Pointer to the doubly linked list iterator reset to the first node
◆ ctb_DListIterator_resetToLast()
Resets the iterator to the last node.
- Parameters
-
self | Pointer to a doubly linked list iterator |
- Returns
- Pointer to the doubly linked list iterator reset to the last node