TimeStamper< IntType > Struct Template Reference

#include <TimeStampedEvent.h>

List of all members.

Public Types

typedef IntType DataType
 The type of data holding the timestamp.

Static Public Member Functions

static IntType getTimeStamp ()
static bool leftOlder (IntType left, IntType right)
 Return true only if left is strictly older than right.


Detailed Description

template<typename IntType>
struct TimeStamper< IntType >

Example of time stamper. It requires only one typedef (DataType), and one member function (getTimeStamp). The extra member function, used for ordering two time stamps, is only necessary if your code does a call to the ordering functions of TimeStampedEvent.
Note:
  • The member functions need not be static and/or inline; this is determined by your implementation of time-stamper;
  • The return type and arguments to leftOlder() would be "const DataType&" instead of "DataType", if DataType were a class rather than a fundamental type.

Definition at line 35 of file TimeStampedEvent.h.


Member Typedef Documentation

template<typename IntType>
typedef IntType TimeStamper< IntType >::DataType

The type of data holding the timestamp.

Definition at line 38 of file TimeStampedEvent.h.


Member Function Documentation

template<typename IntType>
IntType TimeStamper< IntType >::getTimeStamp (  )  [inline, static]

Get the time stamp. This is where we define how to implement time stamping. Here, we simply increment a counter.

Definition at line 51 of file TimeStampedEvent.h.

template<typename IntType>
static bool TimeStamper< IntType >::leftOlder ( IntType  left,
IntType  right 
) [inline, static]

Return true only if left is strictly older than right.

Definition at line 41 of file TimeStampedEvent.h.


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

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