class::var::Queue

class var::Queue
  : public api::WorkObject

The Queue class is a FIFO data structure that allows data to be pushed on the back and popped from the front. It is similar to the std::queue container class.

Summary

[Queue](#classvar_1_1_queue_1abc94c250fed68b037462ab44d671b8b9)()

[Queue](#classvar_1_1_queue_1a51d46e50337ac5c66d44896c02886da7)(  

const Queue & a
)

[Queue](#classvar_1_1_queue_1a77c015977b4a07cb0fa3bf3fbbb89ad7)(  

Queue && a
)

[~Queue](#classvar_1_1_queue_1aca1815a0154ea691ead9dd7d6204d674)()

T & back()

const T & back() const

void clear()

u32 count() const

const T & front() const

T & front()

bool is_empty() const

Queue & operator=(

const Queue & a
)

Queue & operator=(

Queue && a
)

void pop()

int push(

const T & value
)

Members

Queue()

Constructs a new Queue.


Queue(

const Queue & a
)


Queue(

Queue && a
)


~Queue()

T & back()

Returns a reference to the back item.

The back item is the one that has most recently been pushed using push().


const T & back() const

Returns a read-only reference to the back item.

The back item is the one that has most recently been pushed using push().


void clear()

Clears the contents of the queue.

This will empty the queue and free all the resources associated with it.


u32 count() const

Returns the number of items in the queue.


const T & front() const

Returns a read-only reference to the front item.

The front item is the one that has been in the queue the longest. It will be popped on the next call to pop().


T & front()

Returns a reference to the front item.

The front item is the one that has been in the queue the longest. It will be popped on the next call to pop().


bool is_empty() const

Returns true if the queue is empty.


Queue & operator=(

const Queue & a
)


Queue & operator=(

Queue && a
)


void pop()

Pops an item from the front of the queue.


int push(

const T & value
)

Pushes an item on the back of the queue.

Parameters

  • value The item to push

X

Thanks for Coming!

Subscribe to news and updates