2016-01-05 19:23:43 -05:00
|
|
|
namespace Utils
|
|
|
|
{
|
|
|
|
class CSV
|
|
|
|
{
|
|
|
|
public:
|
2016-02-06 07:37:23 -05:00
|
|
|
CSV(std::string file, bool isFile = true, bool allowComments = true);
|
2016-01-05 19:23:43 -05:00
|
|
|
~CSV();
|
|
|
|
|
|
|
|
int GetRows();
|
2016-01-12 15:17:55 -05:00
|
|
|
int GetColumns();
|
2016-01-05 19:23:43 -05:00
|
|
|
int GetColumns(size_t row);
|
|
|
|
|
|
|
|
std::string GetElementAt(size_t row, size_t column);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2016-02-06 07:37:23 -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
|
|
|
std::vector<std::vector<std::string>> DataMap;
|
|
|
|
};
|
|
|
|
}
|