Skip to content

CQueue<T>

CQueue

CQueue is a generic class that implements the ICollection interface.

Description

The CQueue class is a dynamic collection of T type data, which is organized as a queue that operates on the FIFO (first in, first out) principle.

Declaration

template<typename T>
   class CQueue : public ICollection<T>

Header

#include <Generic\Queue.mqh>

Inheritance Hierarchy

ICollection

CQueue

Class Methods

MethodDescription
AddAdds an element to a queue
EnqueueAdds an element to a queue
CountReturns the number of elements in the queue
ContainsDetermines whether the queue contains an element with the specified value
TrimExcessSets the capacity of a queue to the actual number of elements, and thus frees up unused memory
CopyToCopies all elements of a queue to the specified array starting at the specified index
ClearRemoves all elements from a queue
RemoveRemoves the first occurrence of the specified element from the queue
DequeueReturns the starting element and removes it from the queue
PeekReturns the starting element without removing it from the queue
Last updated on