HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
detail::buffer< T > Class Template Referenceabstract

#include <core.h>

+ Inheritance diagram for 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
 
T * begin () FMT_NOEXCEPT
 
T * end () FMT_NOEXCEPT
 
const T * begin () const FMT_NOEXCEPT
 
const T * end () const FMT_NOEXCEPT
 
size_t size () const FMT_NOEXCEPT
 
size_t capacity () const FMT_NOEXCEPT
 
T * data () FMT_NOEXCEPT
 
const T * data () const FMT_NOEXCEPT
 
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 >
T & operator[] (I index)
 
template<typename I >
const T & operator[] (I index) const
 

Protected Member Functions

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

Detailed Description

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

A contiguous memory buffer with an optional growing ability. It is an internal class and shouldn't be used directly, only via ~fmtbasic_memory_buffer.

Definition at line 665 of file core.h.

Member Typedef Documentation

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

Definition at line 694 of file core.h.

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

Definition at line 693 of file core.h.

Constructor & Destructor Documentation

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

Definition at line 674 of file core.h.

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

Definition at line 676 of file core.h.

template<typename T>
detail::buffer< T >::~buffer ( )
protecteddefault
template<typename T>
detail::buffer< T >::buffer ( const buffer< T > &  )
delete

Member Function Documentation

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

Appends data to the end of the buffer.

Definition at line 600 of file format.h.

template<typename T>
T* detail::buffer< T >::begin ( void  )
inline

Definition at line 699 of file core.h.

template<typename T>
const T* detail::buffer< T >::begin ( void  ) const
inline

Definition at line 702 of file core.h.

template<typename T>
size_t detail::buffer< T >::capacity ( ) const
inline

Returns the capacity of this buffer.

Definition at line 709 of file core.h.

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

Clears this buffer.

Definition at line 718 of file core.h.

template<typename T>
T* detail::buffer< T >::data ( )
inline

Returns a pointer to the buffer data.

Definition at line 712 of file core.h.

template<typename T>
const T* detail::buffer< T >::data ( ) const
inline

Returns a pointer to the buffer data.

Definition at line 715 of file core.h.

template<typename T>
T* detail::buffer< T >::end ( void  )
inline

Definition at line 700 of file core.h.

template<typename T>
const T* detail::buffer< T >::end ( void  ) const
inline

Definition at line 703 of file core.h.

template<typename T>
void detail::buffer< T >::operator= ( const buffer< T > &  )
delete
template<typename T>
template<typename I >
T& detail::buffer< T >::operator[] ( index)
inline

Definition at line 743 of file core.h.

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

Definition at line 744 of file core.h.

template<typename T>
void detail::buffer< T >::push_back ( const T &  value)
inline

Definition at line 735 of file core.h.

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

Sets the buffer data and capacity.

Definition at line 684 of file core.h.

template<typename T>
size_t detail::buffer< T >::size ( void  ) const
inline

Returns the size of this buffer.

Definition at line 706 of file core.h.

template<typename T>
void detail::buffer< T >::try_reserve ( size_t  new_capacity)
inline

Definition at line 731 of file core.h.

template<typename T>
void detail::buffer< T >::try_resize ( size_t  count)
inline

Definition at line 722 of file core.h.


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