| 11 | using DataTable = std::vector<DataTableRow>; |
| 12 | |
| 13 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected