EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
EEvent Class Reference

An object that can be waited on to be set in another thread. More...

#include <esynch.h>

Public Member Functions

 EEvent (bool state=false)
 Class constructor. More...
 
 ~EEvent ()
 Class destructor. More...
 
Void reset ()
 Resets the event state. More...
 
Void set ()
 Sets the event. More...
 
Bool wait (int ms=-1)
 Waits for the event to be set. More...
 
Bool isSet ()
 Determines if the event has been set. More...
 

Detailed Description

An object that can be waited on to be set in another thread.

Constructor & Destructor Documentation

◆ EEvent()

EEvent::EEvent ( bool  state = false)

Class constructor.

Parameters
statethe initial state of the event.

◆ ~EEvent()

EEvent::~EEvent ( )

Class destructor.

Member Function Documentation

◆ isSet()

Bool EEvent::isSet ( )
inline

Determines if the event has been set.

Returns
True indicates that the event is set, otherwise False.

◆ reset()

void EEvent::reset ( )

Resets the event state.

◆ set()

void EEvent::set ( )

Sets the event.

◆ wait()

bool EEvent::wait ( int  ms = -1)

Waits for the event to be set.

Parameters
msif -1, this function waits indefinitely, otherwise waits the specified number of milli-seonds for the event to be set.
Returns
True if the event has been sent, otherwise False.

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