Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Table.h
blob: c334859c37c229b327ea2bd89cb86c2e6fa941c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef MODELS_TABLE
#define MODELS_TABLE

#include "Cell.h"
#include "../Generic/List/List.hpp"
#include <fstream>

class Table {
	List<List<Cell*>> cells;
	Cell* createCellByParsing(const char* rawValue);
	void readFromFile(std::ifstream& inFile);

public:
	Table(const char* filePath);
	Table(unsigned rows, unsigned cols);
	unsigned get_cols() const;

	void putCell(unsigned row, unsigned col, const char* rawValue);
	List<String> getAllCells() const;
	void saveToFile(const char* filePath);
};

#endif