Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::cnt::fwd_llist< T > Struct Template Reference

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 if the node.
 
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 ()
 
fwd_llist_iterator< const T > begin () const
 
fwd_llist_iterator< const T > cbegin () const
 
fwd_llist_iterator< T > end ()
 
fwd_llist_iterator< const T > end () const
 
fwd_llist_iterator< const T > cend () const
 

Public Attributes

uint32_t count = 0
 
T * first = nullptr
 

Detailed Description

template<class T>
struct gaia::cnt::fwd_llist< T >

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)

Member Function Documentation

◆ has()

template<class T >
GAIA_NODISCARD bool gaia::cnt::fwd_llist< T >::has ( T *  pNode) const
inline

Checks if the node.

Parameters
pNodeis linked in the list.

The documentation for this struct was generated from the following file: