33 lines
783 B
C++
33 lines
783 B
C++
#ifndef CSV_HPP
|
|
#define CSV_HPP
|
|
|
|
#include <fstream>
|
|
|
|
#include "generic.hpp"
|
|
|
|
class CSV : public Generic
|
|
{
|
|
public:
|
|
CSV(const std::string&);
|
|
~CSV();
|
|
void Write();
|
|
void Update();
|
|
void Close();
|
|
unsigned int Width();
|
|
std::string GetValue(unsigned int, unsigned int);
|
|
std::string GetColumnValue(unsigned int, const std::string&);
|
|
void SetValue(const std::string&, unsigned int, unsigned int);
|
|
void SetColumnValue(const std::string&, unsigned int, const std::string&);
|
|
void AddColumnValue(const std::string&, const std::string&);
|
|
unsigned int ValuesInRow(unsigned int);
|
|
unsigned int ValuesInColumn(unsigned int);
|
|
unsigned int ValuesInColumn(const std::string&);
|
|
private:
|
|
std::fstream _csv;
|
|
std::string _temp;
|
|
|
|
std::string _GetRow(unsigned int);
|
|
};
|
|
|
|
#endif
|