16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 18:39:18 +02:00

ECS System WIP

This commit is contained in:
2026-04-07 23:40:03 +02:00
parent f6db9978d2
commit 8e9fd9225f
30 changed files with 1133 additions and 242 deletions

18
registry/NameRegistry.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
#include <cstdint>
#include <mutex>
#include <string>
#include <string_view>
#include <unordered_map>
class NameRegistry
{
public:
static uint64_t GetOrCreate(std::string_view name);
static const std::string& GetString(uint64_t id);
private:
static std::unordered_map<uint64_t, std::string>& GetMap();
static std::mutex& GetMutex();
};