![]() |
Gaia-ECS v1.0.0
A simple and powerful entity component system
|
Forward list container. No memory allocation is performed because the list is stored directly inside allocated nodes. Inserts: O(1) Removals: O(1) Iteration: O(N) More...
#include <fwd_llist.h>
Public Member Functions | |
| void | clear () |
| Clears the list. | |
| void | link (T *pNode) |
| Links the node in the list. | |
| void | unlink (T *pNode) |
| Unlinks the node from the list. | |
| GAIA_NODISCARD bool | has (T *pNode) const |
| Checks whether a node is linked in this list. | |
| GAIA_NODISCARD bool | empty () const |
| Returns true if the list is empty. False otherwise. | |
| GAIA_NODISCARD uint32_t | size () const |
| Returns the number of nodes linked in the list. | |
| fwd_llist_iterator< T > | begin () |
| Returns an iterator to the first node. | |
| fwd_llist_iterator< const T > | begin () const |
| Returns an iterator to the first node. | |
| fwd_llist_iterator< const T > | cbegin () const |
| Returns an iterator to the first node. | |
| fwd_llist_iterator< T > | end () |
| Returns the mutable end sentinel. | |
| fwd_llist_iterator< const T > | end () const |
| Returns the const end sentinel. | |
| fwd_llist_iterator< const T > | cend () const |
| Returns the const end sentinel. | |
Public Attributes | |
| uint32_t | count = 0 |
| Number of linked nodes. | |
| T * | first = nullptr |
| First linked node, or nullptr when empty. | |
Forward list container. No memory allocation is performed because the list is stored directly inside allocated nodes. Inserts: O(1) Removals: O(1) Iteration: O(N)
|
inline |
Returns an iterator to the first node.
|
inline |
Returns an iterator to the first node.
|
inline |
Returns an iterator to the first node.
|
inline |
Returns the const end sentinel.
|
inline |
Returns true if the list is empty. False otherwise.
|
inline |
Returns the mutable end sentinel.
|
inline |
Returns the const end sentinel.
Checks whether a node is linked in this list.
| pNode | Node to find. |
Links the node in the list.
| pNode | Unlinked node to insert at the front. |
|
inline |
Returns the number of nodes linked in the list.
Unlinks the node from the list.
| pNode | Node currently linked in this list. |