AARE
Data analysis library for PSI hybrid detectors
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
aare::CircularFifo< ItemType > Class Template Reference

#include <CircularFifo.hpp>

Public Types

using value_type = ItemType
 

Public Member Functions

 CircularFifo ()
 
 CircularFifo (uint32_t size)
 
bool next ()
 
 ~CircularFifo ()
 
auto numFilledSlots () const noexcept
 
auto numFreeSlots () const noexcept
 
auto isFull () const noexcept
 
ItemType pop_free ()
 
bool try_pop_free (ItemType &v)
 
ItemType pop_value (std::chrono::nanoseconds wait, std::atomic< bool > &stopped)
 
ItemType pop_value ()
 
ItemType * frontPtr ()
 
template<class... Args>
void push_value (Args &&...recordArgs)
 
template<class... Args>
bool try_push_value (Args &&...recordArgs)
 
template<class... Args>
void push_free (Args &&...recordArgs)
 
template<class... Args>
bool try_push_free (Args &&...recordArgs)
 

Private Attributes

uint32_t fifo_size
 
folly::ProducerConsumerQueue< ItemType > free_slots
 
folly::ProducerConsumerQueue< ItemType > filled_slots
 

Member Typedef Documentation

◆ value_type

template<class ItemType >
using aare::CircularFifo< ItemType >::value_type = ItemType

Constructor & Destructor Documentation

◆ CircularFifo() [1/2]

template<class ItemType >
aare::CircularFifo< ItemType >::CircularFifo ( )
inline

◆ CircularFifo() [2/2]

template<class ItemType >
aare::CircularFifo< ItemType >::CircularFifo ( uint32_t  size)
inline

◆ ~CircularFifo()

template<class ItemType >
aare::CircularFifo< ItemType >::~CircularFifo ( )
inline

Member Function Documentation

◆ frontPtr()

template<class ItemType >
ItemType * aare::CircularFifo< ItemType >::frontPtr ( )
inline

◆ isFull()

template<class ItemType >
auto aare::CircularFifo< ItemType >::isFull ( ) const
inlinenoexcept

◆ next()

template<class ItemType >
bool aare::CircularFifo< ItemType >::next ( )
inline

◆ numFilledSlots()

template<class ItemType >
auto aare::CircularFifo< ItemType >::numFilledSlots ( ) const
inlinenoexcept

◆ numFreeSlots()

template<class ItemType >
auto aare::CircularFifo< ItemType >::numFreeSlots ( ) const
inlinenoexcept

◆ pop_free()

template<class ItemType >
ItemType aare::CircularFifo< ItemType >::pop_free ( )
inline

◆ pop_value() [1/2]

template<class ItemType >
ItemType aare::CircularFifo< ItemType >::pop_value ( )
inline

◆ pop_value() [2/2]

template<class ItemType >
ItemType aare::CircularFifo< ItemType >::pop_value ( std::chrono::nanoseconds  wait,
std::atomic< bool > &  stopped 
)
inline

◆ push_free()

template<class ItemType >
template<class... Args>
void aare::CircularFifo< ItemType >::push_free ( Args &&...  recordArgs)
inline

◆ push_value()

template<class ItemType >
template<class... Args>
void aare::CircularFifo< ItemType >::push_value ( Args &&...  recordArgs)
inline

◆ try_pop_free()

template<class ItemType >
bool aare::CircularFifo< ItemType >::try_pop_free ( ItemType &  v)
inline

◆ try_push_free()

template<class ItemType >
template<class... Args>
bool aare::CircularFifo< ItemType >::try_push_free ( Args &&...  recordArgs)
inline

◆ try_push_value()

template<class ItemType >
template<class... Args>
bool aare::CircularFifo< ItemType >::try_push_value ( Args &&...  recordArgs)
inline

Field Documentation

◆ fifo_size

template<class ItemType >
uint32_t aare::CircularFifo< ItemType >::fifo_size
private

◆ filled_slots

template<class ItemType >
folly::ProducerConsumerQueue<ItemType> aare::CircularFifo< ItemType >::filled_slots
private

◆ free_slots

template<class ItemType >
folly::ProducerConsumerQueue<ItemType> aare::CircularFifo< ItemType >::free_slots
private

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