5#include <iolink/DataType.h>
6#include <iolink/DataTypeTraits.h>
7#include <iolink/IOLinkAPI.h>
58 T* dst =
reinterpret_cast<T*
>(buffer());
59 std::copy_n(init.begin(), init.size(), dst);
71 template <
typename InputIt>
75 using ValueType =
typename InputIt::value_type;
76 ValueType* dst =
reinterpret_cast<ValueType*
>(buffer());
77 std::copy_n(first, count(), dst);
106 void read(
size_t offset,
void* dst,
size_t count)
const;
120 template <
typename T>
121 inline T
at(
size_t index)
const
124 read(index, &value, 1);
Stores information about a data type.
Definition DataType.h:162
Definition DataTypeTraits.h:10
A look-up table.
Definition LookUpTable.h:19
const void * buffer() const
Get a pointer to the internal buffer.
LookUpTable(InputIt first, InputIt last)
Build a look-up table from an iterator.
Definition LookUpTable.h:72
void * buffer()
Get a pointer to the internal buffer.
DataType dtype() const
Get the data type of the look-up table.
size_t bufferSize() const
Get the size of the internal buffer in bytes.
LookUpTable(DataType dtype, size_t count)
Build an uninitialized look-up table.
T at(size_t index) const
Read a single value from the look-up table.
Definition LookUpTable.h:121
LookUpTable(std::initializer_list< T > init)
Build a look-up table from an initializer list.
Definition LookUpTable.h:55
LookUpTable()
Build an empty look-up table.
LookUpTable(DataType dtype, const void *src, size_t count)
Build a new Look Up Table object.
void read(size_t offset, void *dst, size_t count) const
Read data from the look-up table.
size_t count() const
Get the number of values in the look-up table.
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8