Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

TimeStamp Class Reference

Time stamp concept. More...

#include <timeStamp.h>

List of all members.

Public Member Functions

Constructors and Destructors
 TimeStamp () throw ()
 Default constructor.
virtual ~TimeStamp () throw ()
 Destructor.
Predicates
bool isNewerThan (const PreciseTime &time) const throw ()
 Check the time stamp.
bool isOlderThan (const PreciseTime &time) const throw ()
 Check the time stamp.
bool isNewerThan (const TimeStamp &stamp) const throw ()
 Check the time stamp.
bool isOlderThan (const TimeStamp &stamp) const throw ()
 Check the time stamp.
bool operator== (const TimeStamp &stamp) const throw ()
 Equality operator.
Accessors
virtual void stamp (const PreciseTime &time=PreciseTime::ZERO) throw ()
 Update the time stamp.
const PreciseTimegetTime () const throw ()
 Return the time of last modification.
Assignment
const PreciseTimeoperator= (const PreciseTime &time) throw ()
 Assignment operator.
virtual void clear () throw ()
 Clear method.
Storable interface.
void write (PersistenceManager &pm) const throw ()
 Persistent stream writing.
bool read (PersistenceManager &pm) throw ()
 Persistent stream reading.

Protected Attributes

PreciseTime time_
 The time stamp.


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


Member Function Documentation

const PreciseTime& TimeStamp::getTime  )  const throw ()
 

Return the time of last modification.

Returns:
the time stamp

bool TimeStamp::isNewerThan const TimeStamp stamp  )  const throw ()
 

Check the time stamp.

bool TimeStamp::isNewerThan const PreciseTime time  )  const throw ()
 

Check the time stamp.

bool TimeStamp::isOlderThan const TimeStamp stamp  )  const throw ()
 

Check the time stamp.

bool TimeStamp::isOlderThan const PreciseTime time  )  const throw ()
 

Check the time stamp.

bool TimeStamp::read PersistenceManager pm  )  throw ()
 

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

virtual void TimeStamp::stamp const PreciseTime time = PreciseTime::ZERO  )  throw () [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 )

void TimeStamp::write PersistenceManager pm  )  const throw ()
 

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

PreciseTime TimeStamp::time_ [protected]
 

The time stamp.