![]() |
Murl Engine API
Version 2025.1
|
A double buffer template class. More...
#include <murl_double_buffer.h>
A double buffer template class.
The double buffer holds a read and write value and can check the change of the values.
Public Types | |
| using | ValueType = DataType |
| The template parameter value type. | |
Public Member Functions | |
| DoubleBuffer () | |
| The default constructor. | |
| DoubleBuffer (const DataType &value) | |
| The constructor taking a default value. More... | |
| void | Reset () |
| Reset the read and write value with the value's default constructor. | |
| void | Reset (const DataType &value) |
| Reset the read and write value with a given value. More... | |
| void | ResetReadValue () |
| Reset the read value with the value's default constructor. | |
| void | ResetReadValue (const DataType &value) |
| Reset the read value with a given value. More... | |
| void | ResetWriteValue () |
| Reset the write value with the value's default constructor. | |
| void | ResetWriteValue (const DataType &value) |
| Reset the write value with a given value. More... | |
| void | Update () |
| Assign the write value to the read value. | |
| void | Update (const DataType &value) |
| Assign the write value to the read value and set the write value. More... | |
| Bool | HasChanged () const |
| Check if the write value has changed. More... | |
| Bool | UpdateChanged () |
| Check if the write value has changed and update. More... | |
| void | SetValue (const DataType &value) |
| Set the write value. More... | |
| const DataType & | GetValue () const |
| Get the read value. More... | |
| DataType & | GetValue () |
| Get the mutable read value. More... | |
| const DataType & | GetWriteValue () const |
| Get the write value. More... | |
| DataType & | GetWriteValue () |
| Get the mutable write value. More... | |
| DoubleBuffer & | operator= (const DataType &value) |
| Set the write value (assignment operator). More... | |
| operator const DataType & () const | |
| Get the read value (conversion operator). More... | |
|
inlineexplicit |
The constructor taking a default value.
| value | The read and write value. |
|
inline |
Reset the read and write value with a given value.
| value | The read and write value. |
|
inline |
Reset the read value with a given value.
| value | The read value. |
|
inline |
Reset the write value with a given value.
| value | The write value. |
|
inline |
Assign the write value to the read value and set the write value.
| value | The write value. |
|
inline |
Check if the write value has changed.
|
inline |
Check if the write value has changed and update.
If true assign the write value to the read value.
|
inline |
Set the write value.
| value | The write value. |
|
inline |
Get the read value.
|
inline |
Get the mutable read value.
|
inline |
Get the write value.
|
inline |
Get the mutable write value.
|
inline |
Set the write value (assignment operator).
| value | The write value. |
|
inline |
Get the read value (conversion operator).