Agora  1.2.0
Agora project
fmt::v8::detail::buffer< T > Class Template Referenceabstract

#include <core.h>

Inheritance diagram for fmt::v8::detail::buffer< T >:

Public Types

using value_type = T
 
using const_reference = const T &
 

Public Member Functions

 buffer (const buffer &)=delete
 
void operator= (const buffer &)=delete
 
auto begin () -> T * throw ()
 
auto end () -> T * throw ()
 
auto begin () const -> const T * throw ()
 
auto end () const -> const T * throw ()
 
constexpr auto size () const -> size_t throw ()
 
constexpr auto capacity () const -> size_t throw ()
 
auto data () -> T * throw ()
 
auto data () const -> const T * throw ()
 
void clear ()
 
void try_resize (size_t count)
 
void try_reserve (size_t new_capacity)
 
void push_back (const T &value)
 
template<typename U >
void append (const U *begin, const U *end)
 
template<typename I >
auto operator[] (I index) -> T &
 
template<typename I >
auto operator[] (I index) const -> const T &
 

Protected Member Functions

 buffer (size_t sz) throw ()
 
 buffer (T *p=nullptr, size_t sz=0, size_t cap=0) throw ()
 
 ~buffer ()=default
 
 buffer (buffer &&)=default
 
void set (T *buf_data, size_t buf_capacity) throw ()
 
virtual void grow (size_t capacity)=0
 

Private Attributes

Tptr_
 
size_t size_
 
size_t capacity_
 

Detailed Description

template<typename T>
class fmt::v8::detail::buffer< T >

\rst A contiguous memory buffer with an optional growing ability. It is an internal class and shouldn't be used directly, only via ~fmt::basic_memory_buffer. \endrst

Member Typedef Documentation

◆ const_reference

template<typename T >
using fmt::v8::detail::buffer< T >::const_reference = const T&

◆ value_type

template<typename T >
using fmt::v8::detail::buffer< T >::value_type = T

Constructor & Destructor Documentation

◆ buffer() [1/4]

template<typename T >
fmt::v8::detail::buffer< T >::buffer ( size_t  sz)
throw (
)
inlineprotected

◆ buffer() [2/4]

template<typename T >
fmt::v8::detail::buffer< T >::buffer ( T p = nullptr,
size_t  sz = 0,
size_t  cap = 0 
)
throw (
)
inlineprotected

◆ ~buffer()

template<typename T >
fmt::v8::detail::buffer< T >::~buffer ( )
protecteddefault

◆ buffer() [3/4]

template<typename T >
fmt::v8::detail::buffer< T >::buffer ( buffer< T > &&  )
protecteddefault

◆ buffer() [4/4]

template<typename T >
fmt::v8::detail::buffer< T >::buffer ( const buffer< T > &  )
delete

Member Function Documentation

◆ append()

template<typename T >
template<typename U >
template FMT_API void detail::buffer::append ( const U *  begin,
const U *  end 
)

Appends data to the end of the buffer.

Here is the caller graph for this function:

◆ begin() [1/2]

template<typename T >
auto fmt::v8::detail::buffer< T >::begin ( ) -> T*
throw (
)
inline
Here is the caller graph for this function:

◆ begin() [2/2]

template<typename T >
auto fmt::v8::detail::buffer< T >::begin ( ) const -> const T*
throw (
)
inline

◆ capacity()

template<typename T >
constexpr auto fmt::v8::detail::buffer< T >::capacity ( ) const -> size_t
throw (
)
inlineconstexpr

Returns the capacity of this buffer.

Here is the caller graph for this function:

◆ clear()

template<typename T >
void fmt::v8::detail::buffer< T >::clear ( )
inline

Clears this buffer.

Here is the caller graph for this function:

◆ data() [1/2]

template<typename T >
auto fmt::v8::detail::buffer< T >::data ( ) -> T*
throw (
)
inline

Returns a pointer to the buffer data.

Here is the caller graph for this function:

◆ data() [2/2]

template<typename T >
auto fmt::v8::detail::buffer< T >::data ( ) const -> const T*
throw (
)
inline

Returns a pointer to the buffer data.

◆ end() [1/2]

template<typename T >
auto fmt::v8::detail::buffer< T >::end ( ) -> T*
throw (
)
inline
Here is the caller graph for this function:

◆ end() [2/2]

template<typename T >
auto fmt::v8::detail::buffer< T >::end ( ) const -> const T*
throw (
)
inline

◆ grow()

◆ operator=()

template<typename T >
void fmt::v8::detail::buffer< T >::operator= ( const buffer< T > &  )
delete

◆ operator[]() [1/2]

template<typename T >
template<typename I >
auto fmt::v8::detail::buffer< T >::operator[] ( index) -> T&
inline

◆ operator[]() [2/2]

template<typename T >
template<typename I >
auto fmt::v8::detail::buffer< T >::operator[] ( index) const -> const T&
inline

◆ push_back()

template<typename T >
void fmt::v8::detail::buffer< T >::push_back ( const T value)
inline
Here is the caller graph for this function:

◆ set()

template<typename T >
void fmt::v8::detail::buffer< T >::set ( T buf_data,
size_t  buf_capacity 
)
throw (
)
inlineprotected

Sets the buffer data and capacity.

Here is the caller graph for this function:

◆ size()

template<typename T >
constexpr auto fmt::v8::detail::buffer< T >::size ( ) const -> size_t
throw (
)
inlineconstexpr

Returns the size of this buffer.

Here is the caller graph for this function:

◆ try_reserve()

template<typename T >
void fmt::v8::detail::buffer< T >::try_reserve ( size_t  new_capacity)
inline
Here is the caller graph for this function:

◆ try_resize()

template<typename T >
void fmt::v8::detail::buffer< T >::try_resize ( size_t  count)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ capacity_

template<typename T >
size_t fmt::v8::detail::buffer< T >::capacity_
private

◆ ptr_

template<typename T >
T* fmt::v8::detail::buffer< T >::ptr_
private

◆ size_

template<typename T >
size_t fmt::v8::detail::buffer< T >::size_
private

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