Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
manual_reset_event Class Reference

#include <TaskManager.hpp>

Public Member Functions

 manual_reset_event (bool signaled=false)
 
void signal ()
 Sets the event to signaled-mode. More...
 
void reset ()
 Sets the event to unsignaled-mode. More...
 
void wait ()
 Wait (block) until the event is set to signaled-mode. More...
 

Private Attributes

mutex m_mutex
 A mutex used for synchronization. More...
 
condition_variable m_cv
 A condition variable used for synchronization. More...
 
bool m_signaled
 Wheter or not the event is currently signalled. More...
 

Detailed Description

manual_reset_event is a synchronization-structure used for thread-synchronization. Threads can wait for a singal that is given by another thread. After the signal was given the event remains in 'signaled' state until it is resetted.

Definition at line 10 of file TaskManager.hpp.

Constructor & Destructor Documentation

manual_reset_event ( bool  signaled = false)

Constructs a manual_reset_event

Parameters
signaledWheter or not the event is currently signalled

Definition at line 4 of file TaskManager.cpp.

Member Function Documentation

void reset ( )

Sets the event to unsignaled-mode.

Definition at line 18 of file TaskManager.cpp.

void signal ( )

Sets the event to signaled-mode.

Definition at line 8 of file TaskManager.cpp.

void wait ( )

Wait (block) until the event is set to signaled-mode.

Definition at line 25 of file TaskManager.cpp.

Member Data Documentation

condition_variable m_cv
private

A condition variable used for synchronization.

Definition at line 13 of file TaskManager.hpp.

mutex m_mutex
private

A mutex used for synchronization.

Definition at line 12 of file TaskManager.hpp.

bool m_signaled
private

Wheter or not the event is currently signalled.

Definition at line 14 of file TaskManager.hpp.


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