DIY 3.0 data-parallel out-of-core C++ library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Typedefs Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
fmt::Buffer< T > Class Template Referenceabstract

`#include <diy/fmt/format.h>`

Inheritance diagram for fmt::Buffer< T >:

## Public Member Functions
std::size_t | size () const
std::size_t | capacity () const
void | resize (std::size_t new_size)
void | reserve (std::size_t capacity)
void | clear () FMT_NOEXCEPT
void | push_back (const T &value)
template<typename U >
void | append (const U *begin, const U *end)
T & | operator[] (std::size_t index)
const T & | operator[] (std::size_t index) const

## Protected Member Functions
| Buffer (T *ptr=FMT_NULL, std::size_t capacity=0)
virtual void | grow (std::size_t size)=0

## Protected Attributes
T * | ptr_
std::size_t | size_
std::size_t | capacity_

## Detailed Description

### template<typename T>
class fmt::Buffer< T >

A buffer supporting a subset of `std::vector`'s operations.

## Member Function Documentation

template<typename T >
template<typename U >

void fmt::Buffer< T >::append | ( | const U * | begin,
|  | const U * | end
| ) |  |

Appends data to the end of the buffer.

template<typename T>

std::size_t fmt::Buffer< T >::capacity | ( |  | ) | const
| inline

Returns the capacity of this buffer.

template<typename T>

virtual void fmt::Buffer< T >::grow | ( | std::size_t | size | ) |
| protected pure virtual

Increases the buffer capacity to hold at least size elements updating `ptr_` and `capacity_`.

Implemented in fmt::internal::FixedBuffer< Char >, fmt::internal::MemoryBuffer< T, SIZE, Allocator >, and fmt::internal::MemoryBuffer< Char, internal::INLINE_BUFFER_SIZE, Allocator >.

template<typename T>

void fmt::Buffer< T >::reserve | ( | std::size_t | capacity | ) |
| inline

Reserves space to store at least capacity elements.

template<typename T>

void fmt::Buffer< T >::resize | ( | std::size_t | new_size | ) |
| inline

Resizes the buffer. If T is a POD type new elements may not be initialized.

template<typename T>

std::size_t fmt::Buffer< T >::size | ( |  | ) | const
| inline

Returns the size of this buffer.

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

- include/diy/fmt/format.h