|
World Ocean Simulation System (WOSS) library
|
a class for time date manipulation More...
#include <time-definitions.h>

Public Member Functions | |
| Time () | |
| Time (struct tm *time) | |
| Time (int day, int month, int year, int hours=0, int mins=0, int seconds=1) | |
| Time (const Time ©) | |
| ~Time () | |
| Time & | setMonth (int m) |
| Time & | setDay (int d) |
| Time & | setYear (int y) |
| Time & | setHours (int h) |
| Time & | setMinutes (int m) |
| Time & | setSeconds (int s) |
| bool | isValid () const |
| int | getMonth () const |
| int | getDay () const |
| int | getHours () const |
| int | getYear () const |
| int | getMinutes () const |
| int | getSeconds () const |
| operator time_t () const | |
| Time & | operator= (const Time ©) |
| friend::std::ostream & | operator<< (::std::ostream &os, const Time &instance) |
Static Public Member Functions | |
| static void | setDebug (bool flag) |
Protected Attributes | |
| struct tm | timeinfo |
| time_t | raw_time |
Static Protected Attributes | |
| static bool | debug = false |
Friends | |
| const Time | operator+ (const Time &left, const time_t right) |
| const Time | operator- (const Time &left, const time_t right) |
| double | operator- (const Time &left, const Time &right) |
| Time & | operator+= (Time &left, time_t right) |
| Time & | operator-= (Time &left, time_t right) |
| bool | operator== (const Time &left, const Time &right) |
| bool | operator!= (const Time &left, const Time &right) |
| bool | operator> (const Time &left, const Time &right) |
| bool | operator< (const Time &left, const Time &right) |
| bool | operator<= (const Time &left, const Time &right) |
| bool | operator>= (const Time &left, const Time &right) |
a class for time date manipulation
Time class offers the possibility to store and manipulate date time. A time date consists of a day, month, year, hours, minutes and seconds.
| Time::Time | ( | struct tm * | time | ) |
| Time::Time | ( | int | day, |
| int | month, | ||
| int | year, | ||
| int | hours = 0, |
||
| int | mins = 0, |
||
| int | seconds = 1 |
||
| ) |
Time constructor
| day | day value. Should be between 1 and 31 |
| month | month value. Should be between 1 and 12 |
| year | year value. |
| hours | hours value. Should be between 0 and 23 |
| mins | minutes value. Should be between 0 and 59 |
| seconds | seconds value. Should be between 0 and 59 |
| Time::Time | ( | const Time & | copy | ) |
|
inline |
Time destructor. It is not virtual, since this class is not meant to be inherited from
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Checks the validity of Time
References raw_time.
Referenced by woss::BellhopCreator::createWoss(), woss::ResPressureTxtDb::getValue(), woss::ResTimeArrTxtDb::getValue(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::ACToolboxWoss::isValid(), woss::BellhopWoss::timeEvolve(), woss::Altimetry::timeEvolve(), woss::AltimBretschneider::timeEvolve(), woss::WMSMTcreateThreadPressure(), woss::WMSMTcreateThreadTimeArr(), and woss::Woss::Woss().
|
inline |
time_t operator
| friend::std::ostream & woss::Time::operator<< | ( | ::std::ostream & | os, |
| const Time & | instance | ||
| ) |
<< operator
| os | left operand ostream reference |
| instance | right operand const Time reference |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Inequality operator
| left | left operand const reference |
| right | right operand const reference |
Sum operator
| left | left operand const reference |
| right | right operand const reference |
Compound assignment sum operator
| left | left operand reference |
| right | right operand const time_t representing seconds |
Subtraction operator
| left | left operand const reference |
| right | right operand const reference |
Subtraction operator
| left | left operand const reference |
| right | right operand const reference |
Compound assignment subtraction operator
| left | left operand reference |
| right | right operand const time_t representing seconds |
Less than operator
| left | left operand const reference |
| right | right operand const reference |
Less than or equal to operator
| left | left operand const reference |
| right | right operand const reference |
Equality operator
| left | left operand const reference |
| right | right operand const reference |
Greater than operator
| left | left operand const reference |
| right | right operand const reference |
Greater than or equal to operator
| left | left operand const reference |
| right | right operand const reference |
|
staticprotected |
Debug flag
Referenced by setDebug().
|
protected |
Number of seconds corresponding to date time timeinfo
Referenced by isValid(), woss::operator+=(), woss::operator-=(), operator=(), setDay(), setHours(), setMinutes(), setMonth(), setSeconds(), setYear(), Time(), Time(), Time(), and Time().
|
protected |
Struct tm from ctime library
Referenced by getDay(), getHours(), getMinutes(), getMonth(), getSeconds(), getYear(), woss::operator+=(), woss::operator-(), woss::operator-=(), operator=(), setDay(), setHours(), setMinutes(), setMonth(), setSeconds(), setYear(), Time(), Time(), Time(), and Time().