Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
ObjectQueue< T, rawSize > Class Template Reference

FIFO for objects. More...

#include <ObjectQueue.h>

Inheritance diagram for ObjectQueue< T, rawSize >:
FIFO< T *, rawSize > Countable< T * >

Public Member Functions

T * peek () const
 
T * dequeue ()
 
bool enqueue (T *element)
 
void flush ()
 
unsigned int count () const override
 
bool full () const
 
const T *& operator[] (unsigned int index) const override
 
T *& operator[] (unsigned int index) override
 
const T *& at (unsigned int i) const
 

Public Attributes

const int size
 

Protected Attributes

volatile int numberOfElements
 
int nextIn
 
int nextOut
 
T * raw [rawSize]
 

Detailed Description

template<typename T, int rawSize>
class ObjectQueue< T, rawSize >

FIFO for objects.

Note
Objects are not owned so construction/destruction must be managed elsewhere