MatLogger2
1.0.0
Library for logging of numeric data to HDF5 MAT-files, which is RT-safe and multithreaded.
|
The spsc_queue class provides a single-writer/single-reader fifo queue, pushing and popping is wait-free. More...
#include <spsc_queue_logger.hpp>
Public Types | |
typedef T | value_type |
typedef implementation_defined::allocator | allocator |
typedef implementation_defined::size_type | size_type |
Public Member Functions | |
bool | push (T const &t) |
Pushes object t to the ringbuffer. More... | |
bool | pop () |
Pops one object from ringbuffer. More... | |
template<typename U > | |
boost::enable_if< typename is_convertible< T, U >::type, bool >::type | pop (U &ret) |
Pops one object from ringbuffer. More... | |
size_type | push (T const *t, size_type size) |
Pushes as many objects from the array t as there is space. More... | |
template<size_type size> | |
size_type | push (T const (&t)[size]) |
Pushes as many objects from the array t as there is space available. More... | |
template<typename ConstIterator > | |
ConstIterator | push (ConstIterator begin, ConstIterator end) |
Pushes as many objects from the range [begin, end) as there is space . More... | |
size_type | pop (T *ret, size_type size) |
Pops a maximum of size objects from ringbuffer. More... | |
template<size_type size> | |
size_type | pop (T(&ret)[size]) |
Pops a maximum of size objects from spsc_queue. More... | |
template<typename OutputIterator > | |
boost::disable_if< typename is_convertible< T, OutputIterator >::type, size_type >::type | pop (OutputIterator it) |
Pops objects to the output iterator it. More... | |
template<typename Functor > | |
bool | consume_one (Functor &f) |
consumes one element via a functor More... | |
template<typename Functor > | |
bool | consume_one (Functor const &f) |
consumes one element via a functor More... | |
template<typename Functor > | |
size_type | consume_all (Functor &f) |
consumes all elements via a functor More... | |
template<typename Functor > | |
size_type | consume_all (Functor const &f) |
consumes all elements via a functor More... | |
size_type | read_available () const |
get number of elements that are available for read More... | |
size_type | write_available () const |
get write space to write elements More... | |
const T & | front () const |
get reference to element in the front of the queue More... | |
T & | front () |
get reference to element in the front of the queue More... | |
void | reset (void) |
reset the ringbuffer More... | |
void | reset (const T &t) |
reset the ringbuffer More... | |
spsc_queue (void) | |
Constructs a spsc_queue. More... | |
spsc_queue (const T &t) | |
Constructs a spsc_queue. More... | |
template<typename U > | |
spsc_queue (typename allocator::template rebind< U >::other const &alloc) | |
spsc_queue (allocator const &alloc) | |
spsc_queue (size_type element_count) | |
Constructs a spsc_queue for element_count elements. More... | |
template<typename U > | |
spsc_queue (size_type element_count, typename allocator::template rebind< U >::other const &alloc) | |
spsc_queue (size_type element_count, allocator_arg const &alloc) | |
The spsc_queue class provides a single-writer/single-reader fifo queue, pushing and popping is wait-free.
Policies:
boost::lockfree::capacity<>
, optional boost::lockfree::allocator<>
, defaults to boost::lockfree::allocator<std::allocator<T>>
Requirements:
Definition at line 707 of file spsc_queue_logger.hpp.
typedef implementation_defined::allocator boost::lockfree::spsc_queue< T, A0, A1 >::allocator |
Definition at line 726 of file spsc_queue_logger.hpp.
typedef implementation_defined::size_type boost::lockfree::spsc_queue< T, A0, A1 >::size_type |
Definition at line 727 of file spsc_queue_logger.hpp.
typedef T boost::lockfree::spsc_queue< T, A0, A1 >::value_type |
Definition at line 725 of file spsc_queue_logger.hpp.
|
inline |
Constructs a spsc_queue.
Definition at line 735 of file spsc_queue_logger.hpp.
|
inlineexplicit |
Constructs a spsc_queue.
Definition at line 744 of file spsc_queue_logger.hpp.
|
inlineexplicit |
Definition at line 753 of file spsc_queue_logger.hpp.
|
inlineexplicit |
Definition at line 759 of file spsc_queue_logger.hpp.
|
inlineexplicit |
Constructs a spsc_queue for element_count elements.
Definition at line 772 of file spsc_queue_logger.hpp.
|
inline |
Definition at line 779 of file spsc_queue_logger.hpp.
|
inline |
Definition at line 785 of file spsc_queue_logger.hpp.
|
inline |
consumes all elements via a functor
sequentially pops all elements from the queue and applies the functor on each object
Definition at line 942 of file spsc_queue_logger.hpp.
|
inline |
consumes all elements via a functor
sequentially pops all elements from the queue and applies the functor on each object
Definition at line 949 of file spsc_queue_logger.hpp.
|
inline |
consumes one element via a functor
pops one element from the queue and applies the functor on this object
Definition at line 921 of file spsc_queue_logger.hpp.
|
inline |
consumes one element via a functor
pops one element from the queue and applies the functor on this object
Definition at line 928 of file spsc_queue_logger.hpp.
|
inline |
get reference to element in the front of the queue
Availability of front element can be checked using read_available().
Definition at line 986 of file spsc_queue_logger.hpp.
|
inline |
get reference to element in the front of the queue
Availability of front element can be checked using read_available().
Definition at line 993 of file spsc_queue_logger.hpp.
|
inline |
Pops one object from ringbuffer.
Definition at line 813 of file spsc_queue_logger.hpp.
|
inline |
Pops one object from ringbuffer.
Definition at line 829 of file spsc_queue_logger.hpp.
|
inline |
Pops a maximum of size objects from ringbuffer.
Definition at line 880 of file spsc_queue_logger.hpp.
|
inline |
Pops a maximum of size objects from spsc_queue.
Definition at line 893 of file spsc_queue_logger.hpp.
|
inline |
Pops objects to the output iterator it.
Definition at line 907 of file spsc_queue_logger.hpp.
|
inline |
Pushes object t to the ringbuffer.
Definition at line 800 of file spsc_queue_logger.hpp.
|
inline |
Pushes as many objects from the array t as there is space.
Definition at line 842 of file spsc_queue_logger.hpp.
|
inline |
Pushes as many objects from the array t as there is space available.
Definition at line 855 of file spsc_queue_logger.hpp.
|
inline |
Pushes as many objects from the range [begin, end) as there is space .
Definition at line 868 of file spsc_queue_logger.hpp.
|
inline |
get number of elements that are available for read
Definition at line 960 of file spsc_queue_logger.hpp.
|
inline |
|
inline |
|
inline |
get write space to write elements
Definition at line 971 of file spsc_queue_logger.hpp.