Class:nsTDeque
Jump to navigation
Jump to search
template <class T> class nsTDeque { public: /** * @constructor * @param objectsPerPage * Optional parameter that specifies the number of objects per page * in the deque. */ explicit nsTDeque(PRUint32 objectsPerPage = 32); /** * @destructor */ ~nsTDeque(); /** * Clear all elements from the deque. */ void Clear(); /** * Returns the number of elements in the deque. */ PRUint32 Length(); // or Count() ? /** * Adds a new element to the front of the deque. * @param obj * The object to be added. */ void PushFront(const T& obj); /** * Adds a new element to the front of the deque. * @returns the address of the newly added element. */ T* PushFront(); void PushBack(const T& obj); T* PushBack(); const T& Front() const; T& Front(); const T& Back() const; T& Back(); void PopFront(); void PopBack(); };