xoreos  0.0.5
Public Member Functions | Private Attributes | List of all members
Common::Condition Class Reference

A condition. More...

#include <mutex.h>

Inheritance diagram for Common::Condition:
Inheritance graph
[legend]
Collaboration diagram for Common::Condition:
Collaboration graph
[legend]

Public Member Functions

 Condition ()
 
 Condition (Mutex &mutex)
 
 ~Condition ()
 
bool wait (uint32 timeout=0)
 
void signal ()
 

Private Attributes

bool _ownMutex
 
Mutex_mutex
 
SDL_cond * _condition
 

Detailed Description

A condition.

Definition at line 83 of file mutex.h.

Constructor & Destructor Documentation

◆ Condition() [1/2]

Common::Condition::Condition ( )

Definition at line 100 of file mutex.cpp.

References _condition, and _mutex.

◆ Condition() [2/2]

Common::Condition::Condition ( Mutex mutex)

Definition at line 108 of file mutex.cpp.

References _condition.

◆ ~Condition()

Common::Condition::~Condition ( )

Definition at line 114 of file mutex.cpp.

References _condition, _mutex, and _ownMutex.

Member Function Documentation

◆ signal()

void Common::Condition::signal ( )

Definition at line 138 of file mutex.cpp.

References _condition.

Referenced by Events::EventsManager::runMainLoop(), and Sound::SoundManager::triggerUpdate().

Here is the caller graph for this function:

◆ wait()

bool Common::Condition::wait ( uint32  timeout = 0)

Definition at line 121 of file mutex.cpp.

References _condition, Common::Mutex::_mutex, _mutex, _ownMutex, Common::Mutex::lock(), and Common::Mutex::unlock().

Referenced by Events::EventsManager::pushEvent(), and Sound::SoundManager::threadMethod().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _condition

SDL_cond* Common::Condition::_condition
private

Definition at line 96 of file mutex.h.

Referenced by Condition(), signal(), wait(), and ~Condition().

◆ _mutex

Mutex* Common::Condition::_mutex
private

Definition at line 95 of file mutex.h.

Referenced by Condition(), wait(), and ~Condition().

◆ _ownMutex

bool Common::Condition::_ownMutex
private

Definition at line 93 of file mutex.h.

Referenced by wait(), and ~Condition().


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