sbRequestThreadQueue::Batch Class Reference

#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)
 
sbRequestItemoperator[] (int aIndex) const
 
void clear ()
 

Detailed Description

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.

Member Typedef Documentation

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.

Constructor & Destructor Documentation

sbRequestThreadQueue::Batch::Batch ( )

Definition at line 100 of file sbRequestThreadQueue.cpp.

sbRequestThreadQueue::Batch::~Batch ( )

Definition at line 106 of file sbRequestThreadQueue.cpp.

Here is the call graph for this function:

Member Function Documentation

const_iterator sbRequestThreadQueue::Batch::begin ( ) const
inline

Returns the iterator to the first item in the batch

Definition at line 94 of file sbRequestThreadQueue.h.

Here is the caller graph for this function:

iterator sbRequestThreadQueue::Batch::begin ( )
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.

Here is the call graph for this function:

Here is the caller graph for this function:

PRUint32 sbRequestThreadQueue::Batch::CountableItems ( ) const
inline

Returns the countable items contained within the batch

Definition at line 134 of file sbRequestThreadQueue.h.

bool sbRequestThreadQueue::Batch::empty ( ) const
inline

Returns true if no requests exist in the batch

Definition at line 161 of file sbRequestThreadQueue.h.

Here is the caller graph for this function:

const_iterator sbRequestThreadQueue::Batch::end ( ) const
inline

Returns the iterator to the end of the batch

Definition at line 110 of file sbRequestThreadQueue.h.

Here is the caller graph for this function:

iterator sbRequestThreadQueue::Batch::end ( )
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.

iterator sbRequestThreadQueue::Batch::insert ( iterator  aIter,
sbRequestItem aRequestItem 
)
inline

Insert's a request item at aIter. Needed for the insert iterator for copying.

Definition at line 170 of file sbRequestThreadQueue.h.

sbRequestItem* sbRequestThreadQueue::Batch::operator[] ( int  aIndex) const
inline

Array operator. NOTE: this should be avoided as performance is worse iterating over the batch

Definition at line 191 of file sbRequestThreadQueue.h.

Here is the call graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

PRUint32 sbRequestThreadQueue::Batch::RequestType ( ) const
inline

Returns the request type of the countable items.

Definition at line 142 of file sbRequestThreadQueue.h.

size_type sbRequestThreadQueue::Batch::size ( )
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.

template<class T >
void sbRequestThreadQueue::Batch::sort ( aComparer)
inline

Sorts the batch using the comparer and recalculates the indexes.

Definition at line 181 of file sbRequestThreadQueue.h.


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