VRS
A file format for sensor data.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vrs::DataSourceChunk Class Reference

Elementary part of a DataSource for a simple block of memory. More...

#include <DataSource.h>

Inheritance diagram for vrs::DataSourceChunk:
vrs::NonContiguousChunk

Public Member Functions

 DataSourceChunk (const DataSourceChunk &other)=delete
 Not copyable as there are derived classes that aren't safe to copy from the base class.
 
const DataSourceChunkoperator= (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.
 
virtual void fillAndAdvanceBuffer (uint8_t *&buffer) const
 
const void * data () const
 
size_t size () const
 For performance, do not make this method virtual.
 

Detailed Description

Elementary part of a DataSource for a simple block of memory.

Class possibly referencing a buffer of bytes, specified in 4 possible different ways:

This class is meant to simplify the manipulation of a buffer of bytes, for use by DataSource. Only the constructors and assignment operators are meant to be used by code outside of DataSource.

Member Function Documentation

◆ fillAndAdvanceBuffer()

void vrs::DataSourceChunk::fillAndAdvanceBuffer ( uint8_t *&  buffer) const
virtual

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 in vrs::NonContiguousChunk.


The documentation for this class was generated from the following files: