Website Summary Files Commits Branches @commit @diff @stats
path: root / src / UserInterface / UserInterface.cpp
blob: f9d7d874a79393e7a79706b9d5a166ae1a0d2bd2 (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
#include "UserInterface.h"
#include "../Generic/List/List.hpp"
#include "../Generic/String/String.h"
#include <stdexcept>

/* Private (static) */

void UserInterface::com_print(const char* params) {
	List<String> cells = this->table.getAllCells();
}

/* Public */

UserInterface::UserInterface(Table& table) : menu() {
	if (this->table.getCellCount() > 0)
		throw new std::logic_error("Singleton instance!");

	this->table = table;
	menu.addCommand(Command("print", com_print));
	menu.addCommand(Command("edit", com_edit));
}

void UserInterface::run() {
	menu.navigate();
}