iw4x-client/src/Utils/CSV.hpp
0x90 50e93d7f2f [Download] Improve client downloads
This is a (partial) fix for issue #14
2019-12-26 00:07:04 +01:00

28 lines
565 B
C++

#pragma once
namespace Utils
{
class CSV
{
public:
CSV() { }
CSV(const std::string& file, bool isFile = true, bool allowComments = true);
~CSV();
int getRows();
int getColumns();
int getColumns(size_t row);
std::string getElementAt(size_t row, size_t column);
bool isValid() { return this->valid; }
private:
bool valid = false;
std::vector<std::vector<std::string>> dataMap;
void parse(const std::string& file, bool isFile = true, bool allowComments = true);
void parseRow(const std::string& row, bool allowComments = true);
};
}