#include <Performance.hpp>
Public Member Functions | |
TrackPerformance (PerformanceTracker &tracker) | |
~TrackPerformance () | |
TrackPerformance (const TrackPerformance &)=delete | |
TrackPerformance (TrackPerformance &&)=delete | |
TrackPerformance & | operator= (const TrackPerformance &)=delete |
TrackPerformance & | operator= (TrackPerformance &&)=delete |
Private Attributes | |
PerformanceTracker & | _tracker |
Reference to the PerformanceTracker object. | |
RAII style wrapper for PerformanceTracker.
The TrackPerformance class is a RAII (Resource Acquisition Is Initialization) style wrapper for the PerformanceTracker class. It automatically starts the timer when constructed and stops the timer when destructed. This ensures that the timer is always stopped, even in case of exceptions or early returns. The class is non-copyable and non-movable to prevent unintended behavior.
Definition at line 51 of file Performance.hpp.
|
inlineexplicit |
Constructs a new TrackPerformance object.
[in] | tracker | The PerformanceTracker object to track. |
Definition at line 60 of file Performance.hpp.
|
inline |
Destructs the TrackPerformance object and stops the timer.
Definition at line 65 of file Performance.hpp.
|
delete |
|
delete |
|
delete |
|
delete |
|
private |
Reference to the PerformanceTracker object.
Definition at line 53 of file Performance.hpp.