RAII helper that advances a ProgressTracker on destruction.
More...
#include <progress_tracker.hpp>
RAII helper that advances a ProgressTracker on destruction.
This class ensures that a progress tracker is advanced by a specified number of steps when the scope exits, providing exception-safe progress updates.
Usage Example
}
AdvanceTracker(SharedProgressTrackerT shared_progress_tracker, std::uint64_t step_count=1u) noexcept
Construct with a shared progress tracker and step count.
Definition progress_tracker.hpp:546
std::shared_ptr< ProgressTracker > SharedProgressTrackerT
Shared pointer type for ProgressTracker.
Definition progress_tracker.hpp:405
- See also
- ProgressTracker::Advance()
- Since
- 10.0.0
◆ AdvanceTracker()
| Recognition::Utility::AdvanceTracker::AdvanceTracker |
( |
SharedProgressTrackerT | shared_progress_tracker, |
|
|
std::uint64_t | step_count = 1u ) |
|
inlineexplicitnoexcept |
Construct with a shared progress tracker and step count.
- Parameters
-
| [in] | shared_progress_tracker | Tracker to advance on destruction. May be null (no-op in that case). |
| [in] | step_count | Number of steps to advance (default: 1). |
- Since
- 10.0.0
◆ ~AdvanceTracker()
| Recognition::Utility::AdvanceTracker::~AdvanceTracker |
( |
| ) |
|
|
inline |
Destructor that advances the tracker.
If the tracker is not null, calls Advance() with the step count.
- Since
- 10.0.0
◆ m_shared_progress_tracker
Tracker to advance on destruction.
◆ m_step_count
| std::uint64_t Recognition::Utility::AdvanceTracker::m_step_count |
|
private |
The documentation for this class was generated from the following file: