#include <DeferredComputation.hpp>
|
| DeferredComputation (uint16_t size=2) |
|
| ~DeferredComputation () |
|
template<typename Function , typename... ProcessParams> |
bool | process (Function func, ProcessParams... params) |
|
template<typename Function , typename... ProcessParams> |
void | processAsync (Function &&func, ProcessParams &&... params) |
|
bool | processing () |
|
std::shared_ptr< DataType > | get (bool markAsUsed=true) |
| Get current buffer for reading. More...
|
|
std::shared_ptr< DataType > | get (bool *isNew) |
| Get current buffer for reading checking if data is new. More...
|
|
std::shared_ptr< DataType > | getWritable () |
| Get a pointer to a writable buffer. More...
|
|
void | doneWriting (std::shared_ptr< DataType > buffer) |
| Mark a buffer as ready to read. More...
|
|
bool | newDataAvailable () |
| Check if there are buffers that have been written but not read. More...
|
|
template<class DataType>
class tinc::DeferredComputation< DataType >
Definition at line 49 of file DeferredComputation.hpp.
◆ DeferredComputation()
template<class DataType >
◆ ~DeferredComputation()
template<class DataType >
◆ doneWriting()
template<class DataType >
Mark a buffer as ready to read.
- Parameters
-
The buffer provided must come from getWritable() otherwise behavior is undefined.
Definition at line 114 of file BufferManager.hpp.
◆ get() [1/2]
template<class DataType >
Get current buffer for reading checking if data is new.
- Parameters
-
isNew | this is set to true if data returned is "new", false otherwise |
- Returns
Definition at line 76 of file BufferManager.hpp.
◆ get() [2/2]
template<class DataType >
Get current buffer for reading.
- Parameters
-
markAsUsed | if false, the returned buffer keeps its "new" status |
- Returns
- a pointer to the data
Definition at line 63 of file BufferManager.hpp.
◆ getWritable()
template<class DataType >
◆ newDataAvailable()
template<class DataType >
Check if there are buffers that have been written but not read.
Definition at line 124 of file BufferManager.hpp.
◆ process()
template<class DataType >
template<typename Function , typename... ProcessParams>
◆ processAsync()
template<class DataType >
template<typename Function , typename... ProcessParams>
◆ processing()
template<class DataType >
◆ mAsyncMutex
template<class DataType >
◆ mAsyncSignal
template<class DataType >
◆ mData
template<class DataType >
◆ mDataLock
template<class DataType >
◆ mNewData
template<class DataType >
◆ mReadBuffer
template<class DataType >
◆ mSize
template<class DataType >
◆ mWriteBuffer
template<class DataType >
The documentation for this class was generated from the following file: