Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
SparseSet.hpp File Reference

Sparse set data structure for efficient ECS component storage. More...

#include "../core/Log.hpp"
#include "../core/Types.hpp"
#include "Entity.hpp"
#include <algorithm>
#include <array>
#include <concepts>
#include <cstring>
#include <memory>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>
Include dependency graph for SparseSet.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  esengine::ecs::SparseSetBase
 Type-erased base class for sparse set operations. More...
struct  esengine::ecs::SparseSetBase::AuditCopy
 What the audit kept of a pool: its entities and their components' bytes, as they were at tick. More...
class  esengine::ecs::SparseSet< T >
 Sparse set container for efficient entity-component storage. More...

Namespaces

namespace  esengine
namespace  esengine::ecs

Functions

template<typename T>
std::string_view esengine::ecs::componentTypeName ()
 T's name as the compiler spells it, without a namespace: what an audit report says.
bool esengine::ecs::tickAfter (u32 a, u32 b)
 Whether stamp a is later than tick b, across a wrap of the counter (stamps are kept within half its range).

Detailed Description

Sparse set data structure for efficient ECS component storage.

Implements a sparse set providing O(1) insertion, deletion, and lookup while maintaining cache-friendly dense iteration. This is the core data structure behind the ECS component pools.

Author
ESEngine Team
Date
2025

Definition in file SparseSet.hpp.