![]() |
VRS
A file format for sensor data.
|
Class to represent a data chunk composed of multiple smaller chunks that each have fixed offsets from each other in memory. More...
#include <DataSource.h>
Public Member Functions | |
NonContiguousChunk (const void *data, size_t blockSize, size_t numBlocks, size_t strideInBytes) | |
void | fillAndAdvanceBuffer (uint8_t *&buffer) const final |
![]() | |
DataSourceChunk (const DataSourceChunk &other)=delete | |
Not copyable as there are derived classes that aren't safe to copy from the base class. | |
const DataSourceChunk & | operator= (const DataSourceChunk &other)=delete |
DataSourceChunk () | |
Empty DataSourceChunk. | |
DataSourceChunk (const void *_data, size_t _size) | |
Constructor for a raw pointer + size. | |
template<typename T > | |
DataSourceChunk (const vector< T > &vectorT) | |
Constructor for a vector<T> of objects of POD type T. | |
template<typename T , std::enable_if_t< std::is_trivially_copyable< T >::value, int > = 0, typename = typename std::enable_if<!is_pointer<T>::value, T>::type> | |
DataSourceChunk (const T &object) | |
Constructor for a trivially copyable type T. | |
const void * | data () const |
size_t | size () const |
For performance, do not make this method virtual. | |
Class to represent a data chunk composed of multiple smaller chunks that each have fixed offsets from each other in memory.
vrs::NonContiguousChunk::NonContiguousChunk | ( | const void * | data, |
size_t | blockSize, | ||
size_t | numBlocks, | ||
size_t | strideInBytes | ||
) |
data | start of the buffer. |
blockSize | number of useful bytes in each block of data. |
numBlocks | number of blocks. |
strideInBytes | number of bytes between the first byte of consecutive blocks. (strideInBytes - blockSize) is the number of bytes to skip between blocks, therefore strideInBytes should be greater than blockSize. |
|
finalvirtual |
Copy the data (if any), and update the provided buffer pointer accordingly. The number of bytes copied must be the exact size specified in the constructor.
Reimplemented from vrs::DataSourceChunk.