DarkflameServer/dDatabase/Tables/CDLookupTable.h
wincent 5973430720 Grim LU
Wincent's attempt at making LU into something it isn't supposed to be, an ARPG.
2023-07-15 10:54:41 +02:00

24 lines
460 B
C++

#pragma once
// Custom Classes
#include "CDTable.h"
class CDLookupTable : public CDTable<CDLookupTable> {
private:
std::unordered_map<std::string, int32_t> entries;
std::unordered_multimap<int32_t, std::string> reverseEntries;
public:
CDLookupTable();
// Lookup
int32_t Lookup(const std::string& key) const;
// Reverse Lookup
std::vector<std::string> ReverseLookup(int32_t value) const;
};
namespace rose {
int32_t id(const std::string& key);
}