-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.h
More file actions
37 lines (27 loc) · 846 Bytes
/
Copy pathcontroller.h
File metadata and controls
37 lines (27 loc) · 846 Bytes
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
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "observable.h"
#include "observer.h"
#include <iostream>
#include <memory>
#include <string>
namespace DSVisualization {
template<typename T>
class RedBlackTree;
struct TreeQuery;
class Controller {
using Model = RedBlackTree<int>;
public:
explicit Controller(Model& model);
Controller() = delete;
Controller(const Controller&) = delete;
Controller& operator=(const Controller&) = delete;
Controller(Controller&&) = delete;
Controller& operator=(Controller&&) = delete;
~Controller();
[[nodiscard]] Observer<TreeQuery>* GetObserver();
private:
void OnNotifyFromView(const TreeQuery& value);
Observer<TreeQuery> observer_view_controller_;
Model* model_ptr_;
};
}// namespace DSVisualization