A class that holds an untyped byte buffer.
More...
#include <sag_connectivity_cpp.hpp>
Inherits sag_underlying_buffer_t.
A class that holds an untyped byte buffer.
Iterators and indexing give access to the underlying byte[] which is guaranteed to be contiguous and at least as large as size().
This is moveable, but not implicitly copyable. If you want to copy it use the .copy() method. If you want to move it use std::move().
◆ buffer_t() [1/3]
com::softwareag::connectivity::buffer_t::buffer_t |
( |
| ) |
|
|
inline |
Construct an empty buffer.
◆ buffer_t() [2/3]
com::softwareag::connectivity::buffer_t::buffer_t |
( |
size_t |
n | ) |
|
|
explicit |
Construct a buffer with (at least) capacity for n items.
◆ ~buffer_t()
com::softwareag::connectivity::buffer_t::~buffer_t |
( |
| ) |
|
|
inline |
Free the underlying buffer contents.
◆ buffer_t() [3/3]
com::softwareag::connectivity::buffer_t::buffer_t |
( |
buffer_t && |
other | ) |
|
|
inline |
Move constructor.
Other will be left as the empty buffer
◆ begin() [1/2]
iterator com::softwareag::connectivity::buffer_t::begin |
( |
| ) |
|
|
inline |
◆ begin() [2/2]
const_iterator com::softwareag::connectivity::buffer_t::begin |
( |
| ) |
const |
|
inline |
Forward const_iterator begin.
◆ cbegin()
const_iterator com::softwareag::connectivity::buffer_t::cbegin |
( |
| ) |
const |
|
inline |
Forward const_iterator begin.
◆ cend()
const_iterator com::softwareag::connectivity::buffer_t::cend |
( |
| ) |
const |
|
inline |
Forward const_iterator end.
◆ clear()
void com::softwareag::connectivity::buffer_t::clear |
( |
| ) |
|
Free the underlying buffer;.
◆ copy()
buffer_t com::softwareag::connectivity::buffer_t::copy |
( |
| ) |
const |
Return a deep copy of this buffer.
◆ empty()
bool com::softwareag::connectivity::buffer_t::empty |
( |
| ) |
const |
|
inline |
Returns true if the buffer is unallocated (size() == 0)
◆ end() [1/2]
iterator com::softwareag::connectivity::buffer_t::end |
( |
| ) |
|
|
inline |
◆ end() [2/2]
const_iterator com::softwareag::connectivity::buffer_t::end |
( |
| ) |
const |
|
inline |
Forward const_iterator end.
◆ operator!=()
bool com::softwareag::connectivity::buffer_t::operator!= |
( |
const buffer_t & |
other | ) |
const |
|
inline |
Returns true if both buffers are different sizes or have different contents.
◆ operator=()
buffer_t& com::softwareag::connectivity::buffer_t::operator= |
( |
buffer_t && |
other | ) |
|
|
inline |
Move assignment.
Other will be left as the empty buffer and our previous contents will be freed.
◆ operator==()
bool com::softwareag::connectivity::buffer_t::operator== |
( |
const buffer_t & |
other | ) |
const |
|
inline |
Returns true if both buffers are the same size and have the same contents.
◆ operator[]() [1/2]
uint8_t& com::softwareag::connectivity::buffer_t::operator[] |
( |
size_t |
n | ) |
|
|
inline |
Return a reference to the byte at the given offset.
If the offset is outside the buffer then throws std::runtime_error
◆ operator[]() [2/2]
const uint8_t& com::softwareag::connectivity::buffer_t::operator[] |
( |
size_t |
n | ) |
const |
|
inline |
Return a reference the byte at the given offset.
If the offset is outside the buffer then throws std::runtime_error
◆ size()
size_t com::softwareag::connectivity::buffer_t::size |
( |
| ) |
const |
|
inline |
Returns the size of the buffer.
◆ swap()
void com::softwareag::connectivity::buffer_t::swap |
( |
buffer_t && |
other | ) |
|
|
inline |
Swap the contents of this buffer and other.
The documentation for this class was generated from the following file: