Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
Loading...
Searching...
No Matches
component.hpp File Reference
#include <helios/core_pch.hpp>
#include <ctti/name.hpp>
#include <ctti/type_id.hpp>
#include <concepts>
#include <cstddef>
#include <string_view>
#include <type_traits>

Go to the source code of this file.

Classes

struct  helios::ecs::IsConstComponent< T >
 Helper to detect const components. More...
 
struct  helios::ecs::IsConstComponent< const T >
 
struct  helios::ecs::ComponentTraits< T >
 Component traits for optimization decisions. More...
 
class  helios::ecs::ComponentTypeInfo
 Component type info for runtime operations. More...
 
struct  std::hash< helios::ecs::ComponentTypeInfo >
 

Namespaces

namespace  helios
 
namespace  helios::ecs
 

Concepts

concept  helios::ecs::ConstComponentTrait
 Concept for const-qualified component types.
 
concept  helios::ecs::ComponentTrait
 Concept to check if a type can be used as a component.
 
concept  helios::ecs::ComponentWithNameTrait
 Concept for components that provide a static name method.
 
concept  helios::ecs::TagComponentTrait
 Concept for tag components (empty).
 
concept  helios::ecs::TrivialComponentTrait
 Concept for trivially copyable components (POD-like).
 
concept  helios::ecs::TinyComponentTrait
 Concept for tiny components (single cache line portion), where sizeof(T) <= 16.
 
concept  helios::ecs::SmallComponentTrait
 Concept for small components that fit in cache line, where sizeof(T) <= 64.
 
concept  helios::ecs::MediumComponentTrait
 Concept for medium components (multiple cache line portions), where 64 < sizeof(T) <= 256.
 
concept  helios::ecs::LargeComponentTrait
 Concept for large components that don't fit in cache line, where sizeof(T) > 256.
 

Typedefs

using helios::ecs::ComponentTypeId = size_t
 Type ID for components.
 

Functions

template<ComponentTrait T>
constexpr ComponentTypeId helios::ecs::ComponentTypeIdOf () noexcept
 Type ID for components using CTTI.
 
template<ComponentTrait T>
constexpr std::string_view helios::ecs::ComponentNameOf () noexcept
 

Variables

template<typename T >
constexpr bool helios::ecs::IsConstComponent_v = IsConstComponent<T>::value