CNQResponseWaitQueue Class Reference

#include <NQResponseWaitQueue.h>

Inherits CNQLockMechanism.

Collaboration diagram for CNQResponseWaitQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CNQResponseWaitQueue ()
virtual ~CNQResponseWaitQueue ()
UINT32 getLastError ()
 Returns last error code that occureed.
bool push_back (const NQ_WAITFORRESPONSE &obj)
bool remove_elem (UINT16 requestid)
bool find_elem (UINT16 requestid, NQ_WAITFORRESPONSE &obj)
bool find_and_remove_elem (UINT16 requestid, NQ_WAITFORRESPONSE &obj)
bool push_back (const NQ_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, NQ_WAITFORRESPONSE &obj, UINT32 &lasterr)
 Finds an element in the queue.
bool find_and_remove_elem (UINT16 requestid, NQ_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
NQ_WAITFORRESPONSEINTm_pQueueValue
INT32m_iQueueNextElement
INT32 m_iQueueMaxSize
UINT32 m_iLastError


Detailed Description

Definition at line 32 of file NQResponseWaitQueue.h.


Constructor & Destructor Documentation

CNQResponseWaitQueue::CNQResponseWaitQueue (  ) 

Definition at line 12 of file NQResponseWaitQueue.cpp.

CNQResponseWaitQueue::~CNQResponseWaitQueue (  )  [virtual]

Definition at line 39 of file NQResponseWaitQueue.cpp.


Member Function Documentation

UINT32 CNQResponseWaitQueue::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 NQResponseWaitQueue.cpp.

bool CNQResponseWaitQueue::push_back ( const NQ_WAITFORRESPONSE obj  ) 

Definition at line 49 of file NQResponseWaitQueue.cpp.

Referenced by CNetworkQueue::sendRecvMsg().

Here is the caller graph for this function:

bool CNQResponseWaitQueue::remove_elem ( UINT16  requestid  ) 

Definition at line 56 of file NQResponseWaitQueue.cpp.

Referenced by CNetworkQueue::sendRecvMsg().

Here is the caller graph for this function:

bool CNQResponseWaitQueue::find_elem ( UINT16  requestid,
NQ_WAITFORRESPONSE obj 
)

Definition at line 63 of file NQResponseWaitQueue.cpp.

bool CNQResponseWaitQueue::find_and_remove_elem ( UINT16  requestid,
NQ_WAITFORRESPONSE obj 
)

Definition at line 70 of file NQResponseWaitQueue.cpp.

Referenced by CNetworkQueue::ReceiveProcessTask().

Here is the caller graph for this function:

bool CNQResponseWaitQueue::push_back ( const NQ_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 NQResponseWaitQueue.cpp.

Here is the call graph for this function:

bool CNQResponseWaitQueue::remove_elem ( UINT16  requestid,
UINT32 lasterr 
)

Removes one element from the queue.

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

Parameters:
requestid NQ_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 NQResponseWaitQueue.cpp.

Here is the call graph for this function:

bool CNQResponseWaitQueue::find_elem ( UINT16  requestid,
NQ_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 NQResponseWaitQueue.cpp.

Here is the call graph for this function:

bool CNQResponseWaitQueue::find_and_remove_elem ( UINT16  requestid,
NQ_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 NQResponseWaitQueue.cpp.

Here is the call graph for this function:

UINT32 CNQResponseWaitQueue::size (  ) 

Returns the number of elements that are in the queue.

Definition at line 406 of file NQResponseWaitQueue.cpp.


Member Data Documentation

Definition at line 62 of file NQResponseWaitQueue.h.

Referenced by CNQResponseWaitQueue(), and push_back().


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

Generated on Tue Apr 22 18:19:59 2008 for NetworkQueue by  doxygen 1.5.5