R-Type
Public Member Functions | List of all members
ISafeQueue< T > Class Template Referenceabstract

Interface for queue that is thread safe. More...

#include <ISafeQueue.hpp>

Inheritance diagram for ISafeQueue< T >:
SafeQueue< struct RType::Event > SafeQueue< T >

Public Member Functions

virtual ~ISafeQueue ()=default
 Destructor. More...
 
virtual void push (T value)=0
 Push in queue. More...
 
virtual bool tryPop (T &value)=0
 Try to pop a value from the queue. More...
 
virtual T pop ()=0
 Pop a value from the queue. More...
 

Detailed Description

template<typename T>
class ISafeQueue< T >

Interface for queue that is thread safe.

Template Parameters
TThe type contained in the queue

Constructor & Destructor Documentation

◆ ~ISafeQueue()

template<typename T >
virtual ISafeQueue< T >::~ISafeQueue ( )
virtualdefault

Destructor.

Member Function Documentation

◆ pop()

template<typename T >
virtual T ISafeQueue< T >::pop ( )
pure virtual

Pop a value from the queue.

Returns
The popped value

Implemented in SafeQueue< T >, and SafeQueue< struct RType::Event >.

◆ push()

template<typename T >
virtual void ISafeQueue< T >::push ( value)
pure virtual

Push in queue.

Parameters
valueValue to be pushed

Implemented in SafeQueue< T >.

◆ tryPop()

template<typename T >
virtual bool ISafeQueue< T >::tryPop ( T &  value)
pure virtual

Try to pop a value from the queue.

Parameters
valueReference to be filled withthe popped value
Returns
true if the value was successfully popped, false otherwise

Implemented in SafeQueue< T >.


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