Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
comet::timeperiod_t Class Reference
[Com type wrappers., Com type wrappers.]
#include <comet/datetime.h>
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_t & | operator= (const double &period) |
| timeperiod_t & | operator= (float period) |
| timeperiod_t & | operator= (long period) |
| timeperiod_t & | operator= (int period) |
| timeperiod_t & | operator= (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_t & | operator+= (const timeperiod_t &prd) |
| timeperiod_t & | operator-= (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
|
||||||||||||||||||||
|
Split up the time period into days/hours/minutes/seconds. Backwards compatible.
|
|
|
return true if the period is valid.
|
The documentation for this class was generated from the following file: