Loading...
Searching...
No Matches
BALL::TimeStamp Class Reference

`#include <BALL/CONCEPT/timeStamp.h>`

## Public Member Functions

Constructors and Destructors
| TimeStamp ()
virtual | ~TimeStamp ()
Predicates
bool | isNewerThan (const PreciseTime &time) const
bool | isOlderThan (const PreciseTime &time) const
bool | isNewerThan (const TimeStamp &stamp) const
bool | isOlderThan (const TimeStamp &stamp) const
bool | operator== (const TimeStamp &stamp) const
Accessors
virtual void | stamp (const PreciseTime &time=PreciseTime::ZERO)
const PreciseTime & | getTime () const
Assignment
const PreciseTime & | operator= (const PreciseTime &time)
virtual void | clear ()

## Storable interface.

PreciseTime | time_
void | write (PersistenceManager &pm) const
bool | read (PersistenceManager &pm)

## Detailed Description

Time stamp concept. This class implements a so-called time stamp. It is used to store modification or creation times of objects. Interface: Storable

Definition at line 171 of file timeStamp.h.

## Constructor & Destructor Documentation

## TimeStamp()

BALL::TimeStamp::TimeStamp | ( |  | ) |

Default constructor

## ~TimeStamp()

virtual BALL::TimeStamp::~TimeStamp | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## clear()

virtual void BALL::TimeStamp::clear | ( |  | ) |

virtual

Clear method

## getTime()

const PreciseTime & BALL::TimeStamp::getTime | ( |  | ) | const

Return the time of last modification

Returns
  the time stamp

## isNewerThan() [1/2]

bool BALL::TimeStamp::isNewerThan | ( | const PreciseTime & | time | ) | const

Check the time stamp.

## isNewerThan() [2/2]

bool BALL::TimeStamp::isNewerThan | ( | const TimeStamp & | stamp | ) | const

Check the time stamp.

## isOlderThan() [1/2]

bool BALL::TimeStamp::isOlderThan | ( | const PreciseTime & | time | ) | const

Check the time stamp.

## isOlderThan() [2/2]

bool BALL::TimeStamp::isOlderThan | ( | const TimeStamp & | stamp | ) | const

Check the time stamp.

## operator=()

const PreciseTime & BALL::TimeStamp::operator= | ( | const PreciseTime & | time | ) |

Assignment operator

## operator==()

bool BALL::TimeStamp::operator== | ( | const TimeStamp & | stamp | ) | const

Equality operator

## read()

bool BALL::TimeStamp::read | ( | PersistenceManager & | pm | ) |

Persistent stream reading. This method reads the contents of a TimeStamp object from the persistent stream using the readPrimitive method of the PersistenceManager.

Parameters

  pm | the persistence manager

## stamp()

virtual void BALL::TimeStamp::stamp | ( | const PreciseTime & | time = PreciseTime::ZERO | ) |

virtual

Update the time stamp. Store the value of time in the internal time stamp. If time is 0, use the current time (as given by PreciseTime::now ).

Parameters

  time | the new time stamp (default = PreciseTime::now )

## write()

void BALL::TimeStamp::write | ( | PersistenceManager & | pm | ) | const

Persistent stream writing. This method writes the contents of the TimeStamp objects to the persistent stream using the writePrimitive method of the PersistenceManager.

Parameters

  pm | the persistence manager

## Member Data Documentation

## time_

PreciseTime BALL::TimeStamp::time_

protected

The time stamp.

Definition at line 272 of file timeStamp.h.