#include <EventReceiver.h>
|
static void | atNextTick (const std::function< void(void)> &callBack) |
|
Definition at line 61 of file EventReceiver.h.
◆ EventReceiver() [1/3]
core::EventReceiver::EventReceiver |
( |
const std::string & | name | ) |
|
◆ EventReceiver() [2/3]
◆ EventReceiver() [3/3]
◆ ~EventReceiver()
virtual core::EventReceiver::~EventReceiver |
( |
| ) |
|
|
protectedvirtualdefault |
◆ atNextTick()
void core::EventReceiver::atNextTick |
( |
const std::function< void(void)> & | callBack | ) |
|
|
static |
Definition at line 50 of file EventReceiver.cpp.
50 {
52 public:
53 explicit NextTickEvent(const std::function<void(void)>& callBack)
54 :
core::EventReceiver(
"RequestEvent")
55 , callBack(callBack) {
56 }
57
58 void onEvent([[maybe_unused]]
const utils::Timeval& currentTime)
override {
59 callBack();
60
61 delete this;
62 }
63
64 private:
65 std::function<void(void)> callBack;
66 };
67
68 (
new NextTickEvent(callBack))->
span();
69 }
References span().
◆ destruct()
void core::EventReceiver::destruct |
( |
| ) |
|
|
virtual |
Reimplemented in core::socket::stream::SocketAcceptor< PhysicalSocketServerT, ConfigT, SocketConnectionT >, core::socket::stream::SocketAcceptor< PhysicalServerSocketT, ConfigT, core::socket::stream::legacy::SocketConnection >, core::socket::stream::SocketAcceptor< PhysicalSocketServerT, ConfigT, core::socket::stream::tls::SocketConnection >, core::socket::stream::SocketConnector< PhysicalSocketClientT, ConfigT, SocketConnectionT >, core::socket::stream::SocketConnector< PhysicalClientSocketT, ConfigT, core::socket::stream::legacy::SocketConnection >, core::socket::stream::SocketConnector< PhysicalSocketClientT, ConfigT, core::socket::stream::tls::SocketConnection >, and database::mariadb::MariaDBCommandStartEvent.
Definition at line 75 of file EventReceiver.cpp.
75 {
76 delete this;
77 }
◆ getName()
const std::string & core::EventReceiver::getName |
( |
| ) |
const |
◆ onEvent()
virtual void core::EventReceiver::onEvent |
( |
const utils::Timeval & | currentTime | ) |
|
|
pure virtual |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ relax()
void core::EventReceiver::relax |
( |
| ) |
|
◆ span()
void core::EventReceiver::span |
( |
| ) |
|
◆ event
Event core::EventReceiver::event |
|
private |
The documentation for this class was generated from the following files: