Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members  

TimerEvent Class Reference

#include <Timer.h>

List of all members.

Public Methods

 TimerEvent (const TimerEvent &)
 TimerEvent (unsigned long, unsigned long, bool periodic=false)
unsigned long getId () const
unsigned long getExpiration () const
unsigned long getInterval () const
bool isExpired () const
bool isPeriodic () const
TimerEvent & operator= (const TimerEvent &)
bool operator== (const TimerEvent &e) const
bool operator< (const TimerEvent &e) const
bool operator> (const TimerEvent &e) const
 operator unsigned long () const


Detailed Description

Author:
Eric Crahen <crahen@cse.buffalo.edu>
Date:
<2002-05-26T09:19:32-0400>
Version:
2.1.0
This class just encapsulates the timing details for each event and makes them a bit easier to work with.


Constructor & Destructor Documentation

TimerEvent const TimerEvent &   
 

Create a TimerEvent by copying another

Parameters:
const  TimerEvent& - event to copy

TimerEvent unsigned    long,
unsigned    long,
bool    periodic = false
 

Create a new event

Parameters:
unsigned  long - time at which the timer should expire; milliseconds from now
unsigned  long - timer event id
bool  - flag to indicate if this is a repeating/periodic event


Member Function Documentation

unsigned long getExpiration   const
 

Get the time left until this event should occur

Returns:
unsigned long - time till event

unsigned long getId   const [inline]
 

Get the event id

Returns:
unsigned long - event id

unsigned long getInterval   const [inline]
 

Get the interval for the event

Returns:
unsigned long - interval

bool isExpired   const
 

Check if the event has expired

Returns:
bool - event expired if true

bool isPeriodic   const [inline]
 

Check if this is a periodic/repeating event.

Returns:
bool - event is periodic/repeating if true

operator unsigned long   const [inline]
 

Casting operator to that evaluates to the event id

Returns:
unsigned long

bool operator< const TimerEvent &    e const [inline]
 

Compare two TimerEvents, by expirations time and id.

Parameters:
const  TimerEvent& - timer event to compare

TimerEvent& operator= const TimerEvent &   
 

Copy an exisitng TimerEvent

Parameters:
const  TimerEvent& - timer event to copy

bool operator== const TimerEvent &    e const [inline]
 

Compare two TimerEvents for equality, based on expiration time and id.

Parameters:
const  TimerEvent& - timer event to compare

bool operator> const TimerEvent &    e const [inline]
 

Compare two TimerEvents, by expirations time and id.

Parameters:
const  TimerEvent& - timer event to compare


The documentation for this class was generated from the following file:
Generated on Fri May 31 14:08:47 2002 for ZThread by doxygen1.2.15