26#ifndef __TERRALIB_COMMON_INTERNAL_GENERICQUEUE_H
27#define __TERRALIB_COMMON_INTERNAL_GENERICQUEUE_H
145 throw Exception(
"Queue remove error: index out of boundaries.");
159 for(
unsigned int i = 0; i < pos - 1; i++)
195 void insert(
const T& v,
const unsigned int& pos)
198 throw Exception(
"Queue insert error: index out of boundaries.");
219 for(
unsigned int i = 0; i < pos - 1; i++)
243 throw Exception(
"Queue getValue error: index out of boundaries.");
247 for(
unsigned int i = 0; i < pos; i++)
267 unsigned int count = 0;
279 throw Exception(
"Queue does not contains data.");
This class is designed to declare objects to be thrown as exceptions by TerraLib.
This class is designed to declare objects to be thrown as exceptions by TerraLib.
Namespace for the Common module of TerraLib.
Struct that represents a node in the Queue.
NodeT< T > * m_next
Pointer to the next node.
T getValue(const unsigned int &pos) const
Returns the value stored at pos position of the queue.
NodeT< QAction * > * m_last
unsigned int getSize() const
Returns the size of the queue.
void add(const T &v)
Adds an element to the end of the queue.
T remove(const unsigned int &pos)
Removes the element at position pos.
void insert(const T &v, const unsigned int &pos)
Inserts a data at a specific position.
unsigned int position(const T &v) const
Return the position of a value in the queue.
NodeT< QAction * > * m_first