Main Page | Class List | File List | Class Members

Rha::UnboundedQueue< T, C > Class Template Reference

Unbounded queue implementation. More...

#include <UnboundedQueue.hpp>

List of all members.

Public Types

typedef UnboundedQueue< T, C > OfType
typedef C Container
typedef T Task

Public Member Functions

 UnboundedQueue ()
 Constructs UnboundedQueue object.

 ~UnboundedQueue ()
 Destructs instance of UnboundedQueue object.

void setUp ()
 Initializes queuing environemnt.

bool empty () const
 Returns true if queue does not have any tasks.

bool full () const
 Always returns false.

void flush ()
 Clears the queue.

Task & front ()
 Returns reference to the front task in the queue which must be non-empty.

const Task & front () const
void push (const Task &val)
 Pushes a task onto the queue for pickup by Executor.

void pop ()
 Removes a front task from the queue.


Detailed Description

template<class T, class C = std::deque<T>>
class Rha::UnboundedQueue< T, C >

Unbounded queue implementation.

Use UnboundedQueue class to create objects that will serve as unbounded task queues. Scheduler uses an instance of a queue object to buffer arriving tasks.


Constructor & Destructor Documentation

template<class T, class C>
Rha::UnboundedQueue< T, C >::~UnboundedQueue  ) 
 

Destructs instance of UnboundedQueue object.

Attention:
Declared as non-virtual.


Member Function Documentation

template<class T, class C>
bool Rha::UnboundedQueue< T, C >::empty  )  const [inline]
 

Returns true if queue does not have any tasks.

Otherwise returns false.

Exceptions:
doesn't throw

template<class T, class C>
void Rha::UnboundedQueue< T, C >::flush  )  [inline]
 

Clears the queue.

Exceptions:
doesn't throw

template<class T, class C>
Rha::UnboundedQueue< T, C >::Task & Rha::UnboundedQueue< T, C >::front  )  [inline]
 

Returns reference to the front task in the queue which must be non-empty.

Exceptions:
doesn't throw

template<class T, class C>
bool Rha::UnboundedQueue< T, C >::full  )  const [inline]
 

Always returns false.

Exceptions:
doesn't throw

template<class T, class C>
void Rha::UnboundedQueue< T, C >::pop  )  [inline]
 

Removes a front task from the queue.

Exceptions:
doesn't throw

template<class T, class C>
void Rha::UnboundedQueue< T, C >::push const Task &  val  )  [inline]
 

Pushes a task onto the queue for pickup by Executor.

Exceptions:
doesn't throw

template<class T, class C>
void Rha::UnboundedQueue< T, C >::setUp  )  [inline]
 

Initializes queuing environemnt.

Called just before Scheduler begins queing tasks.


The documentation for this class was generated from the following file: