Public Member Functions | Static Public Attributes

a5::Mutex Class Reference

Object representing a mutex. More...

#include <Thread.hpp>

List of all members.

Public Member Functions

 Mutex (int flags=0)
 Creates a mutex with the specified flags.
void Lock ()
 Locks the mutex.
void Unlock ()
 Unlocks the mutex.
 ~Mutex ()
 Destroys the mutex.
ALLEGRO_MUTEX * Release ()
 Releases the held C structure so it is no longer automatically freed.
 operator ALLEGRO_MUTEX * () const
 Returns a pointer to the Allegro mutex structure.

Static Public Attributes

static const int Recursive = 0x80000000
 Allows recursive locks.

Detailed Description

Object representing a mutex.


Constructor & Destructor Documentation

a5::Mutex::Mutex ( int  flags = 0  ) 

Creates a mutex with the specified flags.

a5::Mutex::~Mutex (  ) 

Destroys the mutex.


Member Function Documentation

void a5::Mutex::Lock (  ) 

Locks the mutex.

void a5::Mutex::Unlock (  ) 

Unlocks the mutex.

ALLEGRO_MUTEX* a5::Mutex::Release (  ) 

Releases the held C structure so it is no longer automatically freed.

a5::Mutex::operator ALLEGRO_MUTEX * (  )  const

Returns a pointer to the Allegro mutex structure.


Member Data Documentation

const int a5::Mutex::Recursive = 0x80000000 [static]

Allows recursive locks.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines