Files
IoTManager/training/QueueFromInstance.cpp
Dmitry Borisenko f893a3623d проверка
2022-01-20 13:36:00 +01:00

31 lines
765 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.
#ifdef QUEUE_FROM_INST
#include "classes/QueueFromInstance.h"
QueueFromInstance::QueueFromInstance() {}
QueueFromInstance::~QueueFromInstance() {}
//добавим элемент в конец очереди
void QueueFromInstance::push(QueueInstance instance) {
queue1.push(instance);
}
//удалим элемент из начала очереди
void QueueFromInstance::pop() {
if (!queue1.empty()) {
queue1.pop();
}
}
//вернуть элемент из начала очереди и удалить его
QueueInstance QueueFromInstance::front() {
QueueInstance instance("");
if (!queue1.empty()) {
instance = queue1.front();
queue1.pop();
}
return instance;
}
// QueueFromInstance* myQueue;
#endif