SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
#include <CMemCopier.hpp>
Public Member Functions | |
bool | init (const T *arg_mem) |
bool | addBuf (T *arg_buf) |
T * | removeBuf (T *arg_buf) |
bool | copy () |
Private Attributes | |
const T * | mem_ |
std::vector< T * > | buf_ |
bool | initialized_ |
A template class that can memcpy its member data to a set of output buffers, whenever required.
bool sutil::CMemCopier< T >::addBuf | ( | T * | arg_buf | ) |
Registers a "to" buffer with the mem copier. Whenever copy is called next, the memory will be copied into these buffer(s).
bool sutil::CMemCopier< T >::copy | ( | ) |
Copies the memory into all the associated output buffers.
bool sutil::CMemCopier< T >::init | ( | const T * | arg_mem | ) |
Initializes a mem copier "from" buffer
T * sutil::CMemCopier< T >::removeBuf | ( | T * | arg_buf | ) |
Function to de-register an output buffer.
arg_buf | : The pointer to the buffer to be removed |
|
private |
The buffers into which the data is copied.
|
private |
Is initialized?
|
private |
Original data source which is copied to a buffer