Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Registry.cpp File Reference
#include "ecs/Registry.hpp"

Functions

std::unordered_map< std::type_index, std::size_t > & g_componentTypeMap ()
 Retrieves the global map of component types to unique numeric IDs.
std::size_t registerComponentType (std::type_index idx)
 Registers or retrieves the unique ID for a component type.

Function Documentation

◆ g_componentTypeMap()

std::unordered_map< std::type_index, std::size_t > & g_componentTypeMap ( )

Retrieves the global map of component types to unique numeric IDs.

Returns
Reference to the type index map.

◆ registerComponentType()

std::size_t registerComponentType ( std::type_index idx)

Registers or retrieves the unique ID for a component type.

Parameters
idxThe type index.
Returns
The unique ID of the component type.