2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-10-26 08:15:54 +00:00

refactor: refactor sound csv loading code

This commit is contained in:
Jan
2024-10-06 16:34:01 +02:00
parent a3b9d2693c
commit d814fe7b95
7 changed files with 1045 additions and 564 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include "Csv/CsvStream.h"
#include <optional>
#include <string>
#include <vector>
class CsvHeaderRow
{
public:
CsvHeaderRow();
bool Read(const CsvInputStream& inputStream);
const std::string& HeaderNameForColumn(unsigned columnIndex) const;
bool RequireIndexForHeader(const std::string& headerName, unsigned& out) const;
[[nodiscard]] std::optional<unsigned> GetIndexForHeader(const std::string& headerName) const;
private:
std::vector<std::string> m_header_row;
};