code::TimeInterval Class Reference

List of all members.

Detailed Description

A directed interval of time on the universal time-line.

There is a geometric interpretation; a TimeInterval is like a one-dimensional vector. A positive TimeInterval points to the right on the time-line, and a negative TimeInterval points to the left.

Author:
Thomas E. Vaughan (original)

lakshman

Charles Kerr

See also:
Time


Public Member Functions

 TimeInterval (double s=0)
 The default interval has zero length.
double milliseconds () const
 Return a double in milliseconds.
double seconds () const
 Return a double in sec.
double minutes () const
 Return a double in minutes.
double hours () const
 Return a double in hours.
double days () const
 Return a double in days.
Time operator+ (const Time &) const
TimeInterval operator * (double s) const
TimeInterval operator/ (double s) const
double operator/ (const TimeInterval &t) const
TimeInterval operator+ (const TimeInterval &t) const
TimeInterval operator- (const TimeInterval &t) const
TimeIntervaloperator+= (const TimeInterval &t)
TimeIntervaloperator-= (const TimeInterval &t)
TimeIntervaloperator *= (double s)
TimeIntervaloperator/= (double s)
int compareTo (const TimeInterval &t) const
bool operator< (const TimeInterval &t) const
bool operator<= (const TimeInterval &t) const
bool operator== (const TimeInterval &t) const
bool operator>= (const TimeInterval &t) const
bool operator> (const TimeInterval &t) const
bool operator!= (const TimeInterval &t) const

Static Public Member Functions

static TimeInterval Seconds (double s)
 Return a TimeInterval explicitly defined in sec.
static TimeInterval Minutes (double m)
 Return a TimeInterval explicitly defined in minutes.
static TimeInterval Hours (double h)
 Return a TimeInterval explicitly defined in hours.
static TimeInterval Days (double d)
 Return a TimeInterval explicitly defined in days.

Friends

TimeInterval operator * (double, const TimeInterval &)
 multiplication (scaling) operator for LHS double


Constructor & Destructor Documentation

code::TimeInterval::TimeInterval ( double  s = 0  )  [inline]

The default interval has zero length.


Member Function Documentation

int code::TimeInterval::compareTo ( const TimeInterval t  )  const [inline]

double code::TimeInterval::days (  )  const [inline]

Return a double in days.

static TimeInterval code::TimeInterval::Days ( double  d  )  [inline, static]

Return a TimeInterval explicitly defined in days.

double code::TimeInterval::hours (  )  const [inline]

Return a double in hours.

static TimeInterval code::TimeInterval::Hours ( double  h  )  [inline, static]

Return a TimeInterval explicitly defined in hours.

double code::TimeInterval::milliseconds (  )  const [inline]

Return a double in milliseconds.

double code::TimeInterval::minutes (  )  const [inline]

Return a double in minutes.

static TimeInterval code::TimeInterval::Minutes ( double  m  )  [inline, static]

Return a TimeInterval explicitly defined in minutes.

TimeInterval code::TimeInterval::operator * ( double  s  )  const [inline]

TimeInterval& code::TimeInterval::operator *= ( double  s  )  [inline]

bool code::TimeInterval::operator!= ( const TimeInterval t  )  const [inline]

TimeInterval code::TimeInterval::operator+ ( const TimeInterval t  )  const [inline]

Time code::TimeInterval::operator+ ( const Time  )  const

TimeInterval& code::TimeInterval::operator+= ( const TimeInterval t  )  [inline]

TimeInterval code::TimeInterval::operator- ( const TimeInterval t  )  const [inline]

TimeInterval& code::TimeInterval::operator-= ( const TimeInterval t  )  [inline]

double code::TimeInterval::operator/ ( const TimeInterval t  )  const [inline]

TimeInterval code::TimeInterval::operator/ ( double  s  )  const [inline]

TimeInterval& code::TimeInterval::operator/= ( double  s  )  [inline]

bool code::TimeInterval::operator< ( const TimeInterval t  )  const [inline]

bool code::TimeInterval::operator<= ( const TimeInterval t  )  const [inline]

bool code::TimeInterval::operator== ( const TimeInterval t  )  const [inline]

bool code::TimeInterval::operator> ( const TimeInterval t  )  const [inline]

bool code::TimeInterval::operator>= ( const TimeInterval t  )  const [inline]

double code::TimeInterval::seconds (  )  const [inline]

Return a double in sec.

static TimeInterval code::TimeInterval::Seconds ( double  s  )  [inline, static]

Return a TimeInterval explicitly defined in sec.


Friends And Related Function Documentation

TimeInterval operator * ( double  ,
const TimeInterval  
) [friend]

multiplication (scaling) operator for LHS double


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7