#include <ResponseWaitQueue.h>
Inherits CLockMechanism.
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 |
WAITFORRESPONSEINT * | m_pQueueValue |
INT32 * | m_iQueueNextElement |
INT32 | m_iQueueMaxSize |
UINT32 | m_iLastError |
Definition at line 32 of file ResponseWaitQueue.h.
CResponseWaitQueue::CResponseWaitQueue | ( | ) |
Definition at line 12 of file ResponseWaitQueue.cpp.
CResponseWaitQueue::~CResponseWaitQueue | ( | ) | [virtual] |
Definition at line 39 of file ResponseWaitQueue.cpp.
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().
bool CResponseWaitQueue::remove_elem | ( | UINT16 | requestid | ) |
Definition at line 56 of file ResponseWaitQueue.cpp.
Referenced by CNetworkQueue::sendRecvMsg().
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().
bool CResponseWaitQueue::push_back | ( | const WAITFORRESPONSE & | obj, | |
UINT32 & | lasterr | |||
) |
Appends a WAITFORRESPONSE struct to the end of the queue.
obj | waitforresponse reference to store | |
lasterr | unique error code |
true | successful, element appended | |
false | failure, something happened (see lasterr)
|
Definition at line 98 of file ResponseWaitQueue.cpp.
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.
requestid | WAITFORRESPONSE its request id (this WFR struct will be removed from the queue if found) | |
lasterr | unique error code |
true | successful, WFR element was removed | |
false | failure, something happened (see lasterr)
|
Definition at line 181 of file ResponseWaitQueue.cpp.
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.
requestid | WAITFORRESPONSE request id (object with this ID will be returned if found) | |
obj | place to store element, if found | |
lasterr | unique error code |
true | successful, element is returned | |
false | failure, something happened, element is NOT returned (see lasterr)
|
Definition at line 272 of file ResponseWaitQueue.cpp.
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.
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 |
true | successful, element is returned and removed from queue | |
false | failure, something happened, element is NOT returned (see lasterr)
|
Definition at line 327 of file ResponseWaitQueue.cpp.
UINT32 CResponseWaitQueue::size | ( | ) |
Returns the number of elements that are in the queue.
Definition at line 406 of file ResponseWaitQueue.cpp.
INT32 CResponseWaitQueue::m_iQueueFirstElement [private] |
Definition at line 55 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), and remove_elem().
INT32 CResponseWaitQueue::m_iQueueLastElement [private] |
Definition at line 56 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), find_and_remove_elem(), push_back(), and remove_elem().
INT32 CResponseWaitQueue::m_iQueueNumElements [private] |
Definition at line 57 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), remove_elem(), and size().
Definition at line 59 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), remove_elem(), and ~CResponseWaitQueue().
INT32* CResponseWaitQueue::m_iQueueNextElement [private] |
Definition at line 60 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), remove_elem(), and ~CResponseWaitQueue().
INT32 CResponseWaitQueue::m_iQueueMaxSize [private] |
Definition at line 62 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), and push_back().
UINT32 CResponseWaitQueue::m_iLastError [private] |
Definition at line 64 of file ResponseWaitQueue.h.
Referenced by CResponseWaitQueue(), find_and_remove_elem(), find_elem(), getLastError(), push_back(), and remove_elem().