mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 15:59:18 +02:00
18 lines
367 B
C++
18 lines
367 B
C++
#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();
|
|
}; |