comet::timeperiod_t Class Reference
[Com type wrappers.Com type wrappers.]

#include <comet/datetime.h>

List of all members.

Public Member Functions

 timeperiod_t ()
 Default Constructor.
 timeperiod_t (dt_invalid_t)
 Construct invalid.
 timeperiod_t (dt_zero_t)
 Construct zero.
 timeperiod_t (double period)
 timeperiod_t (float period)
 timeperiod_t (long period)
 timeperiod_t (int period)
 timeperiod_t (short period)
 timeperiod_t (unsigned long period)
 timeperiod_t (unsigned int period)
 timeperiod_t (unsigned short period)
 timeperiod_t (long days, long hours)
 timeperiod_t (long days, long hours, long minutes)
 timeperiod_t (long days, long hours, long minutes, long seconds, long milliseconds=0)
 operator double () const
 Return time-period as a double (days).
void split (long &days, long &hours, long &minutes, long &seconds)
 Split up the time period into days/hours/minutes/seconds.
void split (long *days, long *hours, long *minutes, long *seconds, long *milliseconds=0)
 Split up the time period into days/hours/minutes/seconds.
void set_period (long days, long hours, long minutes, long seconds, long milliseconds=0)
 Set as days/hours/minutes/seconds.
bool invalid () const
 Return true if the period is invalid.
bool good () const
 Return true if the period is not invalid.
bool valid () const
Assignment operators
timeperiod_toperator= (const double &period)
timeperiod_toperator= (float period)
timeperiod_toperator= (long period)
timeperiod_toperator= (int period)
timeperiod_toperator= (short period)
Comparison operators.
bool operator== (const timeperiod_t &prd) const
bool operator!= (const timeperiod_t &prd) const
bool operator< (const timeperiod_t &prd) const
bool operator> (const timeperiod_t &prd) const
bool operator<= (const timeperiod_t &prd) const
bool operator>= (const timeperiod_t &prd) const
bool operator== (dt_invalid_t) const
bool operator!= (dt_invalid_t) const
template<typename T> bool operator< (T prd) const
template<typename T> bool operator<= (T prd) const
template<typename T> bool operator> (T prd) const
template<typename T> bool operator>= (T prd) const
template<typename T> bool operator== (T prd) const
template<typename T> bool operator!= (T prd) const
Simple math operators.
timeperiod_t operator+ (const timeperiod_t &prd) const
timeperiod_t operator- (const timeperiod_t &prd) const
timeperiod_toperator+= (const timeperiod_t &prd)
timeperiod_toperator-= (const timeperiod_t &prd)
timeperiod_t operator- () const
Conversion functions
double as_days ()
void as_days (double prd)
double as_hours ()
void as_hours (double prd)
double as_minutes ()
void as_minutes (double prd)
double as_seconds ()
void as_seconds (double prd)

Static Public Member Functions

timeperiod_t invalid_period ()
 Return an invalid period.


Detailed Description

Time-period. Used with datetime_t math.


Member Function Documentation

void comet::timeperiod_t::split long &  days,
long &  hours,
long &  minutes,
long &  seconds
[inline]
 

Split up the time period into days/hours/minutes/seconds.

Backwards compatible.

Deprecated:

bool comet::timeperiod_t::valid  )  const [inline]
 

return true if the period is valid.

Deprecated:


The documentation for this class was generated from the following file: