A double-buffer implementation for storing and switching between two values.
More...
#include <DoubleBuffer.h>
|
| void | fill (const T &value) |
| | Fills both buffers with the given value.
|
| void | push (const T &value) |
| | Pushes a value into the buffer and advances the state.
|
|
void | advance () |
| | Advances the buffer state to the next buffer.
|
| T & | next () |
| | Advances the buffer state and retrieves the next buffer value.
|
| const T & | current () const |
| | Retrieves the current buffer value.
|
| const T & | last () const |
| | Retrieves the last buffer value.
|
| T & | last () |
| | Retrieves the last buffer value.
|
| T & | current () |
| | Retrieves the current buffer value.
|
template<typename T>
class jsa::cicuetea::DoubleBuffer< T >
A double-buffer implementation for storing and switching between two values.
- Template Parameters
-
| T | The type of the values stored in the buffer. |
◆ current() [1/2]
Retrieves the current buffer value.
- Returns
- A reference to the current buffer value.
◆ current() [2/2]
Retrieves the current buffer value.
- Returns
- A const reference to the current buffer value.
◆ fill()
Fills both buffers with the given value.
- Parameters
-
| value | The value to fill the buffers with. |
◆ last() [1/2]
Retrieves the last buffer value.
- Returns
- A reference to the last buffer value.
◆ last() [2/2]
Retrieves the last buffer value.
- Returns
- A const reference to the last buffer value.
◆ next()
Advances the buffer state and retrieves the next buffer value.
- Returns
- A reference to the next buffer value.
◆ push()
Pushes a value into the buffer and advances the state.
- Parameters
-
| value | The value to push into the buffer. |
The documentation for this class was generated from the following file: