iw4x-client/src/Utils/CSV.hpp

24 lines
468 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2016-01-05 19:23:43 -05:00
namespace Utils
{
class CSV
{
public:
CSV(std::string file, bool isFile = true, bool allowComments = true);
2016-01-05 19:23:43 -05:00
~CSV();
int getRows();
int getColumns();
int getColumns(size_t row);
2016-01-05 19:23:43 -05:00
std::string getElementAt(size_t row, size_t column);
2016-01-05 19:23:43 -05:00
private:
std::vector<std::vector<std::string>> dataMap;
2016-01-05 19:23:43 -05:00
void parse(std::string file, bool isFile = true, bool allowComments = true);
void parseRow(std::string row, bool allowComments = true);
2016-01-05 19:23:43 -05:00
};
}