MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / DataTableManager

Class DataTableManager

src/OD2/Common/DataTableManager.h:13–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using DataTable = std::vector<DataTableRow>;
12
13class DataTableManager {
14 DataTableManager() = default;
15 absl::flat_hash_map<std::string, DataTable> dataTables{};
16 std::mutex _readMutex{};
17 std::mutex _writeMutex{};
18
19 public:
20 static DataTableManager &getInstance() {
21 static DataTableManager instance;
22 return instance;
23 }
24
25 void addDataTable(std::string_view name, std::string_view fileName);
26 DataTable &getDataTable(std::string_view name);
27
28 absl::flat_hash_map<std::string, int> buildIndexBy(std::string_view table, std::string_view column);
29
30 DataTable &operator[](std::string_view name);
31};
32
33} // namespace OD2::Common

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected