mbo::CEventImpl Class Reference

Event implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CEventImpl:

Inheritance graph
{mbo::IEvent\n||+ ~IEvent()\l+ Set()\l+ Reset()\l+ Pulse()\l+ Wait()\l}
[legend]
Collaboration diagram for mbo::CEventImpl:

Collaboration graph
{mbo::IEvent\n||+ ~IEvent()\l+ Set()\l+ Reset()\l+ Pulse()\l+ Wait()\l}
[legend]

List of all members.

Public Member Functions

 CEventImpl (const bool bManualReset=true, const bool bInitialState=false)
virtual void Set ()
virtual void Reset ()
virtual void Pulse ()
virtual bool Wait (size_t nTime=INFINITE) const


Detailed Description

Event implementation.

Note:
This class is distributed under the following license GNU Lesser General Public License, version 2.1.

Definition at line 773 of file MboSynch.h.


Constructor & Destructor Documentation

mbo::CEventImpl::CEventImpl ( const bool  bManualReset = true,
const bool  bInitialState = false 
) [explicit]

Default constructor.

When bManualReset is set true the state of the object is left signaled once it gets signaled until Reset() method is called. With automatical reset the event automatically switches from signaled to not signaled if a thread passes the event with Wait().

Parameters:
bManualReset  mode of the signal
bInitialState  state after create: true => go, false => stop


Member Function Documentation

virtual void mbo::CEventImpl::Set (  )  [virtual]

Set the signal into the signaled state.

Implements mbo::IEvent.

virtual void mbo::CEventImpl::Reset (  )  [virtual]

Set the signal into the not signaled state.

Implements mbo::IEvent.

virtual void mbo::CEventImpl::Pulse (  )  [virtual]

Switch the signal to signaled and then

Implements mbo::IEvent.

virtual bool mbo::CEventImpl::Wait ( size_t  nTime = INFINITE  )  const [virtual]

Pulse (wait & reset) the event.

If the signal is in signaled state: passes the function will return. If the signal is in not signaled state: wait until time elaspes. In automatic reset mode: set signal to not signaled on leaving the method.

Parameters:
nTime time to wait in milliseconds.
Returns:
The return value is true if Wait() exits because of signaled state reached. When false is returned the time nTime (in ms) has elapsed before the signaled state has been reached.

Implements mbo::IEvent.


The documentation for this class was generated from the following file:
  Hosted on code.google.com  
© Marcus Börger
Generated on Fri Jan 18 21:21:12 2008 for MBO-lib by doxygen 1.5.4