CResponseWaitQueue Class Reference

#include <ResponseWaitQueue.h>

Inherits CLockMechanism.

Collaboration diagram for CResponseWaitQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CResponseWaitQueue ()
virtual ~CResponseWaitQueue ()
UINT32 getLastError ()
 Returns last error code that occureed.
bool push_back (const WAITFORRESPONSE &obj)
bool remove_elem (UINT16 requestid)
bool find_elem (UINT16 requestid, WAITFORRESPONSE &obj)
bool find_and_remove_elem (UINT16 requestid, WAITFORRESPONSE &obj)
bool push_back (const WAITFORRESPONSE &obj, UINT32 &lasterr)
 Appends a WAITFORRESPONSE struct to the end of the queue.
bool remove_elem (UINT16 requestid, UINT32 &lasterr)
 Removes one element from the queue.
bool find_elem (UINT16 requestid, WAITFORRESPONSE &obj, UINT32 &lasterr)
 Finds an element in the queue.
bool find_and_remove_elem (UINT16 requestid, WAITFORRESPONSE &obj, UINT32 &lasterr)
 Finds an element in the queue and removes it.
UINT32 size ()
 Returns the number of elements that are in the queue.

Private Attributes

INT32 m_iQueueFirstElement
INT32 m_iQueueLastElement
INT32 m_iQueueNumElements
WAITFORRESPONSEINTm_pQueueValue
INT32 * m_iQueueNextElement
INT32 m_iQueueMaxSize
UINT32 m_iLastError


Detailed Description

Definition at line 32 of file ResponseWaitQueue.h.


Constructor & Destructor Documentation

CResponseWaitQueue::CResponseWaitQueue (  ) 

Definition at line 12 of file ResponseWaitQueue.cpp.

CResponseWaitQueue::~CResponseWaitQueue (  )  [virtual]

Definition at line 39 of file ResponseWaitQueue.cpp.


Member Function Documentation

UINT32 CResponseWaitQueue::getLastError (  ) 

Returns last error code that occureed.

for detailed list of possible error codes, see Declarations.h, ERR_RWQ_XXX

Definition at line 416 of file ResponseWaitQueue.cpp.

bool CResponseWaitQueue::push_back ( const WAITFORRESPONSE obj  ) 

Definition at line 49 of file ResponseWaitQueue.cpp.

Referenced by CNetworkQueue::sendRecvMsg().

Here is the caller graph for this function:

bool CResponseWaitQueue::remove_elem ( UINT16  requestid  ) 

Definition at line 56 of file ResponseWaitQueue.cpp.

Referenced by CNetworkQueue::sendRecvMsg().

Here is the caller graph for this function:

bool CResponseWaitQueue::find_elem ( UINT16  requestid,
WAITFORRESPONSE obj 
)

Definition at line 63 of file ResponseWaitQueue.cpp.

bool CResponseWaitQueue::find_and_remove_elem ( UINT16  requestid,
WAITFORRESPONSE obj 
)

Definition at line 70 of file ResponseWaitQueue.cpp.

Referenced by CNetworkQueue::ReceiveProcessTask().

Here is the caller graph for this function:

bool CResponseWaitQueue::push_back ( const WAITFORRESPONSE obj,
UINT32 &  lasterr 
)

Appends a WAITFORRESPONSE struct to the end of the queue.

Parameters:
obj waitforresponse reference to store
lasterr unique error code
Return values:
true successful, element appended
false failure, something happened (see lasterr)
Note:
This function contains assert() which gives more failure reasons during development/debugging.

Definition at line 98 of file ResponseWaitQueue.cpp.

Here is the call graph for this function:

bool CResponseWaitQueue::remove_elem ( UINT16  requestid,
UINT32 &  lasterr 
)

Removes one element from the queue.

This method traverses the queue, looks for a WAITFORRESPONSE element that contains the 'requestid' and removes it.

Parameters:
requestid WAITFORRESPONSE its request id (this WFR struct will be removed from the queue if found)
lasterr unique error code
Return values:
true successful, WFR element was removed
false failure, something happened (see lasterr)
Note:
This function contains assert() which gives more failure reasons during development/debugging.

Definition at line 181 of file ResponseWaitQueue.cpp.

Here is the call graph for this function:

bool CResponseWaitQueue::find_elem ( UINT16  requestid,
WAITFORRESPONSE obj,
UINT32 &  lasterr 
)

Finds an element in the queue.

This method traverses the queue, looks for a WAITFORRESPONSE element that contains the 'requestid' and returns it without removing it.

Parameters:
requestid WAITFORRESPONSE request id (object with this ID will be returned if found)
obj place to store element, if found
lasterr unique error code
Return values:
true successful, element is returned
false failure, something happened, element is NOT returned (see lasterr)

Definition at line 272 of file ResponseWaitQueue.cpp.

Here is the call graph for this function:

bool CResponseWaitQueue::find_and_remove_elem ( UINT16  requestid,
WAITFORRESPONSE obj,
UINT32 &  lasterr 
)

Finds an element in the queue and removes it.

This method traverses the queue, looks for a WAITFORRESPONSE element that contains the 'requestid' and returns it. The object (WFR struct) is removed from the queue.

Parameters:
requestid WFR object's request id (this WFR struct will be returned if found)
obj place to store element, if found
lasterr unique error code
Return values:
true successful, element is returned and removed from queue
false failure, something happened, element is NOT returned (see lasterr)
Note:
This function contains assert() which gives more failure reasons during development/debugging.

Definition at line 327 of file ResponseWaitQueue.cpp.

Here is the call graph for this function:

UINT32 CResponseWaitQueue::size (  ) 

Returns the number of elements that are in the queue.

Definition at line 406 of file ResponseWaitQueue.cpp.


Member Data Documentation

Definition at line 62 of file ResponseWaitQueue.h.

Referenced by CResponseWaitQueue(), and push_back().


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

Generated on Wed Apr 16 18:22:16 2008 for NetworkQueue by  doxygen 1.5.5