Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
fmt::Buffer< T > Class Template Referenceabstract

#include <format.h>

+ Inheritance diagram for fmt::Buffer< T >:

Public Member Functions

virtual ~Buffer ()
 
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)
 
Toperator[] (std::size_t index)
 
const Toperator[] (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

Tptr_
 
std::size_t size_
 
std::size_t capacity_
 

Private Member Functions

 FMT_DISALLOW_COPY_AND_ASSIGN (Buffer)
 

Detailed Description

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

\rst A buffer supporting a subset of std::vector's operations. \endrst

Definition at line 738 of file format.h.

Constructor & Destructor Documentation

◆ Buffer()

template<typename T >
fmt::Buffer< T >::Buffer ( T * ptr = FMT_NULL,
std::size_t capacity = 0 )
inlineprotected

Definition at line 747 of file format.h.

◆ ~Buffer()

template<typename T >
virtual fmt::Buffer< T >::~Buffer ( )
inlinevirtual

Definition at line 759 of file format.h.

Member Function Documentation

◆ append()

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.

Definition at line 804 of file format.h.

◆ capacity()

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

Returns the capacity of this buffer.

Definition at line 765 of file format.h.

◆ clear()

template<typename T >
void fmt::Buffer< T >::clear ( )
inline

Definition at line 786 of file format.h.

◆ FMT_DISALLOW_COPY_AND_ASSIGN()

template<typename T >
fmt::Buffer< T >::FMT_DISALLOW_COPY_AND_ASSIGN ( Buffer< T > )
private

◆ grow()

◆ operator[]() [1/2]

template<typename T >
T & fmt::Buffer< T >::operator[] ( std::size_t index)
inline

Definition at line 798 of file format.h.

◆ operator[]() [2/2]

template<typename T >
const T & fmt::Buffer< T >::operator[] ( std::size_t index) const
inline

Definition at line 799 of file format.h.

◆ push_back()

template<typename T >
void fmt::Buffer< T >::push_back ( const T & value)
inline

Definition at line 788 of file format.h.

◆ reserve()

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

\rst Reserves space to store at least capacity elements. \endrst

Definition at line 781 of file format.h.

◆ resize()

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.

Definition at line 770 of file format.h.

◆ size()

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

Returns the size of this buffer.

Definition at line 762 of file format.h.

Member Data Documentation

◆ capacity_

template<typename T >
std::size_t fmt::Buffer< T >::capacity_
protected

Definition at line 745 of file format.h.

◆ ptr_

template<typename T >
T* fmt::Buffer< T >::ptr_
protected

Definition at line 743 of file format.h.

◆ size_

template<typename T >
std::size_t fmt::Buffer< T >::size_
protected

Definition at line 744 of file format.h.


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