Roboruka
Knihovna pro obsluhu RoboRuky.
Veřejné metody | Chráněné metody | Seznam všech členů
Dokumentace šablony třídy basic_memory_buffer< T, SIZE, Allocator >

#include <format.h>

Diagram dědičnosti pro třídu basic_memory_buffer< T, SIZE, Allocator >:
internal::buffer< T >

Veřejné metody

 basic_memory_buffer (basic_memory_buffer &&other) FMT_NOEXCEPT
 
basic_memory_bufferoperator= (basic_memory_buffer &&other) FMT_NOEXCEPT
 
- Veřejné metody dědí se z internal::buffer< T >
std::size_t size () const FMT_NOEXCEPT
 
std::size_t capacity () const FMT_NOEXCEPT
 
T * data () FMT_NOEXCEPT
 
const T * data () const FMT_NOEXCEPT
 
void resize (std::size_t new_size)
 
void clear ()
 
void reserve (std::size_t new_capacity)
 
template<typename U >
void append (const U *begin, const U *end)
 

Chráněné metody

void grow (std::size_t size) FMT_OVERRIDE
 
- Chráněné metody dědí se z internal::buffer< T >
void set (T *buf_data, std::size_t buf_capacity) FMT_NOEXCEPT
 
virtual void grow (std::size_t capacity)=0
 

Detailní popis

template<typename T, std::size_t SIZE = inline_buffer_size, typename Allocator = std::allocator<T>>
class basic_memory_buffer< T, SIZE, Allocator >

\rst A dynamically growing memory buffer for trivially copyable/constructible types with the first SIZE elements stored in the object itself.

You can use one of the following type aliases for common character types:

+-------------—+---------------------------—+ | Type | Definition | +================+==============================+ | memory_buffer | basic_memory_buffer<char> | +-------------—+---------------------------—+ | wmemory_buffer | basic_memory_buffer<wchar_t> | +-------------—+---------------------------—+

Example**::

fmt::memory_buffer out; format_to(out, "The answer is {}.", 42);

This will append the following output to the out object:

.. code-block:: none

The answer is 42.

The output can be converted to an std::string with to_string(out). \endrst

Dokumentace konstruktoru a destruktoru

◆ basic_memory_buffer()

template<typename T , std::size_t SIZE = inline_buffer_size, typename Allocator = std::allocator<T>>
basic_memory_buffer< T, SIZE, Allocator >::basic_memory_buffer ( basic_memory_buffer< T, SIZE, Allocator > &&  other)
inline

\rst Constructs a :class:fmt::basic_memory_buffer object moving the content of the other object to it. \endrst

Dokumentace k metodám

◆ grow()

template<typename T , std::size_t SIZE, typename Allocator >
void basic_memory_buffer< T, SIZE, Allocator >::grow ( std::size_t  capacity)
protectedvirtual

Increases the buffer capacity to hold at least capacity elements.

Implementuje internal::buffer< T >.

◆ operator=()

template<typename T , std::size_t SIZE = inline_buffer_size, typename Allocator = std::allocator<T>>
basic_memory_buffer & basic_memory_buffer< T, SIZE, Allocator >::operator= ( basic_memory_buffer< T, SIZE, Allocator > &&  other)
inline

\rst Moves the content of the other basic_memory_buffer object to this one. \endrst


Dokumentace pro tuto třídu byla vygenerována z následujícího souboru: