Auxiliary class for handling exception-safe start/pause and start/stop. More...
#include <Stopwatch.h>
Public Member Functions | |
Handler ()=default | |
Default constructor. More... | |
Handler (const Handler &handler)=delete | |
Default copy constructor is deleted (not copyable) More... | |
Handler (Handler &&handler) noexcept | |
Move constructor. More... | |
~Handler () | |
Destructor either stops or pauses the watch. More... | |
Handler & | operator= (const Handler &handler)=delete |
Default copy assignment is deleted (not copyable) More... | |
Handler & | operator= (Handler &&handler) noexcept |
Move assignemnt. More... | |
Private Member Functions | |
Handler (Watch *watch, bool stop) | |
Private constructor. More... | |
Private Attributes | |
bool | stop =false |
stop (true) or pause (false). More... | |
Watch * | watch =nullptr |
Friends | |
class | Stopwatch |
Allows usage of private constructor. More... | |
Auxiliary class for handling exception-safe start/pause and start/stop.
|
inlineprivate |
Private constructor.
This is kept private to avoid misuse. Handler objects should only be created using startPause() or startStop(). stop is required to know if the destructor should stop or pause the watch.
|
default |
Default constructor.
|
delete |
Default copy constructor is deleted (not copyable)
|
inlinenoexcept |
Move constructor.
|
inline |
Destructor either stops or pauses the watch.
Default copy assignment is deleted (not copyable)
|
inlinenoexcept |
Move assignemnt.
|
friend |
Allows usage of private constructor.
|
private |
stop (true) or pause (false).
might be changed to an enum if clearer.
Hosted by GitHub | 1.8.14 |