UniRec
3.2.0
|
A wrapper class for a contiguous array of values with the same unirec fieldID. More...
#include <unirecArray.hpp>
Data Structures | |
class | Iterator |
An iterator for the UnirecArray class. More... | |
Public Member Functions | |
UnirecArray (T *dataPointer, size_t size, ur_field_id_t fieldID) | |
Constructs a UnirecArray object. More... | |
constexpr size_t | size () const noexcept |
Returns the number of elements in the UniRec field array. More... | |
constexpr Iterator | begin () const noexcept |
Returns an iterator to the first element of the UniRec field array. More... | |
constexpr Iterator | end () const noexcept |
Returns an iterator to the element following the last element of the UniRec field array. More... | |
constexpr T & | operator[] (size_t pos) |
Returns a reference to the element at the specified position in the UniRec field array. More... | |
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. More... | |
Private Member Functions | |
void | checkDataType (ur_field_type_t fieldDataType) const |
Private Attributes | |
size_t | m_size |
T * | m_data |
A wrapper class for a contiguous array of values with the same unirec fieldID.
The UnirecArray
class provides a convenient way to work with a contiguous array of values associated with the same unirec fieldID. It supports iterating over the array and provides methods for element access and bounds checking.
T | The type of the values in the array. |
Definition at line 30 of file unirecArray.hpp.
|
inline |
Constructs a UnirecArray object.
dataPointer | A pointer to the first element of the value array. |
size | The number of elements in the value array. |
fieldID | The unirec fieldID associated with the array. |
Definition at line 79 of file unirecArray.hpp.
|
inlineconstexpr |
Returns a reference to the element at the specified position in the UniRec field array, with bounds checking.
pos | The position of the element to return. |
std::out_of_range | If pos is out of range of valid element positions in the UniRec field array. |
Definition at line 118 of file unirecArray.hpp.
|
inlineconstexprnoexcept |
Returns an iterator to the first element of the UniRec field array.
Definition at line 94 of file unirecArray.hpp.
|
inlineprivate |
Definition at line 129 of file unirecArray.hpp.
|
inlineconstexprnoexcept |
Returns an iterator to the element following the last element of the UniRec field array.
Definition at line 100 of file unirecArray.hpp.
|
inlineconstexpr |
Returns a reference to the element at the specified position in the UniRec field array.
pos | The position of the element to return. |
Definition at line 108 of file unirecArray.hpp.
|
inlineconstexprnoexcept |
Returns the number of elements in the UniRec field array.
Definition at line 89 of file unirecArray.hpp.
|
private |
Definition at line 137 of file unirecArray.hpp.
|
private |
Definition at line 136 of file unirecArray.hpp.