spdlog
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
iterator_buffer< OutputIt, T, Traits > Class Template Referencefinal

Detailed Description

template<typename OutputIt, typename T, typename Traits = buffer_traits>
class iterator_buffer< OutputIt, T, Traits >

Definition at line 857 of file core.h.

#include <core.h>

Inheritance diagram for iterator_buffer< OutputIt, T, Traits >:
[legend]

Public Types

using value_type = T
 
using const_reference = const T &
 

Public Member Functions

 iterator_buffer (OutputIt out, size_t n=buffer_size)
 
 iterator_buffer (iterator_buffer &&other)
 
 ~iterator_buffer ()
 
auto out () -> OutputIt
 
auto count () const -> size_t
 
auto limit (size_t size) -> size_t
 
auto begin () FMT_NOEXCEPT -> T *
 
auto begin () const FMT_NOEXCEPT -> const T *
 
auto end () FMT_NOEXCEPT -> T *
 
auto end () const FMT_NOEXCEPT -> const T *
 
auto size () const FMT_NOEXCEPT -> size_t
 
auto capacity () const FMT_NOEXCEPT -> size_t
 
auto data () FMT_NOEXCEPT -> T *
 
auto data () const FMT_NOEXCEPT -> const T *
 
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 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

void grow (size_t) final FMT_OVERRIDE
 
void flush ()
 
 FMT_MSC_WARNING (suppress :26495) buffer(size_t sz) FMT_NOEXCEPT
 
void set (T *buf_data, size_t buf_capacity) FMT_NOEXCEPT
 

Private Types

enum  { buffer_size = 256 }
 

Private Attributes

OutputIt out_
 
T data_ [buffer_size]
 
Tptr_
 
size_t size_
 
size_t capacity_
 

Member Typedef Documentation

◆ const_reference

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

Definition at line 779 of file core.h.

◆ value_type

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

Definition at line 778 of file core.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename OutputIt , typename T , typename Traits = buffer_traits>
anonymous enum
private
Enumerator
buffer_size 

Definition at line 860 of file core.h.

Constructor & Destructor Documentation

◆ iterator_buffer() [1/2]

template<typename OutputIt , typename T , typename Traits = buffer_traits>
iterator_buffer< OutputIt, T, Traits >::iterator_buffer ( OutputIt  out,
size_t  n = buffer_size 
)
inlineexplicit

Definition at line 875 of file core.h.

◆ iterator_buffer() [2/2]

template<typename OutputIt , typename T , typename Traits = buffer_traits>
iterator_buffer< OutputIt, T, Traits >::iterator_buffer ( iterator_buffer< OutputIt, T, Traits > &&  other)
inline

Definition at line 877 of file core.h.

◆ ~iterator_buffer()

template<typename OutputIt , typename T , typename Traits = buffer_traits>
iterator_buffer< OutputIt, T, Traits >::~iterator_buffer ( )
inline

Definition at line 879 of file core.h.

Member Function Documentation

◆ append() [1/2]

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

Appends data to the end of the buffer.

◆ append() [2/2]

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

Definition at line 577 of file format.h.

◆ begin() [1/2]

template<typename T >
auto buffer< T >::begin ( ) const -> const T*
inlineinherited

Definition at line 787 of file core.h.

◆ begin() [2/2]

template<typename T >
auto buffer< T >::begin ( ) -> T*
inlineinherited

Definition at line 784 of file core.h.

◆ capacity()

template<typename T >
auto buffer< T >::capacity ( ) const -> size_t
inlineinherited

Returns the capacity of this buffer.

Definition at line 794 of file core.h.

◆ clear()

template<typename T >
void buffer< T >::clear ( )
inlineinherited

Clears this buffer.

Definition at line 803 of file core.h.

◆ count()

template<typename OutputIt , typename T , typename Traits = buffer_traits>
auto iterator_buffer< OutputIt, T, Traits >::count ( ) const -> size_t
inline

Definition at line 885 of file core.h.

◆ data() [1/2]

template<typename T >
auto buffer< T >::data ( ) const -> const T*
inlineinherited

Returns a pointer to the buffer data.

Definition at line 800 of file core.h.

◆ data() [2/2]

template<typename T >
auto buffer< T >::data ( ) -> T*
inlineinherited

Returns a pointer to the buffer data.

Definition at line 797 of file core.h.

◆ end() [1/2]

template<typename T >
auto buffer< T >::end ( ) const -> const T*
inlineinherited

Definition at line 788 of file core.h.

◆ end() [2/2]

template<typename T >
auto buffer< T >::end ( ) -> T*
inlineinherited

Definition at line 785 of file core.h.

◆ flush()

template<typename OutputIt , typename T , typename Traits = buffer_traits>
void iterator_buffer< OutputIt, T, Traits >::flush ( )
inlineprotected

Definition at line 868 of file core.h.

◆ FMT_MSC_WARNING()

template<typename T >
buffer< T >::FMT_MSC_WARNING ( suppress :26495  )
inlineprotectedinherited

Definition at line 757 of file core.h.

◆ grow()

template<typename OutputIt , typename T , typename Traits = buffer_traits>
void iterator_buffer< OutputIt, T, Traits >::grow ( size_t  capacity)
inlinefinalprotectedvirtual

Increases the buffer capacity to hold at least capacity elements.

Implements buffer< T >.

Definition at line 864 of file core.h.

◆ limit()

auto buffer_traits::limit ( size_t  size) -> size_t
inlineinherited

Definition at line 837 of file core.h.

◆ operator[]() [1/2]

template<typename T >
template<typename I >
auto buffer< T >::operator[] ( index) -> T&
inlineinherited

Definition at line 828 of file core.h.

◆ operator[]() [2/2]

template<typename T >
template<typename I >
auto buffer< T >::operator[] ( index) const -> const T&
inlineinherited

Definition at line 829 of file core.h.

◆ out()

template<typename OutputIt , typename T , typename Traits = buffer_traits>
auto iterator_buffer< OutputIt, T, Traits >::out ( ) -> OutputIt
inline

Definition at line 881 of file core.h.

◆ push_back()

template<typename T >
void buffer< T >::push_back ( const T value)
inlineinherited

Definition at line 820 of file core.h.

◆ set()

template<typename T >
void buffer< T >::set ( T buf_data,
size_t  buf_capacity 
)
inlineprotectedinherited

Sets the buffer data and capacity.

Definition at line 769 of file core.h.

◆ size()

template<typename T >
auto buffer< T >::size ( ) const -> size_t
inlineinherited

Returns the size of this buffer.

Definition at line 791 of file core.h.

◆ try_reserve()

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

Definition at line 816 of file core.h.

◆ try_resize()

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

Definition at line 807 of file core.h.

Member Data Documentation

◆ capacity_

template<typename T >
size_t buffer< T >::capacity_
privateinherited

Definition at line 753 of file core.h.

◆ data_

template<typename OutputIt , typename T , typename Traits = buffer_traits>
T iterator_buffer< OutputIt, T, Traits >::data_[buffer_size]
private

Definition at line 861 of file core.h.

◆ out_

template<typename OutputIt , typename T , typename Traits = buffer_traits>
OutputIt iterator_buffer< OutputIt, T, Traits >::out_
private

Definition at line 859 of file core.h.

◆ ptr_

template<typename T >
T* buffer< T >::ptr_
privateinherited

Definition at line 751 of file core.h.

◆ size_

template<typename T >
size_t buffer< T >::size_
privateinherited

Definition at line 752 of file core.h.


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