Files
IoTManager/training/QueueFromStruct.cpp
2022-08-25 17:33:07 +02:00

33 lines
759 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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