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 106 of file WaitList.cpp. 00108 { 00109 if (m_ulWaitCount==MAXIMUM_WAIT_OBJECTS) 00110 return; 00111 00112 //And put the object 00113 m_aHandles[m_ulWaitCount]=pObject->GetHandle(); 00114 m_aObjects[m_ulWaitCount]=pObject; 00115 m_bRelease[m_ulWaitCount]=!bNoRelease; 00116 00117 //Increase the count 00118 ++m_ulWaitCount; 00119 }
Definition at line 171 of file WaitList.cpp. 00172 { 00173 if (m_ppRelease) 00174 { 00175 //Iterate it 00176 CWaitableObjectAutoRelease** ppBackup; 00177 ppBackup=m_ppRelease; 00178 00179 while (*ppBackup) 00180 { 00181 //Delete the data 00182 delete *ppBackup; 00183 00184 //Increase our position 00185 ++ppBackup; 00186 } 00187 00188 //Delete it all 00189 delete [] m_ppRelease; 00190 m_ppRelease=NULL; 00191 } 00192 }
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 && 00086 dwResult<WAIT_OBJECT_0+m_ulWaitCount) 00087 { 00088 //Set the signaled object 00089 dwSignaledObject=dwResult-WAIT_OBJECT_0; 00090 00091 //Do we need to build a list ? 00092 if (m_bAutoRelease) 00093 if (bWaitAll) 00094 BuildAutoRelease(0); 00095 else 00096 BuildAutoRelease(dwSignaledObject+1); 00097 00098 //Exit 00099 return FALSE; 00100 } 00101 00102 //Abandon stuff, don't need it 00103 return FALSE; 00104 }
The documentation for this class was generated from the following files: |