WPILibC++ 2023.4.3-108-ge5452e3
counting_buffer< T > Class Template Referencefinal

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/fmtlib/include/fmt/core.h>

Inheritance diagram for counting_buffer< T >:
buffer< char >

Public Member Functions

 counting_buffer ()
 
auto count () -> size_t
 
- Public Member Functions inherited from buffer< char >
 buffer (const buffer &)=delete
 
void operator= (const buffer &)=delete
 
auto begin () noexcept -> char *
 
auto begin () const noexcept -> const char *
 
auto end () noexcept -> char *
 
auto end () const noexcept -> const char *
 
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 -> char *
 Returns a pointer to the buffer data. More...
 
FMT_CONSTEXPR auto data () const noexcept -> const char *
 Returns a pointer to the buffer data. More...
 
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 char &value)
 
void append (const U *begin, const U *end)
 Appends data to the end of the buffer. More...
 
FMT_CONSTEXPR auto operator[] (Idx index) -> char &
 
FMT_CONSTEXPR auto operator[] (Idx index) const -> const char &
 

Protected Member Functions

FMT_CONSTEXPR20 void grow (size_t) override
 Increases the buffer capacity to hold at least capacity elements. More...
 
- Protected Member Functions inherited from buffer< char >
 buffer (size_t sz) noexcept
 
FMT_CONSTEXPR20 buffer (char *p=nullptr, size_t sz=0, size_t cap=0) noexcept
 
 buffer (buffer &&)=default
 
FMT_CONSTEXPR20 ~buffer ()=default
 
FMT_CONSTEXPR void set (char *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...
 

Additional Inherited Members

- Public Types inherited from buffer< char >
using value_type = char
 
using const_reference = const char &
 

Constructor & Destructor Documentation

◆ counting_buffer()

template<typename T = char>
counting_buffer< T >::counting_buffer ( )
inline

Member Function Documentation

◆ count()

template<typename T = char>
auto counting_buffer< T >::count ( ) -> size_t
inline

◆ grow()

template<typename T = char>
FMT_CONSTEXPR20 void counting_buffer< T >::grow ( size_t  capacity)
inlineoverrideprotectedvirtual

Increases the buffer capacity to hold at least capacity elements.

Implements buffer< char >.


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