#include <sbRequestThreadQueue.h>
Public Types | |
typedef RequestItems::const_iterator | const_iterator |
typedef RequestItems::iterator | iterator |
typedef RequestItems::size_type | size_type |
typedef RequestItems::reference | reference |
typedef RequestItems::const_reference | const_reference |
Public Member Functions | |
Batch () | |
~Batch () | |
const_iterator | begin () const |
iterator | begin () |
const_iterator | end () const |
iterator | end () |
size_type | size () |
PRUint32 | CountableItems () const |
PRUint32 | RequestType () const |
void | push_back (sbRequestItem *aItem) |
void | erase (iterator aIter) |
bool | empty () const |
iterator | insert (iterator aIter, sbRequestItem *aRequestItem) |
template<class T > | |
void | sort (T aComparer) |
sbRequestItem * | operator[] (int aIndex) const |
void | clear () |
A batch contains a sequence of requests. The order of the items are the order they were added. A batch may contain only one type of countable request, however it may contain more than one type of non-countable types.
Definition at line 77 of file sbRequestThreadQueue.h.
typedef RequestItems::const_iterator sbRequestThreadQueue::Batch::const_iterator |
Definition at line 82 of file sbRequestThreadQueue.h.
typedef RequestItems::const_reference sbRequestThreadQueue::Batch::const_reference |
Definition at line 86 of file sbRequestThreadQueue.h.
typedef RequestItems::iterator sbRequestThreadQueue::Batch::iterator |
Definition at line 83 of file sbRequestThreadQueue.h.
typedef RequestItems::reference sbRequestThreadQueue::Batch::reference |
Definition at line 85 of file sbRequestThreadQueue.h.
typedef RequestItems::size_type sbRequestThreadQueue::Batch::size_type |
Definition at line 84 of file sbRequestThreadQueue.h.
sbRequestThreadQueue::Batch::Batch | ( | ) |
Definition at line 100 of file sbRequestThreadQueue.cpp.
sbRequestThreadQueue::Batch::~Batch | ( | ) |
|
inline |
Returns the iterator to the first item in the batch
Definition at line 94 of file sbRequestThreadQueue.h.
|
inline |
Returns the iterator to the first item in the batch
Definition at line 102 of file sbRequestThreadQueue.h.
void sbRequestThreadQueue::Batch::clear | ( | ) |
Removes all entries from the batch. This will release all the request items as well.
Definition at line 170 of file sbRequestThreadQueue.cpp.
|
inline |
Returns the countable items contained within the batch
Definition at line 134 of file sbRequestThreadQueue.h.
|
inline |
Returns true if no requests exist in the batch
Definition at line 161 of file sbRequestThreadQueue.h.
|
inline |
Returns the iterator to the end of the batch
Definition at line 110 of file sbRequestThreadQueue.h.
|
inline |
Returns the iterator to the end of the batch
Definition at line 118 of file sbRequestThreadQueue.h.
void sbRequestThreadQueue::Batch::erase | ( | iterator | aIter | ) |
Removes the item pointed by aIter from the batch updating indexes and counts. It will also release the reference to the item being erased.
Definition at line 133 of file sbRequestThreadQueue.cpp.
|
inline |
Insert's a request item at aIter. Needed for the insert iterator for copying.
Definition at line 170 of file sbRequestThreadQueue.h.
|
inline |
Array operator. NOTE: this should be avoided as performance is worse iterating over the batch
Definition at line 191 of file sbRequestThreadQueue.h.
void sbRequestThreadQueue::Batch::push_back | ( | sbRequestItem * | aItem | ) |
Adds an item to the end of the batch. This will add a reference to aItem.
Definition at line 111 of file sbRequestThreadQueue.cpp.
|
inline |
Returns the request type of the countable items.
Definition at line 142 of file sbRequestThreadQueue.h.
|
inline |
Returns the size of the batch. This is the physical size not the number of countable items.
Definition at line 127 of file sbRequestThreadQueue.h.
|
inline |
Sorts the batch using the comparer and recalculates the indexes.
Definition at line 181 of file sbRequestThreadQueue.h.