class mrpt::nav::CWaypointsNavigator::WaypointsAccessGuard

Overview

RAII guard returned by getWaypointsAccessGuard().

Holds the waypoints mutex for the lifetime of this object and exposes a reference to the mutable waypoint status sequence.

#include <mrpt/nav/reactive/CWaypointsNavigator.h>

class WaypointsAccessGuard
{
public:
    // construction

    WaypointsAccessGuard(
        std::recursive_mutex& cs,
        TWaypointStatusSequence& wps
        );

    // methods

    TWaypointStatusSequence& waypoints();
    const TWaypointStatusSequence& waypoints() const;
};