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

#include <Timer.h>

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

Public Member Functions

 Timer ()=default
 
void cancel ()
 
void restart ()
 

Protected Member Functions

 Timer (core::TimerEventReceiver *timerEventReceiver)
 
 Timer (Timer &&timer) noexcept
 
virtual ~Timer ()
 
Timeroperator= (Timer &&timer) noexcept
 

Private Member Functions

void removeTimerEventReceiver ()
 

Private Attributes

TimerEventReceivertimerEventReceiver = nullptr
 
friend TimerEventReceiver
 

Detailed Description

Definition at line 55 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer() [1/3]

core::Timer::Timer ( core::TimerEventReceiver timerEventReceiver)
explicitprotected

Definition at line 52 of file Timer.cpp.

References core::TimerEventReceiver::enable(), core::TimerEventReceiver::setTimer(), and timerEventReceiver.

Here is the call graph for this function:

◆ Timer() [2/3]

core::Timer::Timer ( Timer &&  timer)
explicitprotectednoexcept

Definition at line 58 of file Timer.cpp.

59 : timerEventReceiver(timer.timerEventReceiver) {
60 timer.timerEventReceiver = nullptr;
61
62 if (timerEventReceiver != nullptr) {
64 }
65 }

References core::TimerEventReceiver::setTimer(), and timerEventReceiver.

Here is the call graph for this function:

◆ ~Timer()

core::Timer::~Timer ( )
protectedvirtual

Reimplemented in core::timer::Timer.

Definition at line 78 of file Timer.cpp.

78 {
79 if (timerEventReceiver != nullptr) {
81 }
82 }

References core::TimerEventReceiver::setTimer(), and timerEventReceiver.

Here is the call graph for this function:

◆ Timer() [3/3]

core::Timer::Timer ( )
default

Member Function Documentation

◆ cancel()

void core::Timer::cancel ( )

Definition at line 84 of file Timer.cpp.

84 {
85 if (timerEventReceiver != nullptr) {
87 }
88 }

References core::TimerEventReceiver::cancel(), and timerEventReceiver.

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

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

◆ operator=()

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

Definition at line 67 of file Timer.cpp.

67 {
68 timerEventReceiver = timer.timerEventReceiver;
69 timer.timerEventReceiver = nullptr;
70
71 if (timerEventReceiver != nullptr) {
73 }
74
75 return *this;
76 }

References core::TimerEventReceiver::setTimer(), and timerEventReceiver.

Here is the call graph for this function:

◆ removeTimerEventReceiver()

void core::Timer::removeTimerEventReceiver ( )
private

Definition at line 96 of file Timer.cpp.

96 {
97 timerEventReceiver = nullptr;
98 }

References timerEventReceiver.

Referenced by core::TimerEventReceiver::~TimerEventReceiver().

Here is the caller graph for this function:

◆ restart()

void core::Timer::restart ( )

Definition at line 90 of file Timer.cpp.

90 {
91 if (timerEventReceiver != nullptr) {
93 }
94 }

References core::TimerEventReceiver::restart(), and timerEventReceiver.

Here is the call graph for this function:

Member Data Documentation

◆ timerEventReceiver

TimerEventReceiver* core::Timer::timerEventReceiver = nullptr
private

Definition at line 73 of file Timer.h.

Referenced by cancel(), operator=(), removeTimerEventReceiver(), restart(), Timer(), Timer(), and ~Timer().

◆ TimerEventReceiver

friend core::Timer::TimerEventReceiver
private

Definition at line 75 of file Timer.h.


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