/**
* Add an item to the end of the queue.
*
- * @param T object to add.
+ * @param item object to add.
*/
virtual void push( const T& item ) = 0;
/**
* View the item from the head of the queue.
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T front() = 0;
/**
* Get an item from the head of the queue.
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T pop() = 0;
/**
* Destroy this object.
*/
- ~SGLockedQueue() {}
+ virtual ~SGLockedQueue() {}
/**
* Returns whether this queue is empty (contains no elements).
*
- * @return bool True if queue is empty, otherwisr false.
+ * @return True if queue is empty, otherwise false.
*/
virtual bool empty() {
SGGuard<SGMutex> g(mutex);
/**
* Add an item to the end of the queue.
*
- * @param T object to add.
+ * @param item object to add.
*/
virtual void push( const T& item ) {
SGGuard<SGMutex> g(mutex);
/**
* View the item from the head of the queue.
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T front() {
SGGuard<SGMutex> g(mutex);
/**
* Get an item from the head of the queue.
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T pop() {
SGGuard<SGMutex> g(mutex);
/**
* Query the size of the queue
*
- * @return size_t size of queue.
+ * @return Size of queue.
*/
virtual size_t size() {
SGGuard<SGMutex> g(mutex);
/**
* Destroy this queue.
*/
- ~SGBlockingQueue() {}
+ virtual ~SGBlockingQueue() {}
/**
*
/**
* Add an item to the end of the queue.
*
- * @param T object to add.
+ * @param item The object to add.
*/
virtual void push( const T& item ) {
SGGuard<SGMutex> g(mutex);
* View the item from the head of the queue.
* Calling thread is not suspended
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T front() {
SGGuard<SGMutex> g(mutex);
* Get an item from the head of the queue.
* If no items are available then the calling thread is suspended
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T pop() {
SGGuard<SGMutex> g(mutex);
/**
* Query the size of the queue
*
- * @return size_t size of queue.
+ * @return Size of queue.
*/
virtual size_t size() {
SGGuard<SGMutex> g(mutex);
/**
* Destroy this dequeue.
*/
- ~SGBlockingDeque() {}
+ virtual ~SGBlockingDeque() {}
/**
*
/**
* Add an item to the front of the queue.
*
- * @param T object to add.
+ * @param item The object to add.
*/
virtual void push_front( const T& item ) {
SGGuard<SGMutex> g(mutex);
/**
* Add an item to the back of the queue.
*
- * @param T object to add.
+ * @param item The object to add.
*/
virtual void push_back( const T& item ) {
SGGuard<SGMutex> g(mutex);
* View the item from the head of the queue.
* Calling thread is not suspended
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T front() {
SGGuard<SGMutex> g(mutex);
* Get an item from the head of the queue.
* If no items are available then the calling thread is suspended
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T pop_front() {
SGGuard<SGMutex> g(mutex);
* Get an item from the tail of the queue.
* If no items are available then the calling thread is suspended
*
- * @return T next available object.
+ * @return The next available object.
*/
virtual T pop_back() {
SGGuard<SGMutex> g(mutex);
/**
* Query the size of the queue
*
- * @return size_t size of queue.
+ * @return Size of queue.
*/
virtual size_t size() {
SGGuard<SGMutex> g(mutex);