Developers
Documentation
Guide
Reference
Examples
Glossary
Resources
Community
Vocabulary
Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
callback.h
Go to the documentation of this file.
1
#ifndef BITCOIN_QT_CALLBACK_H
2
#define BITCOIN_QT_CALLBACK_H
3
4
#include <QObject>
5
6
class
Callback
:
public
QObject
7
{
8
Q_OBJECT
9
public
Q_SLOTS:
10
virtual
void
call
() = 0;
11
};
12
13
template
<
typename
F>
14
class
FunctionCallback
:
public
Callback
15
{
16
F
f
;
17
18
public
:
19
explicit
FunctionCallback
(F f_) :
f
(
std
::move(f_)) {}
20
~FunctionCallback
()
override
{}
21
void
call
()
override
{
f
(
this
); }
22
};
23
24
template
<
typename
F>
25
FunctionCallback<F>
*
makeCallback
(F f)
26
{
27
return
new
FunctionCallback<F>
(std::move(f));
28
}
29
30
#endif // BITCOIN_QT_CALLBACK_H
std
Definition:
box.hpp:161
Callback
Definition:
callback.h:6
FunctionCallback::f
F f
Definition:
callback.h:16
FunctionCallback::call
void call() override
Definition:
callback.h:21
Callback::call
virtual void call()=0
FunctionCallback::FunctionCallback
FunctionCallback(F f_)
Definition:
callback.h:19
makeCallback
FunctionCallback< F > * makeCallback(F f)
Definition:
callback.h:25
FunctionCallback::~FunctionCallback
~FunctionCallback() override
Definition:
callback.h:20
FunctionCallback
Definition:
callback.h:14
src
qt
callback.h
Generated on Mon Nov 2 2020 19:11:14 for Dash Core by
1.8.14