CCriticalAutoRelease Class Reference#include <CriticalAutoRelease.h>
Collaboration diagram for CCriticalAutoRelease:
![]()
Detailed DescriptionDefinition at line 50 of file CriticalAutoRelease.h. Constructor & Destructor Documentation
Definition at line 51 of file CriticalAutoRelease.cpp. 00052 : m_pCSection(pCS), 00053 m_ulEntryCount(0) 00054 { 00055 //Do we need to lock ourselves? 00056 if (bLock) 00057 Enter(); 00058 }
Definition at line 60 of file CriticalAutoRelease.cpp. 00061 : m_pCSection(NULL), 00062 m_ulEntryCount(0) 00063 { 00064 //Do we have something to copy? 00065 if (pCS) 00066 m_pCSection=pCS->GetCriticalSection(); 00067 00068 //Continue 00069 if (bLock) 00070 Enter(); 00071 }
Definition at line 73 of file CriticalAutoRelease.cpp. 00074 { 00075 //Check if valid 00076 if (m_pCSection) 00077 //How many entries 00078 for (unsigned long ulCounter=0;ulCounter<m_ulEntryCount;++ulCounter) 00079 m_pCSection->Exit(); 00080 }
Member Function Documentation
Definition at line 82 of file CriticalAutoRelease.cpp. 00083 { 00084 if (m_pCSection) 00085 { 00086 //Lock the CS 00087 m_pCSection->Enter(); 00088 00089 //Increate the count 00090 ++m_ulEntryCount; 00091 } 00092 }
Definition at line 94 of file CriticalAutoRelease.cpp. 00095 { 00096 if (m_pCSection && 00097 m_ulEntryCount) 00098 { 00099 //Decrease the count 00100 --m_ulEntryCount; 00101 00102 //And exit 00103 m_pCSection->Exit(); 00104 } 00105 }
The documentation for this class was generated from the following files: |