Firmware
Classes | Public Member Functions | List of all members
TimestampedList< T > Class Template Reference

Public Member Functions

 TimestampedList (int num_items)
 
void put (const T &new_value)
 Insert a value into the list, overwrite the oldest entry if full.
 
void reset_to_start ()
 Before iterating using get_next(), reset to start.
 
T * get_next ()
 Iterate through all active values (not sorted). More...
 
void drop_current ()
 Disable the last item that we have gotten.
 
void update_current ()
 Update the timestamp of the item we have gotten.
 
 TimestampedList (const TimestampedList &)=delete
 
TimestampedList operator= (const TimestampedList &)=delete
 

Member Function Documentation

§ get_next()

template<class T>
T* TimestampedList< T >::get_next ( )
inline

Iterate through all active values (not sorted).

Return nullptr if at end of list.

This is basically a poor man's iterator.


The documentation for this class was generated from the following file: