8 #ifndef WPIUTIL_WPI_UV_SIGNAL_H_
9 #define WPIUTIL_WPI_UV_SIGNAL_H_
15 #include "wpi/Signal.h"
16 #include "wpi/uv/Handle.h"
27 struct private_init {};
30 explicit Signal(
const private_init&) {}
31 ~
Signal() noexcept
override =
default;
38 static std::shared_ptr<Signal>
Create(
Loop& loop);
45 static std::shared_ptr<Signal>
Create(
const std::shared_ptr<Loop>& loop) {
54 void Start(
int signum);
84 #endif // WPIUTIL_WPI_UV_SIGNAL_H_
uv_signal_t * GetRaw() const noexcept
Get the underlying handle data structure.
Definition: Handle.h:261
Handle.
Definition: Handle.h:246
static std::shared_ptr< Signal > Create(Loop &loop)
Create a signal handle.
void Start(int signum)
Start watching for the given signal.
namespace to hold default to_json function
Definition: SmallString.h:21
int GetSignal() const
Get the signal being monitored.
Definition: Signal.h:73
static std::shared_ptr< Signal > Create(const std::shared_ptr< Loop > &loop)
Create a signal handle.
Definition: Signal.h:45
void Stop()
Stop watching for the signal.
Definition: Signal.h:67
Event loop.
Definition: Loop.h:37
sig::Signal< int > signal
Signal generated when a signal occurs.
Definition: Signal.h:78
void StartOneshot(int signum)
Start watching for the given signal.
Signal handle.
Definition: Signal.h:26
SignalBase is an implementation of the observer pattern, through the use of an emitting object and sl...
Definition: Signal.h:495