sandbox
Loading...
Searching...
No Matches
sparse_set.hpp File Reference

Sparse set container for ECS entity storage. More...

#include <memory>
#include <vector>
#include <unordered_map>
#include <type_traits>
#include <utility>
#include <iterator>
#include <algorithm>
#include <functional>
#include <libsbx/utility/assert.hpp>
#include <libsbx/utility/fast_mod.hpp>
#include <libsbx/utility/algorithm.hpp>
#include <libsbx/utility/hashed_string.hpp>
#include <libsbx/memory/concepts.hpp>
#include <libsbx/ecs/detail/sparse_set_iterator.hpp>
#include <libsbx/ecs/sparse_set.ipp>

Go to the source code of this file.

Classes

class  sbx::ecs::basic_sparse_set< Entity, Allocator >
 Sparse set container for entity identifiers. More...
 

Namespaces

namespace  libsbx
 

Enumerations

enum class  sbx::ecs::deletion_policy : std::uint8_t { swap_and_pop = 0u , in_place = 1u , swap_only = 2u , unspecified = swap_and_pop }
 Deletion behavior policy for sparse sets.
 

Detailed Description

Sparse set container for ECS entity storage.

This header defines a sparse set data structure optimized for use in entity-component systems. The container maintains a dense array of entities and a sparse mapping that allows constant-time lookup, insertion, and removal.

Multiple deletion strategies are supported via configurable policies, enabling trade-offs between memory locality, iteration stability, and deletion cost.

The sparse set is allocator-aware and designed to be extensible through inheritance.

Author
KAJ