60 inline size_t size()
const {
85 return mSize >= mLimit;
94 for (; mSize > mLimit; --mSize) {
ClearQueue(ClearQueue const &)=delete
Deleted copy constructor to prevent copying.
size_t calcSize() const
Calculate the number of elements in the queue by traversal.
Definition ClearQueue.h:305
void push(const T &value)
Adds an element to the end of the queue.
Definition ClearQueue.h:207
T pop(const T &errorCode)
Safely removes and returns the element at the front of the queue.
Definition ClearQueue.h:240
T hardPop()
Removes and returns the element at the front of the queue.
Definition ClearQueue.h:221
void clean()
Removes all elements from the queue.
Definition ClearQueue.h:314
bool isFull() const
Check if the queue has reached its size limit.
Definition LimitedQueue.h:84
void applyLimit()
Enforce the size limit by removing oldest elements if necessary.
Definition LimitedQueue.h:93
size_t calcSize() const
Recalculate the size by traversing the queue.
Definition LimitedQueue.h:133
T popLimited(const T &errorCode)
Remove and return the oldest element from the queue.
Definition LimitedQueue.h:119
void pushLimited(const T &value)
Add an element to the queue while respecting the size limit.
Definition LimitedQueue.h:106
size_t limit() const
Get the current size limit of the queue.
Definition LimitedQueue.h:51
LimitedQueue()
Construct a new LimitedQueue with default settings.
Definition LimitedQueue.h:43
void clean()
Remove all elements from the queue.
Definition LimitedQueue.h:143
size_t size() const
Get the current number of elements in the queue.
Definition LimitedQueue.h:60
void limit(size_t limit)
Set the maximum size limit for the queue.
Definition LimitedQueue.h:72