-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPresenter.hpp
50 lines (38 loc) · 1.13 KB
/
Presenter.hpp
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
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// Presenter.hpp
// Jako
//
// Created by John Zakharov on 19.03.16.
// Copyright © 2016 Outlaw Studio. All rights reserved.
//
#ifndef __VIPER_PRESENTER_H
#define __VIPER_PRESENTER_H
#include <memory>
#include <string>
#include "Disposable.hpp"
//#include "Selfish.hpp"
#include "Language.hpp"
#include "Wireframe.hpp"
#include "View.hpp"
//#define PRESENTER_DECL(module) struct Presenter:public Viper::Presenter<module::UserInterface, module::EventHandler, module::Input, module::Output, module::Wireframe, module::Wireframe::argument_type>,Selfish<Presenter>
namespace Mitsoko{
struct PresenterBase : public Disposable {
WireframeBase wireframe;
virtual void dispose() override {
this->Disposable::dispose();
}
virtual ViewBase* getViewBase()=0;
};
template<class V>
struct Presenter : public PresenterBase {
typedef V view_type;
V view;
virtual void init(){
//..
}
virtual ViewBase* getViewBase() override {
return &view;
}
};
}
#endif /* __VIPER_PRESENTER_H */