WPILibC++ 2024.3.2
detail::buffer< T > Class Template Referenceabstract

\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>

Inheritance diagram for detail::buffer< T >:
basic_memory_buffer< T, SIZE, Allocator > 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
 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...
 

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 Typedef Documentation

◆ const_reference

template<typename T >
using detail::buffer< T >::const_reference = const T&

◆ value_type

template<typename T >
using detail::buffer< T >::value_type = T

Constructor & Destructor Documentation

◆ buffer() [1/4]

template<typename T >
detail::buffer< T >::buffer ( size_t  sz)
inlineprotectednoexcept

◆ buffer() [2/4]

template<typename T >
FMT_CONSTEXPR20 detail::buffer< T >::buffer ( T *  p = nullptr,
size_t  sz = 0,
size_t  cap = 0 
)
inlineprotectednoexcept

◆ ~buffer()

template<typename T >
FMT_CONSTEXPR20 detail::buffer< T >::~buffer ( )
protecteddefault

◆ buffer() [3/4]

template<typename T >
detail::buffer< T >::buffer ( buffer< T > &&  )
protecteddefault

◆ buffer() [4/4]

template<typename T >
detail::buffer< T >::buffer ( const buffer< T > &  )
delete

Member Function Documentation

◆ append()

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

Appends data to the end of the buffer.

◆ begin() [1/2]

template<typename T >
FMT_INLINE auto detail::buffer< T >::begin ( ) const -> const T*
inlinenoexcept

◆ begin() [2/2]

template<typename T >
FMT_INLINE auto detail::buffer< T >::begin ( ) -> T*
inlinenoexcept

◆ 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() [1/2]

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

◆ data() [2/2]

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

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

◆ end() [1/2]

template<typename T >
FMT_INLINE auto detail::buffer< T >::end ( ) const -> const T*
inlinenoexcept

◆ end() [2/2]

template<typename T >
FMT_INLINE auto detail::buffer< T >::end ( ) -> T*
inlinenoexcept

◆ grow()

◆ operator=()

template<typename T >
void detail::buffer< T >::operator= ( const buffer< T > &  )
delete

◆ operator[]() [1/2]

template<typename T >
template<typename Idx >
FMT_CONSTEXPR auto detail::buffer< T >::operator[] ( Idx  index) -> T&
inline

◆ operator[]() [2/2]

template<typename T >
template<typename Idx >
FMT_CONSTEXPR auto detail::buffer< T >::operator[] ( Idx  index) const -> const T&
inline

◆ push_back()

template<typename T >
FMT_CONSTEXPR20 void detail::buffer< T >::push_back ( const T &  value)
inline

◆ 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.

◆ try_reserve()

template<typename T >
FMT_CONSTEXPR20 void detail::buffer< T >::try_reserve ( size_t  new_capacity)
inline

◆ try_resize()

template<typename T >
FMT_CONSTEXPR20 void detail::buffer< T >::try_resize ( size_t  count)
inline

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