WPILibC++ 2024.3.2
|
\rst A contiguous memory buffer with an optional growing ability. More...
#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/fmtlib/include/fmt/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 |
FMT_INLINE auto | begin () noexcept -> T * |
FMT_INLINE auto | end () noexcept -> T * |
FMT_INLINE auto | begin () const noexcept -> const T * |
FMT_INLINE auto | end () const noexcept -> const T * |
constexpr auto | size () const noexcept -> size_t |
Returns the size of this buffer. More... | |
constexpr auto | capacity () const noexcept -> size_t |
Returns the capacity of this buffer. More... | |
FMT_CONSTEXPR auto | data () noexcept -> T * |
Returns a pointer to the buffer data (not null-terminated). More... | |
FMT_CONSTEXPR auto | data () const noexcept -> const T * |
void | clear () |
Clears this buffer. More... | |
FMT_CONSTEXPR20 void | try_resize (size_t count) |
FMT_CONSTEXPR20 void | try_reserve (size_t new_capacity) |
FMT_CONSTEXPR20 void | push_back (const T &value) |
template<typename U > | |
void | append (const U *begin, const U *end) |
Appends data to the end of the buffer. More... | |
template<typename Idx > | |
FMT_CONSTEXPR auto | operator[] (Idx index) -> T & |
template<typename Idx > | |
FMT_CONSTEXPR auto | operator[] (Idx index) const -> const T & |
Protected Member Functions | |
buffer (size_t sz) noexcept | |
FMT_CONSTEXPR20 | buffer (T *p=nullptr, size_t sz=0, size_t cap=0) noexcept |
FMT_CONSTEXPR20 | ~buffer ()=default |
buffer (buffer &&)=default | |
FMT_CONSTEXPR void | set (T *buf_data, size_t buf_capacity) noexcept |
Sets the buffer data and capacity. More... | |
virtual FMT_CONSTEXPR20 void | grow (size_t capacity)=0 |
Increases the buffer capacity to hold at least capacity elements. More... | |
\rst A contiguous memory buffer with an optional growing ability.
It is an internal class and shouldn't be used directly, only via ~fmtbasic_memory_buffer
. \endrst
using detail::buffer< T >::const_reference = const T& |
using detail::buffer< T >::value_type = T |
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
protecteddefault |
|
protecteddefault |
|
delete |
void detail::buffer< T >::append | ( | const U * | begin, |
const U * | end | ||
) |
Appends data to the end of the buffer.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Returns the capacity of this buffer.
|
inline |
Clears this buffer.
|
inlinenoexcept |
|
inlinenoexcept |
Returns a pointer to the buffer data (not null-terminated).
|
inlinenoexcept |
|
inlinenoexcept |
|
protectedpure virtual |
Increases the buffer capacity to hold at least capacity elements.
Implemented in detail::iterator_buffer< std::back_insert_iterator< Container >, enable_if_t< is_contiguous< Container >::value, typename Container::value_type > >, basic_memory_buffer< T, SIZE, Allocator >, basic_memory_buffer< bigit, bigits_capacity >, basic_memory_buffer< wchar_t >, detail::iterator_buffer< OutputIt, T, Traits >, detail::iterator_buffer< T *, T, fixed_buffer_traits >, detail::iterator_buffer< T *, T >, and detail::counting_buffer< T >.
|
delete |
|
inline |
|
inline |
|
inline |
|
inlineprotectednoexcept |
Sets the buffer data and capacity.
|
inlineconstexprnoexcept |
Returns the size of this buffer.
|
inline |
|
inline |