89 constexpr size_t size() const noexcept {
return m_size; }
118 constexpr T&
at(
size_t pos)
const
121 throw std::out_of_range(
122 "UnirecArray::at: pos (which is %zu) "
123 ">= m_size (which is %zu)"),
131 if (getExpectedUnirecType<T*>() != fieldDataType) {
132 throw std::runtime_error(
"Unirec array data type format mismatch");
An iterator for the UnirecArray class.
std::random_access_iterator_tag iterator_category
bool operator!=(const Iterator &other) const
std::ptrdiff_t difference_type
bool operator==(const Iterator &other) const
reference operator*() const
A wrapper class for a contiguous array of values with the same unirec fieldID.
constexpr T & at(size_t pos) const
Returns a reference to the element at the specified position in the UniRec field array,...
constexpr Iterator begin() const noexcept
Returns an iterator to the first element of the UniRec field array.
void checkDataType(ur_field_type_t fieldDataType) const
constexpr Iterator end() const noexcept
Returns an iterator to the element following the last element of the UniRec field array.
UnirecArray(T *dataPointer, size_t size, ur_field_id_t fieldID)
Constructs a UnirecArray object.
constexpr T & operator[](size_t pos)
Returns a reference to the element at the specified position in the UniRec field array.
constexpr size_t size() const noexcept
Returns the number of elements in the UniRec field array.
#define ur_get_type(field_id)
Get type of UniRec field Get type of any UniRec defined field.
This file contains functions for determining the expected UniRec type for various C++ types.
Definition of UniRec structures and functions.
int16_t ur_field_id_t
Type of UniRec field identifiers.