uvw
1.3.0
src
uvw
check.hpp
1
#pragma once
2
3
4
#include <utility>
5
#include <memory>
6
#include <uv.h>
7
#include "handle.hpp"
8
#include "loop.hpp"
9
10
11
namespace
uvw
{
12
13
19
struct
CheckEvent
{};
20
21
30
class
CheckHandle
final:
public
Handle
<CheckHandle, uv_check_t> {
31
static
void
startCallback(uv_check_t *handle) {
32
CheckHandle
&check = *(
static_cast<
CheckHandle
*
>
(handle->data));
33
check.publish(
CheckEvent
{});
34
}
35
36
public
:
37
using
Handle::Handle;
38
43
bool
init
() {
44
return
initialize(&uv_check_init);
45
}
46
53
void
start
() {
54
invoke(&uv_check_start,
get
(), &startCallback);
55
}
56
60
void
stop
() {
61
invoke(&uv_check_stop,
get
());
62
}
63
};
64
65
66
}
uvw::CheckHandle::stop
void stop()
Stops the handle.
Definition:
check.hpp:60
uvw::CheckHandle::start
void start()
Starts the handle.
Definition:
check.hpp:53
uvw::CheckEvent
CheckEvent event.
Definition:
check.hpp:19
uvw::Handle
Handle base class.
Definition:
handle.hpp:29
uvw::CheckHandle::init
bool init()
Initializes the handle.
Definition:
check.hpp:43
uvw::CheckHandle
The CheckHandle handle.
Definition:
check.hpp:30
uvw
uvw default namespace.
Definition:
async.hpp:11
Generated by
1.8.13