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");
#define ur_get_type(field_id)
Get type of UniRec field Get type of any UniRec defined field.
reference operator*() const
constexpr T & operator[](size_t pos)
Returns a reference to the element at the specified position in the UniRec field array.
A wrapper class for a contiguous array of values with the same unirec fieldID.
bool operator==(const Iterator &other) const
void checkDataType(ur_field_type_t fieldDataType) const
An iterator for the UnirecArray class.
std::ptrdiff_t difference_type
std::random_access_iterator_tag iterator_category
constexpr size_t size() const noexcept
Returns the number of elements in the UniRec field array.
int16_t ur_field_id_t
Type of UniRec field identifiers.
Definition of UniRec structures and functions.
constexpr Iterator begin() const noexcept
Returns an iterator to the first element of the UniRec field array.
bool operator!=(const Iterator &other) const
UnirecArray(T *dataPointer, size_t size, ur_field_id_t fieldID)
Constructs a UnirecArray object.
This file contains functions for determining the expected UniRec type for various C++ types...
constexpr T & at(size_t pos) const
Returns a reference to the element at the specified position in the UniRec field array, with bounds checking.
constexpr Iterator end() const noexcept
Returns an iterator to the element following the last element of the UniRec field array...