// (c) 1999-2007 Electronic Arts Inc.

// STL code can only be compiled at warning level 3 and even then some warnings need
// to be turned off

#if defined(_MSC_VER)
#pragma once
#endif


#pragma warning(disable : 4786)

#include <string>
#include <vector>
using namespace std;

class CSV {
public:
	CSV(const char* pBuffer);	// pBuffer MUST BE NULL TERMINATED
								// once constructor returns pBuffer can be free'ed
	~CSV(void);

	int getRowCount(void) const;
	int getColumnCount(void) const;

	string getCell(int row, int column) const;	// row & column are zero based

private:
	const string& getRow(int row) const;	// row is zero	based
	vector<string> m_RowTable;				// contains each line in the file
};

