Data Structures in C++
|
Abstract queue interface. More...
#include <Queue.hpp>
Public Member Functions | |
std::string | getName () |
Provides the name of the data structure as a string representation. More... | |
virtual void | enqueue (T val)=0 |
Add an element to the end of the queue. More... | |
virtual T | dequeue ()=0 |
Remove an element from the queue. More... | |
virtual T | peek ()=0 |
See the first value from the queue, without removing it. More... | |
![]() | |
virtual int | getSize ()=0 |
Outputs the number of elements stored in the structure. More... | |
virtual bool | isEmpty ()=0 |
Check whether the structure is empty. More... | |
virtual bool | isFull ()=0 |
Check whether the structure is full. More... | |
Abstract queue interface.
T | The type of object the data structure will contain |
|
pure virtual |
Remove an element from the queue.
Implemented in StaticQueue< T >, and DynamicQueue< T >.
|
pure virtual |
Add an element to the end of the queue.
val | the value to be added to the queue |
Implemented in StaticQueue< T >, and DynamicQueue< T >.
|
inlinevirtual |
Provides the name of the data structure as a string representation.
Implements DataStructure.
Reimplemented in DynamicQueue< T >.
|
pure virtual |
See the first value from the queue, without removing it.
Implemented in StaticQueue< T >, and DynamicQueue< T >.