carb::tasking::ScopedTracking

Defined in carb/tasking/TaskingUtils.h

class ScopedTracking

When instantiated, begins tracking the passed Trackers.

At destruction, tracking on the given Trackers is ended.

This is similar to the manner in which ITasking::addTask() accepts Trackers and begins tracking them prior to the task starting, and then leaves them when the task finishes. This class allows performing the same tracking behavior without the overhead of a task.

Public Functions

inline ScopedTracking()

Default constructor.

inline ScopedTracking(Trackers trackers)

Constructor that accepts a Trackers object.

Parameters

trackers – The Trackers to begin tracking.

inline ~ScopedTracking()

Destructor.

The Trackers provided to the constructor finish tracking when this is destroyed.

inline ScopedTracking(ScopedTracking &&rhs)

Allows move-construct.

inline ScopedTracking &operator=(ScopedTracking &&rhs) noexcept

Allows move-assign.