iceoryx_doc  1.0.1
Public Member Functions | Static Public Member Functions | List of all members
iox::concurrent::FiFo< ValueType, Capacity > Class Template Reference

single pusher single pop'er thread safe fifo More...

#include <fifo.hpp>

Public Member Functions

bool push (const ValueType &f_value) noexcept
 pushes a value into the fifo More...
 
cxx::optional< ValueType > pop () noexcept
 returns the oldest value from the fifo and removes it More...
 
bool empty () const noexcept
 returns true when the fifo is empty, otherwise false
 
uint64_t size () const noexcept
 returns the size of the fifo
 

Static Public Member Functions

static constexpr uint64_t capacity () noexcept
 returns the capacity of the fifo
 

Detailed Description

template<typename ValueType, uint64_t Capacity>
class iox::concurrent::FiFo< ValueType, Capacity >

single pusher single pop'er thread safe fifo

Member Function Documentation

◆ pop()

template<class ValueType , uint64_t Capacity>
cxx::optional< ValueType > iox::concurrent::FiFo< ValueType, Capacity >::pop
inlinenoexcept

returns the oldest value from the fifo and removes it

Returns
if the fifo was not empty the optional contains the value, otherwise it contains a nullopt

◆ push()

template<class ValueType , uint64_t Capacity>
bool iox::concurrent::FiFo< ValueType, Capacity >::push ( const ValueType &  f_value)
inlinenoexcept

pushes a value into the fifo

Returns
if the values was pushed successfully into the fifo it returns true, otherwise false

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