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

PreciseTime Class Reference
[Miscellaneous]

Time class. More...

#include <timeStamp.h>

List of all members.

Accessors

long getSeconds () const throw ()
 Return the seconds since Jan.
long getMicroSeconds () const throw ()
 Return the microseconds.
PreciseTime now () throw ()
 Return the current time.

Public Member Functions

Constructors and Destructors.
 PreciseTime () throw ()
 Default constructor.
 PreciseTime (const PreciseTime &time) throw ()
 Copy constructor.
 PreciseTime (long secs, long usecs) throw ()
 Detailed constructor.
virtual ~PreciseTime () throw ()
 Destructor.
Assignment
void set (long secs, long usecs) throw ()
 Assignment method.
void set (const PreciseTime &time) throw ()
 Assignment method.
const PreciseTimeoperator= (const PreciseTime &time) throw ()
 Assignment operator.
virtual void clear () throw ()
 Clear method.
Predicates
bool operator< (const PreciseTime &time) const throw ()
 Greater than operator.
bool operator> (const PreciseTime &time) const throw ()
 Lesser than operator.
bool operator== (const PreciseTime &time) const throw ()
 Equality operator.
Storable interface.
void write (PersistenceManager &pm) const throw ()
 Persistent stream writing.
bool read (PersistenceManager &pm) throw ()
 Persistent stream reading.

Static Public Attributes

Constants.
const PreciseTime ZERO
 Zero object.

Protected Attributes

long secs_
long usecs_


Detailed Description

Time class.

Used to store a point of time. This class provides a higher precision than Time (below seconds).

Interface: Storable


Constructor & Destructor Documentation

PreciseTime::PreciseTime  )  throw ()
 

Default constructor.

Initialize with zero.


Member Function Documentation

long PreciseTime::getMicroSeconds  )  const throw ()
 

Return the microseconds.

long PreciseTime::getSeconds  )  const throw ()
 

Return the seconds since Jan.

1, 1970.

PreciseTime PreciseTime::now  )  throw () [static]
 

Return the current time.

Returns:
PreciseTime the current time in seconds since Jan. 1, 1970

bool PreciseTime::operator< const PreciseTime time  )  const throw ()
 

Greater than operator.

bool PreciseTime::operator== const PreciseTime time  )  const throw ()
 

Equality operator.

bool PreciseTime::operator> const PreciseTime time  )  const throw ()
 

Lesser than operator.

bool PreciseTime::read PersistenceManager pm  )  throw ()
 

Persistent stream reading.

This method reads the contents of a PreciseTime object from the persistent stream using the readPrimitive method of the PersistenceManager.

Parameters:
pm the persistence manager

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

Persistent stream writing.

This method writes the contents of the PreciseTime objects to the persistent stream using the writePrimitive method of the PersistenceManager.

Parameters:
pm the persistence manager


Member Data Documentation

const PreciseTime PreciseTime::ZERO [static]
 

Zero object.