#include <NQResponseWaitQueue.h>
Inherits CNQLockMechanism.
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_WAITFORRESPONSEINT * | m_pQueueValue |
INT32 * | m_iQueueNextElement |
INT32 | m_iQueueMaxSize |
UINT32 | m_iLastError |
Definition at line 32 of file NQResponseWaitQueue.h.
CNQResponseWaitQueue::CNQResponseWaitQueue | ( | ) |
Definition at line 12 of file NQResponseWaitQueue.cpp.
CNQResponseWaitQueue::~CNQResponseWaitQueue | ( | ) | [virtual] |
Definition at line 39 of file NQResponseWaitQueue.cpp.
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().
bool CNQResponseWaitQueue::remove_elem | ( | UINT16 | requestid | ) |
Definition at line 56 of file NQResponseWaitQueue.cpp.
Referenced by CNetworkQueue::sendRecvMsg().
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().
bool CNQResponseWaitQueue::push_back | ( | const NQ_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 NQResponseWaitQueue.cpp.
Removes one element from the queue.
This method traverses the queue, looks for a NQ_WAITFORRESPONSE element that contains the 'requestid' and removes it.
requestid | NQ_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 NQResponseWaitQueue.cpp.
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.
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 NQResponseWaitQueue.cpp.
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.
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 NQResponseWaitQueue.cpp.
UINT32 CNQResponseWaitQueue::size | ( | ) |
Returns the number of elements that are in the queue.
Definition at line 406 of file NQResponseWaitQueue.cpp.
Definition at line 55 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), and remove_elem().
Definition at line 56 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), find_and_remove_elem(), push_back(), and remove_elem().
Definition at line 57 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), remove_elem(), and size().
Definition at line 59 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), remove_elem(), and ~CNQResponseWaitQueue().
INT32* CNQResponseWaitQueue::m_iQueueNextElement [private] |
Definition at line 60 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), find_and_remove_elem(), find_elem(), push_back(), remove_elem(), and ~CNQResponseWaitQueue().
INT32 CNQResponseWaitQueue::m_iQueueMaxSize [private] |
Definition at line 62 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), and push_back().
UINT32 CNQResponseWaitQueue::m_iLastError [private] |
Definition at line 64 of file NQResponseWaitQueue.h.
Referenced by CNQResponseWaitQueue(), find_and_remove_elem(), find_elem(), getLastError(), push_back(), and remove_elem().