enum_name
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
detail::buffer< T > Class Template Referenceabstract

#include <core.h>

Inheritance diagram for detail::buffer< T >:
basic_memory_buffer< bigit, bigits_capacity > basic_memory_buffer< wchar_t > basic_memory_buffer< T, SIZE, Allocator > detail::counting_buffer< T > detail::iterator_buffer< OutputIt, T, Traits > detail::iterator_buffer< T *, T > detail::iterator_buffer< T *, T, fixed_buffer_traits >

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
 
constexpr auto capacity () const noexcept -> size_t
 
FMT_CONSTEXPR auto data () noexcept -> T *
 
FMT_CONSTEXPR auto data () const noexcept -> const T *
 
void clear ()
 
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)
 
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

FMT_CONSTEXPR buffer (size_t sz) noexcept
 
FMT_CONSTEXPR20 buffer (T *p=nullptr, size_t sz=0, size_t cap=0) noexcept
 
 buffer (buffer &&)=default
 
FMT_CONSTEXPR void set (T *buf_data, size_t buf_capacity) noexcept
 
virtual FMT_CONSTEXPR20 void grow (size_t capacity)=0
 

Detailed Description

template<typename T>
class detail::buffer< T >

\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

Member Function Documentation

◆ append()

template<typename T >
template<typename U >
template FMT_API void detail::buffer< T >::append ( const U * begin,
const U * end )

Appends data to the end of the buffer.

◆ capacity()

template<typename T >
constexpr auto detail::buffer< T >::capacity ( ) const -> size_t
inlineconstexprnoexcept

Returns the capacity of this buffer.

◆ clear()

template<typename T >
void detail::buffer< T >::clear ( )
inline

Clears this buffer.

◆ data()

template<typename T >
FMT_CONSTEXPR auto detail::buffer< T >::data ( ) -> T*
inlinenoexcept

Returns a pointer to the buffer data (not null-terminated).

◆ grow()

template<typename T >
virtual FMT_CONSTEXPR20 void detail::buffer< T >::grow ( size_t capacity)
protectedpure virtual

◆ set()

template<typename T >
FMT_CONSTEXPR void detail::buffer< T >::set ( T * buf_data,
size_t buf_capacity )
inlineprotectednoexcept

Sets the buffer data and capacity.

◆ size()

template<typename T >
constexpr auto detail::buffer< T >::size ( ) const -> size_t
inlineconstexprnoexcept

Returns the size of this buffer.


The documentation for this class was generated from the following files: