-// Wrapper to automatically initialize mutex
+/** Wrapper to automatically initialize mutex. */
class CCriticalSection
{
protected:
bool TryEnter(const char* pszName, const char* pszFile, int nLine);
};
-// Automatically leave critical section when leaving block, needed for exception safety
+/** RAII object that acquires mutex. Needed for exception safety. */
class CCriticalBlock
{
protected:
#define LEAVE_CRITICAL_SECTION(cs) \
(cs).Leave()
+/** RAII object that tries to acquire mutex. Needed for exception safety. */
class CTryCriticalBlock
{
protected:
}
-// Median filter over a stream of values
-// Returns the median of the last N numbers
+/** Median filter over a stream of values.
+ * Returns the median of the last N numbers
+ */
template <typename T> class CMedianFilter
{
private: