![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
#include <Buffer.h>
Public Member Functions | |
Buffer () | |
Construct an empty buffer that owns no data. | |
Buffer (std::size_t size) | |
Construct a Buffer that owns a new underlying buffer of size size . | |
Buffer (std::shared_ptr< unsigned char > buffer, MutableByteRange data) | |
Buffer (Buffer &&)=default | |
Buffer & | operator= (Buffer &&)=default |
Buffer | splitAt (std::size_t n) |
void | advance (std::size_t n) |
Modifies the buffer to point to the range [begin + n, end). | |
void | subtract (std::size_t n) |
Modifies the buffer to point to the range [begin, end - n). | |
ByteRange | range () const |
Returns a read only Range pointing to the Buffer s data. | |
MutableByteRange | range () |
Returns a mutable Range pointing to the Buffer s data. | |
const unsigned char * | data () const |
unsigned char * | data () |
std::size_t | size () const |
bool | empty () const |
Buffer () | |
Construct an empty buffer that owns no data. | |
Buffer (std::size_t size) | |
Construct a Buffer that owns a new underlying buffer of size size . | |
Buffer (std::shared_ptr< unsigned char > buffer, MutableByteRange data) | |
Buffer (Buffer &&)=default | |
Buffer & | operator= (Buffer &&)=default |
Buffer | splitAt (std::size_t n) |
void | advance (std::size_t n) |
Modifies the buffer to point to the range [begin + n, end). | |
void | subtract (std::size_t n) |
Modifies the buffer to point to the range [begin, end - n). | |
ByteRange | range () const |
Returns a read only Range pointing to the Buffer s data. | |
MutableByteRange | range () |
Returns a mutable Range pointing to the Buffer s data. | |
const unsigned char * | data () const |
unsigned char * | data () |
std::size_t | size () const |
bool | empty () const |
Buffer () | |
Construct an empty buffer that owns no data. | |
Buffer (std::size_t size) | |
Construct a Buffer that owns a new underlying buffer of size size . | |
Buffer (std::shared_ptr< unsigned char > buffer, MutableByteRange data) | |
Buffer (Buffer &&)=default | |
Buffer & | operator= (Buffer &&)=default |
Buffer | splitAt (std::size_t n) |
void | advance (std::size_t n) |
Modifies the buffer to point to the range [begin + n, end). | |
void | subtract (std::size_t n) |
Modifies the buffer to point to the range [begin, end - n). | |
ByteRange | range () const |
Returns a read only Range pointing to the Buffer s data. | |
MutableByteRange | range () |
Returns a mutable Range pointing to the Buffer s data. | |
const unsigned char * | data () const |
unsigned char * | data () |
std::size_t | size () const |
bool | empty () const |
A Buffer
has a pointer to a shared buffer, and a range of the buffer that it owns. The idea is that you can allocate one buffer, and write chunks into it and break off those chunks. The underlying buffer is reference counted, and will be destroyed when all Buffer
s that reference it are destroyed.
|
inlineexplicit |
Construct an empty buffer that owns no data.
|
inlineexplicit |
Construct a Buffer
that owns a new underlying buffer of size size
.
|
inlineexplicit |
|
inlineexplicit |
Construct an empty buffer that owns no data.
|
inlineexplicit |
Construct a Buffer
that owns a new underlying buffer of size size
.
|
inlineexplicit |
|
inlineexplicit |
Construct an empty buffer that owns no data.
|
inlineexplicit |
Construct a Buffer
that owns a new underlying buffer of size size
.
|
inlineexplicit |
|
inline |
Modifies the buffer to point to the range [begin + n, end).
|
inline |
Modifies the buffer to point to the range [begin + n, end).
|
inline |
Modifies the buffer to point to the range [begin + n, end).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Splits the data into two pieces: [begin, begin + n), [begin + n, end). Their data both points into the same underlying buffer. Modifies the original Buffer
to point to only [begin + n, end).
n | The offset to split at. |
|
inline |
Splits the data into two pieces: [begin, begin + n), [begin + n, end). Their data both points into the same underlying buffer. Modifies the original Buffer
to point to only [begin + n, end).
n | The offset to split at. |
|
inline |
Splits the data into two pieces: [begin, begin + n), [begin + n, end). Their data both points into the same underlying buffer. Modifies the original Buffer
to point to only [begin + n, end).
n | The offset to split at. |
|
inline |
Modifies the buffer to point to the range [begin, end - n).
|
inline |
Modifies the buffer to point to the range [begin, end - n).
|
inline |
Modifies the buffer to point to the range [begin, end - n).