An auto-resizable byte storage.
More...
#include <ByteBuffer.h>
An auto-resizable byte storage.
◆ ByteBuffer() [1/2]
ph::ByteBuffer::ByteBuffer |
( |
| ) |
|
|
inline |
◆ ByteBuffer() [2/2]
ph::ByteBuffer::ByteBuffer |
( |
std::size_t | numExpectedWrittenBytes | ) |
|
|
inlineexplicit |
◆ clear()
void ph::ByteBuffer::clear |
( |
| ) |
|
|
inline |
Clear all data and reset reader and writer positions.
◆ fill()
void ph::ByteBuffer::fill |
( |
std::byte | filledByte | ) |
|
|
inline |
◆ fit()
void ph::ByteBuffer::fit |
( |
| ) |
|
|
inline |
◆ getBytes() [1/2]
TSpan< std::byte > ph::ByteBuffer::getBytes |
( |
| ) |
|
|
inline |
Direct access to all the bytes in the buffer.
◆ getBytes() [2/2]
TSpanView< std::byte > ph::ByteBuffer::getBytes |
( |
| ) |
const |
|
inline |
◆ getReadPosition()
std::size_t ph::ByteBuffer::getReadPosition |
( |
| ) |
const |
|
inline |
- Returns
- The index that is going to be read next.
◆ getWritePosition()
std::size_t ph::ByteBuffer::getWritePosition |
( |
| ) |
const |
|
inline |
- Returns
- The index that is going to be written next.
◆ hasMoreToRead()
bool ph::ByteBuffer::hasMoreToRead |
( |
| ) |
const |
|
inline |
◆ isEmpty()
bool ph::ByteBuffer::isEmpty |
( |
| ) |
const |
|
inline |
◆ numBytes()
std::size_t ph::ByteBuffer::numBytes |
( |
| ) |
const |
|
inline |
◆ read() [1/2]
template<typename T >
T ph::ByteBuffer::read |
( |
| ) |
|
|
inline |
◆ read() [2/2]
template<typename T >
void ph::ByteBuffer::read |
( |
T * | out_data, |
|
|
std::size_t | numElements ) |
|
inline |
◆ rewindRead()
void ph::ByteBuffer::rewindRead |
( |
| ) |
|
|
inline |
◆ rewindWrite()
void ph::ByteBuffer::rewindWrite |
( |
| ) |
|
|
inline |
◆ setNumBytes()
void ph::ByteBuffer::setNumBytes |
( |
std::size_t | numBytes | ) |
|
|
inline |
◆ setReadPosition()
void ph::ByteBuffer::setReadPosition |
( |
std::size_t | indexOfByte | ) |
|
|
inline |
◆ setWritePosition()
void ph::ByteBuffer::setWritePosition |
( |
std::size_t | indexOfByte | ) |
|
|
inline |
◆ truncate()
void ph::ByteBuffer::truncate |
( |
| ) |
|
|
inline |
◆ write() [1/2]
template<typename T >
void ph::ByteBuffer::write |
( |
const T & | data | ) |
|
|
inline |
Writes data to the buffer. Grows the buffer if no space left.
◆ write() [2/2]
template<typename T >
void ph::ByteBuffer::write |
( |
const T * | data, |
|
|
std::size_t | numElements ) |
|
inline |
Writes data to the buffer. Grows the buffer if no space left.
The documentation for this class was generated from the following file: