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

Core type definitions and utilities for ESEngine. More...

#include <atomic>
#include <cstdint>
#include <ostream>
#include <limits>
#include <memory>
#include <span>
#include <string>
#include <vector>
#include "PackedId.hpp"
Include dependency graph for Types.hpp:

Go to the source code of this file.

Classes

struct  esengine::Entity
 Entity identifier with packed index + generation. More...
struct  esengine::ComponentDomain
 Domain tags — each yields an independent, dense, 0-based TypeId sequence. Use the typed helpers below rather than the raw domain id. More...
struct  esengine::ServiceDomain
struct  std::hash< esengine::Entity >

Namespaces

namespace  esengine
namespace  esengine::detail

Typedefs

using esengine::u8 = std::uint8_t
 Unsigned 8-bit integer.
using esengine::u16 = std::uint16_t
 Unsigned 16-bit integer.
using esengine::u32 = std::uint32_t
 Unsigned 32-bit integer.
using esengine::u64 = std::uint64_t
 Unsigned 64-bit integer.
using esengine::i8 = std::int8_t
 Signed 8-bit integer.
using esengine::i16 = std::int16_t
 Signed 16-bit integer.
using esengine::i32 = std::int32_t
 Signed 32-bit integer.
using esengine::i64 = std::int64_t
 Signed 64-bit integer.
using esengine::f32 = float
 32-bit floating point
using esengine::f64 = double
 64-bit floating point
using esengine::usize = std::size_t
 Size type for indexing and sizes.
template<typename T>
using esengine::Unique = std::unique_ptr<T>
 Unique ownership smart pointer.
template<typename T>
using esengine::Shared = std::shared_ptr<T>
 Shared ownership smart pointer.
template<typename T>
using esengine::Weak = std::weak_ptr<T>
 Weak reference smart pointer.
using esengine::TypeId = u32
 Runtime type identifier.
template<typename T>
using esengine::ConstSpan = std::span<const T>

Functions

template<typename T, typename... Args>
constexpr Unique< T > esengine::makeUnique (Args &&... args)
 Creates a Unique pointer with the given arguments.
template<typename T, typename... Args>
constexpr Shared< T > esengine::makeShared (Args &&... args)
 Creates a Shared pointer with the given arguments.
template<typename Domain>
std::atomic< TypeId > & esengine::detail::typeIdCounter ()
 One independent TypeId counter per Domain tag.
template<typename Domain, typename T>
TypeId esengine::detail::domainTypeId ()
template<typename T>
TypeId esengine::componentTypeId ()
 Dense 0-based runtime id for a component type (ECS pool index + mask bit).
template<typename T>
TypeId esengine::serviceTypeId ()
 Dense 0-based runtime id for a service type (ServiceRegistry key).
std::ostream & operator<< (std::ostream &os, esengine::Entity e)

Variables

constexpr Entity esengine::INVALID_ENTITY {}
 Invalid entity sentinel value.
constexpr u32 esengine::INVALID_DENSE_INDEX = std::numeric_limits<u32>::max()
 Sentinel for empty sparse set slots.

Detailed Description

Core type definitions and utilities for ESEngine.

Provides standardized type aliases, smart pointer helpers, entity types and type ID generation.

Author
ESEngine Team
Date
2026

Definition in file Types.hpp.

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
esengine::Entity e )
inline

Definition at line 257 of file Types.hpp.

References esengine::Entity::raw.