21 #ifndef GF_BUFFER_REF_H 22 #define GF_BUFFER_REF_H 28 #ifndef DOXYGEN_SHOULD_SKIP_THIS 88 : m_data(values.data())
89 , m_size(values.size())
99 template<std::
size_t N>
101 : m_data(values.data())
102 , m_size(values.size())
114 template<std::
size_t N>
136 constexpr std::size_t
getSize() const noexcept {
168 return m_data + m_size;
180 return m_data[index];
189 #ifndef DOXYGEN_SHOULD_SKIP_THIS 194 #endif // GF_BUFFER_REF_H T & operator[](std::size_t index)
Get an element at a given index.
Definition: BufferRef.h:179
BufferRef(std::array< T, N > &values)
Constructor from a std::array
Definition: BufferRef.h:100
T * end() noexcept
Get an iterator past the last element.
Definition: BufferRef.h:167
constexpr BufferRef(T(&data)[N])
Constructor from a static array.
Definition: BufferRef.h:115
constexpr std::size_t getSize() const noexcept
Get the number of elements.
Definition: BufferRef.h:136
T * begin() noexcept
Get an iterator to the first element.
Definition: BufferRef.h:156
A reference to a modifiable buffer and its size.
Definition: BufferRef.h:43
constexpr bool isEmpty() const noexcept
Check if the buffer is empty.
Definition: BufferRef.h:145
constexpr BufferRef(std::nullptr_t)
Null constructor.
Definition: BufferRef.h:62
The namespace for gf classes.
Definition: Action.h:35
constexpr BufferRef(T *data, std::size_t size)
Constructor from a pointer and a size.
Definition: BufferRef.h:75
constexpr BufferRef()
Default constructor.
Definition: BufferRef.h:50
T * getData() noexcept
Get a pointer to the elements.
Definition: BufferRef.h:127
BufferRef(std::vector< T > &values)
Constructor from a std::vector
Definition: BufferRef.h:87