Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Table.h
blob: f65cf0428c4cae2f1c48cb28f5e480445e7cecec (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
24
25
26
#ifndef MODELS_TABLE
#define MODELS_TABLE

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

class Table {
	List<List<Cell*>> cells;
	unsigned longestRow;
	void readFromFile(std::ifstream& inFile);

public:
	Table(const char* filePath);
	~Table();

	unsigned get_rows() const;
	unsigned get_cols() const;

	void putCell(unsigned row, unsigned col, const char* rawValue);

	List<String> getAllCells() const;
	void saveToFile(const char* filePath) const;
};

#endif