Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
Main Page
Related Pages
Modules
Classes
Examples
ObjectQueue.h
1
/****
2
* Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3
* Created 2015 by Skurydin Alexey
4
* http://github.com/SmingHub/Sming
5
* All files of the Sming Core are provided under the LGPL v3 license.
6
*
7
* ObjectQueue.h
8
*
9
* @author Slavey Karadzhov <slaff@attachix.com>
10
*
11
* @author: 12 Aug 2018 - Mikee47 <mike@sillyhouse.net>
12
* This was in 'Structures.h' and called 'SimpleConcurrentQueue'.
13
*
14
****/
15
16
#ifndef _SMING_CORE_DATA_OBJECT_QUEUE_H_
17
#define _SMING_CORE_DATA_OBJECT_QUEUE_H_
18
19
#include "WString.h"
20
#include "WHashMap.h"
21
#include "FIFO.h"
22
26
template
<
typename
T,
int
rawSize>
class
ObjectQueue
:
public
FIFO
<T*, rawSize>
27
{
28
public
:
29
virtual
~
ObjectQueue
()
30
{
31
}
32
33
T* peek()
const
34
{
35
return
FIFO<T*, rawSize>::count
() ?
FIFO<T*, rawSize>::peek
() :
nullptr
;
36
}
37
38
T* dequeue()
39
{
40
return
FIFO<T*, rawSize>::count
() ?
FIFO<T*, rawSize>::dequeue
() :
nullptr
;
41
}
42
};
43
44
#endif
/* _SMING_CORE_DATA_OBJECT_QUEUE_H_ */
FIFO
Definition:
FIFO.h:26
ObjectQueue
FIFO for objects.
Definition:
ObjectQueue.h:26
Sming
SmingCore
Data
ObjectQueue.h
Generated by
1.8.11