Eris::Timeout Class Reference

Timeout. More...

#include <Timeout.h>

Inheritance diagram for Eris::Timeout:

Eris::TimedEvent

List of all members.

Public Member Functions

 Timeout (unsigned long milli)
 standard constructor for new timeouts
Timeoutoperator= (const Timeout &t)
 assignment operator
void extend (unsigned long msec)
 Extend the timeout termination by the specified time.
void reset (unsigned long msec)
 reset the timeout to the specified time, and reset the 'expired' flag.
void cancel ()
 cancel the Timeout immediately
bool isExpired () const
 test whether or not the timeout has fired or not
virtual void expired ()
 Implement the expiry behaviour of this object.
virtual const WFMath::TimeStamp & due () const
 The time value when this event is due.

Public Attributes

sigc::signal< void > Expired
 The timeout signal.

Protected Attributes

WFMath::TimeStamp _due
 interval at which the timeout is due
bool _fired
 flag if the timeout has expired


Detailed Description

Timeout.

Constructor & Destructor Documentation

Eris::Timeout::Timeout ( unsigned long  milli  ) 

standard constructor for new timeouts

Parameters:
label The unique timeout identification label
milli The initial timeout value, in milliseconds

References _due.


Member Function Documentation

void Eris::Timeout::extend ( unsigned long  msec  ) 

Extend the timeout termination by the specified time.

This has no effect if the timeout has already fired

Parameters:
msec The interval to extend the timeout by, in milliseconds

References _due.

void Eris::Timeout::reset ( unsigned long  msec  ) 

reset the timeout to the specified time, and reset the 'expired' flag.

This means invoking reset() is equivalent to destroying the Timeout object and creating a new one with the same name.

References _due, and _fired.

void Eris::Timeout::expired (  )  [virtual]

Implement the expiry behaviour of this object.

The TimedEvent is automatically removed from the service before this method is called, so deleting the object, or re-registering it are permitted.

Implements Eris::TimedEvent.

References _fired, and Expired.


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

Generated for Eris by  doxygen 1.5.6