#include <timeStamp.h>
Public Member Functions |
|
|
Constructors and Destructors
|
|
| TimeStamp () | |
| Default constructor. |
|
| virtual | ~TimeStamp () |
| Destructor. |
|
|
Predicates
|
|
| bool | isNewerThan (const PreciseTime &time) const |
| Check the time stamp. |
|
| bool | isOlderThan (const PreciseTime &time) const |
| Check the time stamp. |
|
| bool | isNewerThan (const TimeStamp &stamp) const |
| Check the time stamp. |
|
| bool | isOlderThan (const TimeStamp &stamp) const |
| Check the time stamp. |
|
| bool | operator== (const TimeStamp &stamp) const |
| Equality operator. |
|
|
Accessors
|
|
| virtual void | stamp (const PreciseTime &time=PreciseTime::ZERO) |
| Update the time stamp. |
|
| const PreciseTime & | getTime () const |
| Return the time of last
modification. |
|
|
Assignment
|
|
| const PreciseTime & | operator= (const PreciseTime &time) |
| Assignment operator. |
|
| virtual void | clear () |
| Clear method. |
|
|
Storable interface.
|
|
| void | write (PersistenceManager &pm) const |
| Persistent stream writing. |
|
| bool | read (PersistenceManager &pm) |
| Persistent stream reading. |
|
Protected Attributes |
|
| PreciseTime | time_ |
| The time stamp. |
|
This class implements a so-called time stamp. It is used to
store modification or creation times of objects.
Interface: Storable
| const PreciseTime& BALL::TimeStamp::getTime | ( | ) | const |
Return the time of last modification.
| 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.
| pm | the persistence manager |
| 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 ).
| time | the new time stamp (default = PreciseTime::now ) |
| 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.
| pm | the persistence manager |
1.5.8