TimeStampedEvent< Stamper > Class Template Reference

#include <TimeStampedEvent.h>

Inheritance diagram for TimeStampedEvent< Stamper >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

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 Member Functions

 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 119 of file TimeStampedEvent.h.


Constructor & Destructor Documentation

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

Create a TimeStampedEvent object.

Definition at line 140 of file TimeStampedEvent.h.

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 143 of file TimeStampedEvent.h.


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 127 of file TimeStampedEvent.h.

template<class Stamper = DefaultTimeStamper>
bool TimeStampedEvent< Stamper >::isOlderThan ( const TimeStampedEvent< Stamper > &  tse  )  const [inline]

Return true only if *this has a time stamp older than that of tse.

Definition at line 130 of file TimeStampedEvent.h.

template<class Stamper = DefaultTimeStamper>
bool TimeStampedEvent< Stamper >::operator< ( const TimeStampedEvent< Stamper > &  tse  )  const [inline]

Return true only if *this has a time stamp older than that of tse.

Definition at line 136 of file TimeStampedEvent.h.


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

Generated on Mon Jan 10 22:33:44 2011 by  doxygen 1.5.6