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

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

class Table {
	List<List<Cell*>> cells;
	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