summaryrefslogtreecommitdiff
path: root/src/search/SearchModel.h
blob: ca6a2932eaca5a1b3dd277f7fec2166a5bef78d3 (plain)
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
27
#ifndef SEARCHMODEL_H
#define SEARCHMODEL_H

#include <vector>
#include <string>
#include "Save.h"
#include "SearchView.h"

using namespace std;

class SearchView;
class SearchModel
{
private:
	string lastError;
	vector<SearchView*> observers;
	vector<Save> saveList;
	void notifySaveListChanged();
public:
    SearchModel();
	void AddObserver(SearchView * observer);
	void UpdateSaveList(std::string query);
	vector<Save> GetSaveList();
	string GetLastError() { return lastError; }
};

#endif // SEARCHMODEL_H