CWaitList Class Reference#include <WaitList.h>
Collaboration diagram for CWaitList:
![]()
Detailed DescriptionDefinition at line 50 of file WaitList.h. Constructor & Destructor Documentation
Member Function Documentation
Definition at line 105 of file WaitList.cpp. 00107 { 00108 if (m_ulWaitCount==MAXIMUM_WAIT_OBJECTS) 00109 return; 00110 00111 //And put the object 00112 m_aHandles[m_ulWaitCount]=pObject->GetHandle(); 00113 m_aObjects[m_ulWaitCount]=pObject; 00114 m_bRelease[m_ulWaitCount]=!bNoRelease; 00115 00116 //Increase the count 00117 ++m_ulWaitCount; 00118 }
Definition at line 120 of file WaitList.cpp. 00121 { 00122 //Add the data 00123 AddObject(pObject); 00124 00125 //Done 00126 return *this; 00127 }
Definition at line 179 of file WaitList.cpp. 00180 { 00181 if (m_ppRelease) 00182 { 00183 //Iterate it 00184 CWaitableObjectAutoRelease** ppBackup; 00185 ppBackup=m_ppRelease; 00186 00187 while (*ppBackup) 00188 { 00189 //Delete the data 00190 delete *ppBackup; 00191 00192 //Increase our position 00193 ++ppBackup; 00194 } 00195 00196 //Delete it all 00197 delete [] m_ppRelease; 00198 m_ppRelease=NULL; 00199 } 00200 }
Definition at line 62 of file WaitList.cpp. 00065 { 00066 //Put invalid value in the signaled object 00067 dwSignaledObject=MAXIMUM_WAIT_OBJECTS; 00068 00069 //Check we have objects 00070 if (!m_ulWaitCount) 00071 return FALSE; 00072 00073 //And wait 00074 DWORD dwResult; 00075 dwResult=WaitForMultipleObjects(m_ulWaitCount, 00076 m_aHandles, 00077 bWaitAll, 00078 ulTimeout); 00079 00080 //check why we exited 00081 if (dwResult==WAIT_TIMEOUT) 00082 return TRUE; 00083 00084 //Check which object 00085 if (dwResult<=WAIT_OBJECT_0+m_ulWaitCount-1) 00086 { 00087 //Set the signaled object 00088 dwSignaledObject=dwResult-WAIT_OBJECT_0; 00089 00090 //Do we need to build a list ? 00091 if (m_bAutoRelease) 00092 if (bWaitAll) 00093 BuildAutoRelease(0); 00094 else 00095 BuildAutoRelease(dwSignaledObject+1); 00096 00097 //Exit 00098 return FALSE; 00099 } 00100 00101 //Abandon stuff, don't need it 00102 return FALSE; 00103 }
The documentation for this class was generated from the following files: |