Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
fmt::Buffer< T > Class Template Referenceabstract

#include <format.h>

Inherited by fmt::internal::MemoryBuffer< T, SIZE, Allocator >.

Public Member Functions

template<typename U >
void append (const U *begin, const U *end)
 
std::size_t capacity () const
 
void reserve (std::size_t capacity)
 
void resize (std::size_t new_size)
 
std::size_t size () const
 

Protected Member Functions

virtual void grow (std::size_t size)=0
 

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)
protectedpure virtual

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

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.