|
void | swap (pipe &rhs) noexcept |
| Swaps content with another buffer.
|
template<typename _It> |
pipe & | put (_It begin, _It const &end) |
| Adds elements from an iterator range.
|
pipe & | put (T const *data, std::size_t const size) |
| Adds elements from an array.
|
template<typename U> |
pipe & | operator<< (U &&rhs) noexcept |
| Adds an element to the buffer (operator <<)
|
pipe< char > & | put (qb::compression::deflate::to_compress &) |
| Template specialization for putting compressed data into a character pipe.
|
pipe< char > & | put (qb::compression::deflate::to_uncompress &) |
| Template specialization for putting decompressed data into a character pipe.
|
pipe< char > & | put (qb::compression::gzip::to_compress &) |
| Template specialization for putting gzip compressed data into a character pipe.
|
pipe< char > & | put (qb::compression::gzip::to_uncompress &) |
| Template specialization for putting gzip decompressed data into a character pipe.
|
pipe< char > & | put (const json &c) |
pipe< char > & | put (const char &c) |
pipe< char > & | put (const unsigned char &c) |
pipe< char > & | put (const char *const &c) |
pipe< char > & | put (std::string const &str) |
pipe< char > & | put (std::string_view const &str) |
pipe< char > & | put (pipe< char > const &rhs) |
| base_pipe () |
| Default constructor.
|
| base_pipe (base_pipe const &rhs) |
| Copy constructor.
|
| base_pipe (base_pipe &&rhs) noexcept |
| Move constructor.
|
base_pipe & | operator= (base_pipe const &rhs) |
| Copy assignment operator.
|
base_pipe & | operator= (base_pipe &&rhs) noexcept |
| Move assignment operator.
|
| ~base_pipe () |
| Destructor.
|
std::size_t | capacity () const noexcept |
| Returns the total capacity of the buffer.
|
T * | data () const noexcept |
| Returns a pointer to the buffer data.
|
T * | begin () const noexcept |
| Returns a pointer to the first valid element.
|
T * | end () const noexcept |
| Returns a pointer just after the last valid element.
|
const T * | cbegin () const noexcept |
| Returns a constant pointer to the first valid element.
|
const T * | cend () const noexcept |
| Returns a constant pointer just after the last valid element.
|
std::size_t | size () const noexcept |
| Returns the number of valid elements in the buffer.
|
void | resize (std::size_t new_size) |
| Resizes the buffer.
|
void | free_front (std::size_t const size) noexcept |
| Frees elements at the beginning of the buffer.
|
void | free_back (std::size_t const size) noexcept |
| Frees elements at the end of the buffer.
|
void | reset (std::size_t const begin) noexcept |
| Resets the buffer to a specific position.
|
void | reset () noexcept |
| Completely resets the buffer.
|
void | clear () noexcept |
| Clears the buffer content (alias for reset)
|
bool | empty () const noexcept |
| Checks if the buffer is empty.
|
void | free (std::size_t const size) noexcept |
| Frees a specified number of elements.
|
auto * | allocate_back (std::size_t const size) |
| Allocates space at the end of the buffer.
|
template<typename U, typename... _Init> |
U & | allocate_back (_Init &&...init) |
| Allocates and constructs an object of type U at the end of the buffer.
|
template<typename U, typename... _Init> |
U & | allocate_size (std::size_t const size, _Init &&...init) |
| Allocates space with a custom size and constructs an object.
|
auto | allocate (std::size_t const size) |
| Allocates space at the beginning or end of the buffer.
|
template<typename U, typename... _Init> |
U & | allocate (_Init &&...init) |
| Allocates space and constructs an object.
|
template<typename U> |
U & | recycle_back (U const &data) |
| Copies an object to the end of the buffer.
|
template<typename U> |
U & | recycle_back (U const &data, std::size_t const size) |
| Copies data to the end of the buffer.
|
template<typename U> |
U & | recycle (U const &data) |
| Copies an object to the beginning or end of the buffer.
|
template<typename U> |
U & | recycle (U const &data, std::size_t const size) |
| Copies data to the beginning or end of the buffer.
|
void | reorder () noexcept |
| Reorganizes the buffer to consolidate free space.
|
void | flush () const noexcept |
| Flushes the buffer (synchronization operation, no-op in this class)
|
void | reserve (std::size_t const size) |
| Reserves space in the buffer.
|
template<typename T>
class qb::allocator::pipe< T >
Extensible buffer optimized for performance.
Implements an extensible buffer aligned on cache lines for optimal performance in multithreaded contexts.
- Template Parameters
-
T | Type of elements stored in the buffer |