|
constexpr | BufferRef () |
| Default constructor. More...
|
|
constexpr | BufferRef (T *data, std::size_t size) |
| Constructor from a pointer and a size. More...
|
|
| BufferRef (std::vector< T > &values) |
| Constructor from a std::vector More...
|
|
template<std::size_t N> |
| BufferRef (std::array< T, N > &values) |
| Constructor from a std::array More...
|
|
template<std::size_t N> |
constexpr | BufferRef (T(&data)[N]) |
| Constructor from a static array. More...
|
|
T * | getData () noexcept |
| Get a pointer to the elements. More...
|
|
constexpr std::size_t | getSize () const noexcept |
| Get the number of elements. More...
|
|
T * | begin () noexcept |
| Get an iterator to the first element. More...
|
|
T * | end () noexcept |
| Get an iterator past the last element. More...
|
|
template<typename T>
class gf::BufferRef< T >
A reference to a modifiable buffer and its size.
This class stores a pointer to a buffer and its size. It can be built from various inputs: std::vector
, std::array
, static array, pointer and size.
- See also
- gf::ArrayRef, gf::StringRef