mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 14:12:16 +03:00
33 lines
759 B
C++
33 lines
759 B
C++
#include "classes/QueueFromStruct.h"
|
||
#ifdef QUEUE_FROM_STR
|
||
QueueFromStruct::QueueFromStruct() {}
|
||
QueueFromStruct::~QueueFromStruct() {}
|
||
|
||
//добавим элемент в конец очереди
|
||
void QueueFromStruct::push(QueueItems word) {
|
||
queue1.push(word);
|
||
}
|
||
|
||
//удалим элемент из начала очереди
|
||
void QueueFromStruct::pop() {
|
||
if (!queue1.empty()) {
|
||
queue1.pop();
|
||
}
|
||
}
|
||
|
||
//вернуть элемент из начала очереди и удалить его
|
||
QueueItems QueueFromStruct::front() {
|
||
if (!queue1.empty()) {
|
||
tmpItem = queue1.front();
|
||
queue1.pop();
|
||
}
|
||
return tmpItem;
|
||
}
|
||
|
||
bool QueueFromStruct::empty() {
|
||
return queue1.empty();
|
||
}
|
||
|
||
QueueFromStruct* filesQueue;
|
||
#endif
|