Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

TimeStampedEvent< Stamper > Class Template Reference

#include <TimeStampedEvent.hh>

Inheritance diagram for TimeStampedEvent< Stamper >:

Inheritance graph
[legend]
List of all members.

Public Methods

const Stamper::DataType & getTimeStamp () const
bool isOlderThan (const TimeStampedEvent &tse) const
 Return true only if *this has a time stamp older than that of tse.

bool operator< (const TimeStampedEvent &tse) const
 Return true only if *this has a time stamp older than that of tse.


Protected Methods

 TimeStampedEvent ()
 Create a TimeStampedEvent object.

 ~TimeStampedEvent ()

Detailed Description

template<class Stamper = DefaultTimeStamper>
class TimeStampedEvent< Stamper >

A simple basic event class that provides a time stamp for creation of the event. This class must be subclassed into a specific event (it can only be instantiated via a derived class since the constructor and destructor are protected), where data relevant to the event is stored.

The time stamp is the number of seconds since the first TimeStampedEvent was instantiated. This strategy ensures that the reference is always well defined and independent of compiler etc, is a relatively small number, and can be repeated.

Author:
Oliver Schoenborn
Since:
Sept 2002

Definition at line 120 of file TimeStampedEvent.hh.


Constructor & Destructor Documentation

template<class Stamper = DefaultTimeStamper>
TimeStampedEvent< Stamper >::~TimeStampedEvent   [inline, protected]
 

Protected destructor will prevent user from calling delete on a pointer to a TimeStampedEvent.

Definition at line 144 of file TimeStampedEvent.hh.


Member Function Documentation

template<class Stamper = DefaultTimeStamper>
const Stamper::DataType& TimeStampedEvent< Stamper >::getTimeStamp   const [inline]
 

Get creation time of this event. This is given as the number of seconds (or fraction thereof) since the first instantiation of a TimeStampedEvent object.

Returns:
seconds since first TimeStampedEvent object created

Definition at line 128 of file TimeStampedEvent.hh.

Referenced by TimeStampedEvent<>::operator<().


The documentation for this class was generated from the following file:
Generated on Sun Feb 16 16:56:24 2003 for C++ Event Handling Template Library by doxygen1.2.18