Agora
1.2.0
Agora project
|
#include <core.h>
Public Types | |
using | value_type = T |
using | const_reference = const T & |
Public Member Functions | |
buffer (const buffer &)=delete | |
void | operator= (const buffer &)=delete |
auto | begin () -> T * throw () |
auto | end () -> T * throw () |
auto | begin () const -> const T * throw () |
auto | end () const -> const T * throw () |
constexpr auto | size () const -> size_t throw () |
constexpr auto | capacity () const -> size_t throw () |
auto | data () -> T * throw () |
auto | data () const -> const T * throw () |
void | clear () |
void | try_resize (size_t count) |
void | try_reserve (size_t new_capacity) |
void | push_back (const T &value) |
template<typename U > | |
void | append (const U *begin, const U *end) |
template<typename I > | |
auto | operator[] (I index) -> T & |
template<typename I > | |
auto | operator[] (I index) const -> const T & |
Protected Member Functions | |
buffer (size_t sz) throw () | |
buffer (T *p=nullptr, size_t sz=0, size_t cap=0) throw () | |
~buffer ()=default | |
buffer (buffer &&)=default | |
void | set (T *buf_data, size_t buf_capacity) throw () |
virtual void | grow (size_t capacity)=0 |
Private Attributes | |
T * | ptr_ |
size_t | size_ |
size_t | capacity_ |
\rst A contiguous memory buffer with an optional growing ability. It is an internal class and shouldn't be used directly, only via ~fmt::basic_memory_buffer
. \endrst
using fmt::v8::detail::buffer< T >::const_reference = const T& |
using fmt::v8::detail::buffer< T >::value_type = T |
|
inlineprotected |
|
inlineprotected |
|
protecteddefault |
|
protecteddefault |
|
delete |
template FMT_API void detail::buffer::append | ( | const U * | begin, |
const U * | end | ||
) |
Appends data to the end of the buffer.
|
inline |
|
inline |
|
inlineconstexpr |
Returns the capacity of this buffer.
|
inline |
Clears this buffer.
|
inline |
Returns a pointer to the buffer data.
|
inline |
Returns a pointer to the buffer data.
|
inline |
|
inline |
|
protectedpure virtual |
Increases the buffer capacity to hold at least capacity elements.
Implemented in fmt::v8::detail::counting_buffer< T >, fmt::v8::detail::iterator_buffer< T *, T >, fmt::v8::detail::iterator_buffer< T *, T, fixed_buffer_traits >, fmt::v8::detail::iterator_buffer< OutputIt, T, Traits >, fmt::v8::basic_memory_buffer< T, SIZE, Allocator >, fmt::v8::basic_memory_buffer< bigit, bigits_capacity >, fmt::v8::basic_memory_buffer< char, 250 >, fmt::v8::basic_memory_buffer< wchar_t >, fmt::v8::basic_memory_buffer< bigit, bigits_capacity >, fmt::v8::basic_memory_buffer< char, 250 >, fmt::v8::basic_memory_buffer< wchar_t >, and fmt::v8::detail::iterator_buffer< std::back_insert_iterator< Container >, enable_if_t< is_contiguous< Container >::value, typename Container::value_type > >.
|
delete |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Sets the buffer data and capacity.
|
inlineconstexpr |
Returns the size of this buffer.
|
inline |
|
inline |
|
private |
|
private |
|
private |