class buffer
Declaration
template <typename T>
class buffer { /* full declaration omitted */ };
Description
\rstA 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
Declared at: third_party/fmt/include/fmt/core.h:797
Templates
- T
Method Overview
- public template <typename U>void append(const U * begin, const U * end)
- public inline auto begin() const noexcept -> const T *
- public inline auto begin() noexcept -> T *
- protected constexpr buffer<T>(T * p = nullptr, size_t sz = 0, size_t cap = 0) noexcept
- public buffer<T>(const buffer<T> &)
- protected buffer<T>(buffer<T> &&)
- protected buffer<T>(size_t sz) noexcept
- public constexpr auto capacity() const noexcept -> size_t
- public void clear()
- public constexpr auto data() noexcept -> T *
- public constexpr auto data() const noexcept -> const T *
- public inline auto end() noexcept -> T *
- public inline auto end() const noexcept -> const T *
- protected virtual constexpr void grow(size_t capacity)
- public constexpr void push_back(const T & value)
- protected constexpr void set(T * buf_data, size_t buf_capacity) noexcept
- public constexpr auto size() const noexcept -> size_t
- public constexpr void try_reserve(size_t new_capacity)
- public constexpr void try_resize(size_t count)
- protected ~buffer<T>()
Methods
¶template <typename U>
void append(const U* begin, const U* end)
template <typename U>
void append(const U* begin, const U* end)
Description
Appends data to the end of the buffer.
Declared at: third_party/fmt/include/fmt/core.h:870
Templates
- U
Parameters
- const U* begin
- const U* end
¶inline auto begin() const noexcept -> const T*
inline auto begin() const noexcept -> const T*
Declared at: third_party/fmt/include/fmt/core.h:833
¶inline auto begin() noexcept -> T*
inline auto begin() noexcept -> T*
Declared at: third_party/fmt/include/fmt/core.h:830
¶constexpr buffer<T>(T* p = nullptr,
size_t sz = 0,
size_t cap = 0) noexcept
constexpr buffer<T>(T* p = nullptr,
size_t sz = 0,
size_t cap = 0) noexcept
Declared at: third_party/fmt/include/fmt/core.h:808
Parameters
- T* p = nullptr
- size_t sz = 0
- size_t cap = 0
¶buffer<T>(const buffer<T>&)
buffer<T>(const buffer<T>&)
Declared at: third_party/fmt/include/fmt/core.h:827
Parameters
- const buffer<T>&
¶buffer<T>(buffer<T>&&)
buffer<T>(buffer<T>&&)
Declared at: third_party/fmt/include/fmt/core.h:812
Parameters
- buffer<T>&&
¶buffer<T>(size_t sz) noexcept
buffer<T>(size_t sz) noexcept
Declared at: third_party/fmt/include/fmt/core.h:806
Parameters
- size_t sz
¶constexpr auto capacity() const noexcept -> size_t
constexpr auto capacity() const noexcept -> size_t
Description
Returns the capacity of this buffer.
Declared at: third_party/fmt/include/fmt/core.h:840
¶void clear()
void clear()
Description
Clears this buffer.
Declared at: third_party/fmt/include/fmt/core.h:847
¶constexpr auto data() noexcept -> T*
constexpr auto data() noexcept -> T*
Description
Returns a pointer to the buffer data (not null-terminated).
Declared at: third_party/fmt/include/fmt/core.h:843
¶constexpr auto data() const noexcept -> const T*
constexpr auto data() const noexcept -> const T*
Declared at: third_party/fmt/include/fmt/core.h:844
¶inline auto end() noexcept -> T*
inline auto end() noexcept -> T*
Declared at: third_party/fmt/include/fmt/core.h:831
¶inline auto end() const noexcept -> const T*
inline auto end() const noexcept -> const T*
Declared at: third_party/fmt/include/fmt/core.h:834
¶virtual constexpr void grow(size_t capacity)
virtual constexpr void grow(size_t capacity)
Description
Increases the buffer capacity to hold at least *capacity* elements.
Declared at: third_party/fmt/include/fmt/core.h:821
Parameters
- size_t capacity
¶constexpr void push_back(const T& value)
constexpr void push_back(const T& value)
Declared at: third_party/fmt/include/fmt/core.h:864
Parameters
- const T& value
¶constexpr void set(T* buf_data,
size_t buf_capacity) noexcept
constexpr void set(T* buf_data,
size_t buf_capacity) noexcept
Description
Sets the buffer data and capacity.
Declared at: third_party/fmt/include/fmt/core.h:815
Parameters
- T* buf_data
- size_t buf_capacity
¶constexpr auto size() const noexcept -> size_t
constexpr auto size() const noexcept -> size_t
Description
Returns the size of this buffer.
Declared at: third_party/fmt/include/fmt/core.h:837
¶constexpr void try_reserve(size_t new_capacity)
constexpr void try_reserve(size_t new_capacity)
Declared at: third_party/fmt/include/fmt/core.h:860
Parameters
- size_t new_capacity
¶constexpr void try_resize(size_t count)
constexpr void try_resize(size_t count)
Declared at: third_party/fmt/include/fmt/core.h:851
Parameters
- size_t count
¶~buffer<T>()
~buffer<T>()
Declared at: third_party/fmt/include/fmt/core.h:811