SNode.C
Loading...
Searching...
No Matches
core::timer::Timer Class Reference

#include <Timer.h>

Inheritance diagram for core::timer::Timer:
Collaboration diagram for core::timer::Timer:

Public Member Functions

 Timer (Timer &&timer) noexcept=default
 ~Timer () override
Timeroperator= (const Timer &)=delete
Timeroperator= (Timer &&timer) noexcept=default
 Timer (core::TimerEventReceiver *timerEventReceiver)
 Timer (Timer &&timer) noexcept
 Timer ()=default
Public Member Functions inherited from core::Timer
 Timer ()=default
void cancel ()
void restart ()

Static Public Member Functions

static Timer intervalTimer (const std::function< void(const std::function< void()> &)> &dispatcher, const utils::Timeval &timeout)
static Timer intervalTimer (const std::function< void()> &dispatcher, const utils::Timeval &timeout)
static Timer singleshotTimer (const std::function< void()> &dispatcher, const utils::Timeval &timeout)

Additional Inherited Members

Protected Member Functions inherited from core::Timer
 Timer (core::TimerEventReceiver *timerEventReceiver)
 Timer (Timer &&timer) noexcept
Timeroperator= (Timer &&timer) noexcept

Detailed Description

Definition at line 61 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer() [1/4]

core::timer::Timer::Timer ( Timer && timer)
defaultnoexcept

◆ ~Timer()

core::timer::Timer::~Timer ( )
overridevirtual

Reimplemented from core::Timer.

Definition at line 54 of file Timer.cpp.

54 {
55 }

◆ Timer() [2/4]

core::Timer::Timer ( core::TimerEventReceiver * timerEventReceiver)
explicit

Definition at line 57 of file Timer.cpp.

54 timerEventReceiver->setTimer(this);
55 timerEventReceiver->enable();
56 }
TimerEventReceiver * timerEventReceiver
Definition Timer.h:73

◆ Timer() [3/4]

core::Timer::Timer ( Timer && timer)
explicitnoexcept

Definition at line 58 of file Timer.cpp.

59 : timerEventReceiver(timer.timerEventReceiver) {
60 timer.timerEventReceiver = nullptr;
61
62 if (timerEventReceiver != nullptr) {
63 timerEventReceiver->setTimer(this);
64 }
65 }

◆ Timer() [4/4]

core::Timer::Timer ( )
default

Member Function Documentation

◆ intervalTimer() [1/2]

Timer core::timer::Timer::intervalTimer ( const std::function< void()> & dispatcher,
const utils::Timeval & timeout )
static

Definition at line 65 of file Timer.cpp.

65 {
66 return Timer(new IntervalTimer(dispatcher, timeout));
67 }

References core::timer::IntervalTimer::IntervalTimer().

Referenced by iot::mqtt::client::Mqtt::_onConnack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ intervalTimer() [2/2]

Timer core::timer::Timer::intervalTimer ( const std::function< void(const std::function< void()> &)> & dispatcher,
const utils::Timeval & timeout )
static

Definition at line 61 of file Timer.cpp.

61 {
62 return Timer(new IntervalTimerStopable(dispatcher, timeout));
63 }

References core::timer::IntervalTimerStopable::IntervalTimerStopable().

Here is the call graph for this function:

◆ operator=() [1/2]

Timer & core::timer::Timer::operator= ( const Timer & )
delete

◆ operator=() [2/2]

Timer & core::timer::Timer::operator= ( Timer && timer)
defaultnoexcept

Referenced by iot::mqtt::client::Mqtt::_onConnack(), and iot::mqtt::Mqtt::initSession().

Here is the caller graph for this function:

◆ singleshotTimer()

Timer core::timer::Timer::singleshotTimer ( const std::function< void()> & dispatcher,
const utils::Timeval & timeout )
static

Definition at line 57 of file Timer.cpp.

57 {
58 return Timer(new SingleshotTimer(dispatcher, timeout));
59 }

References core::timer::SingleshotTimer::SingleshotTimer().

Referenced by iot::mqtt::Mqtt::initSession(), core::socket::stream::SocketClient< SocketConnectorT< net::in6::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... >::realConnect(), and core::socket::stream::SocketServer< SocketAcceptorT, SocketContextFactoryT, Args >::realListen().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: