logog
logger optimized for games
ScopedLock Class Reference

#include <mutex.hpp>

+ Inheritance diagram for ScopedLock:

Public Member Functions

 ScopedLock (Mutex &mutex)
 
 ~ScopedLock ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
void * operator new (size_t nSize)
 
void * operator new[] (size_t nSize)
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 

Protected Attributes

Mutexm_pMutex
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void * Allocate (size_t nSize)
 
static void Deallocate (void *ptr)
 

Detailed Description

Asserts a lock while this object exists and is in scope. A ScopedLock should be declared in "auto" format, typically on the stack.

Constructor & Destructor Documentation

ScopedLock ( Mutex mutex)

Instances and locks a ScopedLock.

Parameters
mutexThe mutex to attempt to lock. Program execution halts at this point until the lock can be obtained.
~ScopedLock ( )

Member Data Documentation

Mutex* m_pMutex
protected

A pointer to the lockable mutex.


The documentation for this class was generated from the following file: