SensorBase::last_capture_
Having an updated pointer to the last capture of the sensor is a functionality that would be useful. To do so, we should:
- Add in
SensorBase
thelast_capture_ptr_
atribute (and the gettergetLastCapture()
and settersetLastCapture(CaptureBase)
). - Now,
getLastCapture()
implements a search for the last capture of the sensor, should be renamed toupdateLastCapture()
. - Also, in
CaptureBase::remove()
, it should check ifshared_from_this == sensor_ptr_->getLastCapture()
and if its the case, callsensor_ptr_->updateLastCapture()
. - Also, in
CaptureBase::setProblem()
we should update the last capture as well: `sensoer_ptr_->setLastCapture(shared_from_this).