Mountain
1.0.0
Simple C++ 2D Game Framework
|
Thread-Safe Queue. More...
#include <ts_queue.hpp>
Public Member Functions | |
TsQueue ()=default | |
Default constructs a TsQueue. | |
~TsQueue ()=default | |
Default destructs the TsQueue. | |
T & | Front () |
Gets a reference to the front item in the queue. More... | |
const T & | Front () const |
Gets a reference to the front item in the queue. More... | |
T & | Back () |
Gets a reference to the back item in the queue. More... | |
const T & | Back () const |
Gets a reference to the back item in the queue. More... | |
void | Push (const T &item) |
Pushes a new item on the back of the queue by copying it. More... | |
void | Push (T &&item) |
Pushes a new item on the back of the queue by moving it. More... | |
bool | Empty () |
Checks if the queue is empty. More... | |
size_t | Count () |
Get the number of items in the queue. More... | |
T | Pop () |
Pops the item on the front of the queue. More... | |
void | Clear () |
Clears the queue. | |
Thread-Safe Queue.
T | The type of data to store. |
Definition at line 17 of file ts_queue.hpp.
T& Mountain::TsQueue< T >::Back | ( | ) |
Gets a reference to the back item in the queue.
const T& Mountain::TsQueue< T >::Back | ( | ) | const |
Gets a reference to the back item in the queue.
size_t Mountain::TsQueue< T >::Count | ( | ) |
Get the number of items in the queue.
bool Mountain::TsQueue< T >::Empty | ( | ) |
Checks if the queue is empty.
T& Mountain::TsQueue< T >::Front | ( | ) |
Gets a reference to the front item in the queue.
const T& Mountain::TsQueue< T >::Front | ( | ) | const |
Gets a reference to the front item in the queue.
T Mountain::TsQueue< T >::Pop | ( | ) |
Pops the item on the front of the queue.
void Mountain::TsQueue< T >::Push | ( | const T & | item | ) |
Pushes a new item on the back of the queue by copying it.
item | Item |
void Mountain::TsQueue< T >::Push | ( | T && | item | ) |
Pushes a new item on the back of the queue by moving it.
item | Item |