QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
Loading...
Searching...
No Matches
quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker > Class Template Reference

Very fast threadsafe ring buffer log. More...

#include "ringbuffer_log.hpp"

Classes

class  iterator_
 
struct  unique_id
 Used to tag an index as being an absolute lookup of a unique counter value returned by push_back/emplace_back. More...
 

Public Types

using container_type = typename Policy::container_type
 
using value_type = typename container_type::value_type
 The log record type.
 
using size_type = typename container_type::size_type
 The size type.
 
using difference_type = typename container_type::difference_type
 The difference type.
 
using reference = typename container_type::reference
 The reference type.
 
using const_reference = typename container_type::const_reference
 The const reference type.
 
using pointer = typename container_type::pointer
 The pointer type.
 
using const_pointer = typename container_type::const_pointer
 The const pointer type.
 
using iterator = iterator_< ringbuffer_log, pointer, reference >
 The iterator type.
 
using const_iterator = iterator_< const ringbuffer_log, const_pointer, const_reference >
 The const iterator type.
 
using reverse_iterator = std::reverse_iterator< iterator >
 The reverse iterator type.
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 The const reverse iterator type.
 

Public Member Functions

template<class... Args>
 ringbuffer_log (level starting_level, Args &&... args) noexcept(noexcept(container_type(std::forward< Args >(args)...)))
 Default construction, passes through args to container_type.
 
 ringbuffer_log (const ringbuffer_log &)=delete
 No copying.
 
 ringbuffer_log (ringbuffer_log &&)=delete
 No moving.
 
ringbuffer_logoperator= (const ringbuffer_log &)=delete
 No copying.
 
ringbuffer_logoperator= (ringbuffer_log &&)=delete
 No moving.
 
void swap (ringbuffer_log &o) noexcept
 Swaps with another instance.
 
level log_level () const noexcept
 THREADSAFE Returns the log level from the instance filtered by any LogLevelChecker.
 
level instance_log_level () const noexcept
 THREADSAFE Returns the current per-instance log level.
 
void instance_log_level (level new_level) noexcept
 THREADSAFE Sets the current per-instance log level.
 
bool empty () const noexcept
 Returns true if the log is empty.
 
size_type size () const noexcept
 Returns the number of items in the log.
 
size_type max_size () const noexcept
 Returns the maximum number of items in the log.
 
std::ostream * immediate () const noexcept
 Returns any std::ostream immediately printed to when a new log entry is added.
 
void immediate (std::ostream *s) noexcept
 Set any std::ostream immediately printed to when a new log entry is added.
 
bool valid (unique_id id) const noexcept
 True if a unique id is still valid.
 
reference front () noexcept
 Returns the front of the ringbuffer. Be careful of races with concurrent modifies.
 
const_reference front () const noexcept
 Returns the front of the ringbuffer. Be careful of races with concurrent modifies.
 
reference operator[] (size_type pos) noexcept
 Returns a reference to the specified element. Be careful of races with concurrent modifies.
 
reference operator[] (unique_id id) noexcept
 Returns a reference to the specified element.
 
const_reference operator[] (size_type pos) const noexcept
 Returns a reference to the specified element. Be careful of races with concurrent modifies.
 
const_reference operator[] (unique_id id) const noexcept
 Returns a reference to the specified element.
 
reference back () noexcept
 Returns the back of the ringbuffer. Be careful of races with concurrent modifies.
 
const_reference back () const noexcept
 Returns the back of the ringbuffer. Be careful of races with concurrent modifies.
 
iterator begin () noexcept
 Returns an iterator to the first item in the log. Be careful of races with concurrent modifies.
 
const_iterator begin () const noexcept
 Returns an iterator to the first item in the log. Be careful of races with concurrent modifies.
 
const_iterator cbegin () const noexcept
 Returns an iterator to the first item in the log. Be careful of races with concurrent modifies.
 
iterator end () noexcept
 Returns an iterator to the item after the last in the log. Be careful of races with concurrent modifies.
 
const_iterator end () const noexcept
 Returns an iterator to the item after the last in the log. Be careful of races with concurrent modifies.
 
const_iterator cend () const noexcept
 Returns an iterator to the item after the last in the log. Be careful of races with concurrent modifies.
 
void clear () noexcept
 Clears the log.
 
size_type push_back (value_type &&v) noexcept
 THREADSAFE Logs a new item, returning its unique counter id.
 
template<class... Args>
size_type emplace_back (level __level, Args &&... args) noexcept
 THREADSAFE Logs a new item, returning its unique counter id.
 

Static Public Attributes

static constexpr size_t max_items = Policy::max_items
 The maximum items to store according to Policy::max_items. If zero, use container's size().
 

Protected Member Functions

size_type counter_to_idx (size_type counter) const noexcept
 

Protected Attributes

container_type _store
 
std::atomic< level_instance_level
 
std::atomic< size_type_counter
 
std::ostream * _immediate
 

Friends

template<class Parent , class Pointer , class Reference >
class iterator_
 

Detailed Description

template<class Policy, class LogLevelChecker>
class quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >

Very fast threadsafe ring buffer log.

Works on the basis of an always incrementing atomic<size_t> which writes into the ring buffer at modulus of the ring buffer size. Items stored per log entry are defined by the Policy class' value_type. To log an item, call the QUICKCPPLIB_RINGBUFFERLOG_ITEM_* family of macros.

Be aware iteration, indexing etc. is most recent first, so log[0] is the most recently logged item. Use the reversed iterators if you don't want this.

For simple_ringbuffer_log_policy, typical item logging times are:

  • without backtrace: 1.2 microseconds.
  • with backtrace (windows): up to 33 microseconds.

    Todo:
    Implement STL allocator for a memory mapped file on disc so log survives sudden process exit.

Member Typedef Documentation

◆ container_type

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::container_type = typename Policy::container_type

The container used to store the logged records set by Policy::container_type. Must be a ContiguousContainer.

◆ value_type

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::value_type = typename container_type::value_type

The log record type.

◆ size_type

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::size_type = typename container_type::size_type

The size type.

◆ difference_type

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::difference_type = typename container_type::difference_type

The difference type.

◆ reference

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::reference = typename container_type::reference

The reference type.

◆ const_reference

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::const_reference = typename container_type::const_reference

The const reference type.

◆ pointer

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::pointer = typename container_type::pointer

The pointer type.

◆ const_pointer

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::const_pointer = typename container_type::const_pointer

The const pointer type.

◆ iterator

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::iterator = iterator_<ringbuffer_log, pointer, reference>

The iterator type.

◆ const_iterator

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::const_iterator = iterator_<const ringbuffer_log, const_pointer, const_reference>

The const iterator type.

◆ reverse_iterator

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::reverse_iterator = std::reverse_iterator<iterator>

The reverse iterator type.

◆ const_reverse_iterator

template<class Policy , class LogLevelChecker >
using quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::const_reverse_iterator = std::reverse_iterator<const_iterator>

The const reverse iterator type.

Constructor & Destructor Documentation

◆ ringbuffer_log() [1/3]

template<class Policy , class LogLevelChecker >
template<class... Args>
quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::ringbuffer_log ( level  starting_level,
Args &&...  args 
)
inlineexplicitnoexcept

Default construction, passes through args to container_type.

769 : _store(std::forward<Args>(args)...)
770 , _instance_level(starting_level)
771 , _counter(0)
772 , _immediate(nullptr)
773 {
774 }
container_type _store
Definition ringbuffer_log.hpp:758
std::ostream * _immediate
Definition ringbuffer_log.hpp:761
std::atomic< size_type > _counter
Definition ringbuffer_log.hpp:760
std::atomic< level > _instance_level
Definition ringbuffer_log.hpp:759

◆ ringbuffer_log() [2/3]

template<class Policy , class LogLevelChecker >
quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::ringbuffer_log ( const ringbuffer_log< Policy, LogLevelChecker > &  )
delete

No copying.

◆ ringbuffer_log() [3/3]

template<class Policy , class LogLevelChecker >
quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::ringbuffer_log ( ringbuffer_log< Policy, LogLevelChecker > &&  )
delete

No moving.

Member Function Documentation

◆ counter_to_idx()

template<class Policy , class LogLevelChecker >
size_type quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::counter_to_idx ( size_type  counter) const
inlineprotectednoexcept
763{ return max_items ? (counter % max_items) : (counter % _store.size()); }
size_type size() const noexcept
Returns the number of items in the log.
Definition ringbuffer_log.hpp:804
static constexpr size_t max_items
The maximum items to store according to Policy::max_items. If zero, use container's size().
Definition ringbuffer_log.hpp:560

◆ operator=() [1/2]

template<class Policy , class LogLevelChecker >
ringbuffer_log & quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::operator= ( const ringbuffer_log< Policy, LogLevelChecker > &  )
delete

No copying.

◆ operator=() [2/2]

template<class Policy , class LogLevelChecker >
ringbuffer_log & quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::operator= ( ringbuffer_log< Policy, LogLevelChecker > &&  )
delete

No moving.

◆ swap()

template<class Policy , class LogLevelChecker >
void quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::swap ( ringbuffer_log< Policy, LogLevelChecker > &  o)
inlinenoexcept

Swaps with another instance.

785 {
786 std::swap(_store, o._store);
787 auto t = o._instance_level.load(std::memory_order_relaxed);
788 o._instance_level.store(_instance_level.load(std::memory_order_relaxed), std::memory_order_relaxed);
789 _instance_level.store(t, std::memory_order_relaxed);
790 std::swap(_counter, o._counter);
791 std::swap(_immediate, o._immediate);
792 }

◆ log_level()

template<class Policy , class LogLevelChecker >
level quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::log_level ( ) const
inlinenoexcept

THREADSAFE Returns the log level from the instance filtered by any LogLevelChecker.

795{ return LogLevelChecker()(instance_log_level()); }
level instance_log_level() const noexcept
THREADSAFE Returns the current per-instance log level.
Definition ringbuffer_log.hpp:797

◆ instance_log_level() [1/2]

template<class Policy , class LogLevelChecker >
level quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::instance_log_level ( ) const
inlinenoexcept

THREADSAFE Returns the current per-instance log level.

797{ return _instance_level.load(std::memory_order_relaxed); }

◆ instance_log_level() [2/2]

template<class Policy , class LogLevelChecker >
void quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::instance_log_level ( level  new_level)
inlinenoexcept

THREADSAFE Sets the current per-instance log level.

799{ _instance_level.store(new_level, std::memory_order_relaxed); }

◆ empty()

template<class Policy , class LogLevelChecker >
bool quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::empty ( ) const
inlinenoexcept

Returns true if the log is empty.

802{ return _counter.load(std::memory_order_relaxed) == 0; }

◆ size()

template<class Policy , class LogLevelChecker >
size_type quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::size ( ) const
inlinenoexcept

Returns the number of items in the log.

805 {
806 size_type ret = _counter.load(std::memory_order_relaxed);
807 if(_store.size() < ret)
808 ret = _store.size();
809 return ret;
810 }
typename container_type::size_type size_type
The size type.
Definition ringbuffer_log.hpp:565

◆ max_size()

template<class Policy , class LogLevelChecker >
size_type quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::max_size ( ) const
inlinenoexcept

Returns the maximum number of items in the log.

812{ return max_items ? max_items : _store.size(); }

◆ immediate() [1/2]

template<class Policy , class LogLevelChecker >
std::ostream * quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::immediate ( ) const
inlinenoexcept

Returns any std::ostream immediately printed to when a new log entry is added.

814{ return _immediate; }

◆ immediate() [2/2]

template<class Policy , class LogLevelChecker >
void quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::immediate ( std::ostream *  s)
inlinenoexcept

Set any std::ostream immediately printed to when a new log entry is added.

816{ _immediate = s; }

◆ valid()

template<class Policy , class LogLevelChecker >
bool quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::valid ( unique_id  id) const
inlinenoexcept

True if a unique id is still valid.

829 {
830 size_type counter = _counter.load(std::memory_order_relaxed);
831 size_type size = counter;
832 if(_store.size() < size)
833 size = _store.size();
834 return id.value < counter && id.value >= counter - size;
835 }

◆ front() [1/2]

template<class Policy , class LogLevelChecker >
reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::front ( )
inlinenoexcept

Returns the front of the ringbuffer. Be careful of races with concurrent modifies.

838{ return _store[counter_to_idx(_counter.load(std::memory_order_relaxed) - 1)]; }
size_type counter_to_idx(size_type counter) const noexcept
Definition ringbuffer_log.hpp:763

◆ front() [2/2]

template<class Policy , class LogLevelChecker >
const_reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::front ( ) const
inlinenoexcept

Returns the front of the ringbuffer. Be careful of races with concurrent modifies.

840{ return _store[counter_to_idx(_counter.load(std::memory_order_relaxed) - 1)]; }

◆ operator[]() [1/4]

template<class Policy , class LogLevelChecker >
reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::operator[] ( size_type  pos)
inlinenoexcept

Returns a reference to the specified element. Be careful of races with concurrent modifies.

872{ return _store[counter_to_idx(_counter.load(std::memory_order_relaxed) - 1 - pos)]; }

◆ operator[]() [2/4]

template<class Policy , class LogLevelChecker >
reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::operator[] ( unique_id  id)
inlinenoexcept

Returns a reference to the specified element.

874{ return _store[counter_to_idx(id.value)]; }

◆ operator[]() [3/4]

template<class Policy , class LogLevelChecker >
const_reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::operator[] ( size_type  pos) const
inlinenoexcept

Returns a reference to the specified element. Be careful of races with concurrent modifies.

876{ return _store[counter_to_idx(_counter.load(std::memory_order_relaxed) - 1 - pos)]; }

◆ operator[]() [4/4]

template<class Policy , class LogLevelChecker >
const_reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::operator[] ( unique_id  id) const
inlinenoexcept

Returns a reference to the specified element.

878{ return _store[counter_to_idx(id.value)]; }

◆ back() [1/2]

template<class Policy , class LogLevelChecker >
reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::back ( )
inlinenoexcept

Returns the back of the ringbuffer. Be careful of races with concurrent modifies.

881 {
882 size_type counter = _counter.load(std::memory_order_relaxed);
883 size_type size = counter;
884 if(_store.size() < size)
885 size = _store.size();
886 return _store[counter_to_idx(counter - size)];
887 }

◆ back() [2/2]

template<class Policy , class LogLevelChecker >
const_reference quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::back ( ) const
inlinenoexcept

Returns the back of the ringbuffer. Be careful of races with concurrent modifies.

890 {
891 size_type counter = _counter.load(std::memory_order_relaxed);
892 size_type size = counter;
893 if(_store.size() < size)
894 size = _store.size();
895 return _store[counter_to_idx(counter - size)];
896 }

◆ begin() [1/2]

template<class Policy , class LogLevelChecker >
iterator quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::begin ( )
inlinenoexcept

Returns an iterator to the first item in the log. Be careful of races with concurrent modifies.

900 {
901 size_type counter = _counter.load(std::memory_order_relaxed);
902 size_type size = counter;
903 if(_store.size() < size)
904 size = _store.size();
905 return iterator(this, counter - 1, size);
906 }
iterator_< ringbuffer_log, pointer, reference > iterator
The iterator type.
Definition ringbuffer_log.hpp:749

◆ begin() [2/2]

template<class Policy , class LogLevelChecker >
const_iterator quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::begin ( ) const
inlinenoexcept

Returns an iterator to the first item in the log. Be careful of races with concurrent modifies.

909 {
910 size_type counter = _counter.load(std::memory_order_relaxed);
911 size_type size = counter;
912 if(_store.size() < size)
913 size = _store.size();
914 return const_iterator(this, counter - 1, size);
915 }
iterator_< const ringbuffer_log, const_pointer, const_reference > const_iterator
The const iterator type.
Definition ringbuffer_log.hpp:751

◆ cbegin()

template<class Policy , class LogLevelChecker >
const_iterator quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::cbegin ( ) const
inlinenoexcept

Returns an iterator to the first item in the log. Be careful of races with concurrent modifies.

918 {
919 size_type counter = _counter.load(std::memory_order_relaxed);
920 size_type size = counter;
921 if(_store.size() < size)
922 size = _store.size();
923 return const_iterator(this, counter - 1, size);
924 }

◆ end() [1/2]

template<class Policy , class LogLevelChecker >
iterator quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::end ( )
inlinenoexcept

Returns an iterator to the item after the last in the log. Be careful of races with concurrent modifies.

927 {
928 size_type counter = _counter.load(std::memory_order_relaxed);
929 size_type size = counter;
930 if(_store.size() < size)
931 size = _store.size();
932 return iterator(this, counter - 1 - size, 0);
933 }

◆ end() [2/2]

template<class Policy , class LogLevelChecker >
const_iterator quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::end ( ) const
inlinenoexcept

Returns an iterator to the item after the last in the log. Be careful of races with concurrent modifies.

936 {
937 size_type counter = _counter.load(std::memory_order_relaxed);
938 size_type size = counter;
939 if(_store.size() < size)
940 size = _store.size();
941 return const_iterator(this, counter - 1 - size, 0);
942 }

◆ cend()

template<class Policy , class LogLevelChecker >
const_iterator quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::cend ( ) const
inlinenoexcept

Returns an iterator to the item after the last in the log. Be careful of races with concurrent modifies.

945 {
946 size_type counter = _counter.load(std::memory_order_relaxed);
947 size_type size = counter;
948 if(_store.size() < size)
949 size = _store.size();
950 return const_iterator(this, counter - 1 - size, 0);
951 }

◆ clear()

template<class Policy , class LogLevelChecker >
void quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::clear ( )
inlinenoexcept

Clears the log.

955 {
956 _counter.store(0, std::memory_order_relaxed);
957 std::fill(_store.begin(), _store.end(), value_type());
958 }
typename container_type::value_type value_type
The log record type.
Definition ringbuffer_log.hpp:563

◆ push_back()

template<class Policy , class LogLevelChecker >
size_type quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::push_back ( value_type &&  v)
inlinenoexcept

THREADSAFE Logs a new item, returning its unique counter id.

961 {
962 if(static_cast<level>(v.level) <= log_level())
963 {
964 if(_immediate)
965 *_immediate << v << std::endl;
966 size_type thisitem = _counter++;
967 v.counter = thisitem;
968 _store[counter_to_idx(thisitem)] = std::move(v);
969 return thisitem;
970 }
971 return (size_type) -1;
972 }
level log_level() const noexcept
THREADSAFE Returns the log level from the instance filtered by any LogLevelChecker.
Definition ringbuffer_log.hpp:795
level
Level of logged item.
Definition ringbuffer_log.hpp:87

◆ emplace_back()

template<class Policy , class LogLevelChecker >
template<class... Args>
size_type quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::emplace_back ( level  __level,
Args &&...  args 
)
inlinenoexcept

THREADSAFE Logs a new item, returning its unique counter id.

975 {
976 if(__level <= log_level())
977 {
978 value_type v(__level, std::forward<Args>(args)...);
979 if(_immediate)
980 *_immediate << v << std::endl;
981 size_type thisitem = _counter++;
982 v.counter = thisitem;
983 _store[counter_to_idx(thisitem)] = std::move(v);
984 return thisitem;
985 }
986 return (size_type) -1;
987 }

Friends And Related Symbol Documentation

◆ iterator_

template<class Policy , class LogLevelChecker >
template<class Parent , class Pointer , class Reference >
friend class iterator_
friend

Member Data Documentation

◆ max_items

template<class Policy , class LogLevelChecker >
constexpr size_t quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::max_items = Policy::max_items
staticconstexpr

The maximum items to store according to Policy::max_items. If zero, use container's size().

◆ _store

template<class Policy , class LogLevelChecker >
container_type quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::_store
protected

◆ _instance_level

template<class Policy , class LogLevelChecker >
std::atomic<level> quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::_instance_level
protected

◆ _counter

template<class Policy , class LogLevelChecker >
std::atomic<size_type> quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::_counter
protected

◆ _immediate

template<class Policy , class LogLevelChecker >
std::ostream* quickcpplib::_xxx::ringbuffer_log::ringbuffer_log< Policy, LogLevelChecker >::_immediate
protected

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