#include <GGUI/Public/NodeRows.h>
template<typename T>
NodeSparse class
NodeSparse<T>: a value for the few nodes that have one.
A node without a value costs four bytes. Values live in a chunked pool and never move while their node owns them.
Public functions
- auto At(NodeIndex index) -> T&
- The node's value, made a default T if it has none.
- auto Find(NodeIndex index) const -> const T*
- The node's value; null if it has none.
- auto Find(NodeIndex index) -> T*
- The same, to change it.
- auto Get(NodeIndex index) const -> const T&
- A default T if the node has none. Does not create one.
- void Remove(NodeIndex index)
- Take the node's value away, resetting it to a default T.
- auto Count() const -> uint32_t
- How many nodes have a value.
- auto Bytes() const -> size_t
- Memory held, excluding anything the values own.