Ilwis-Objects  1.0
GIS and Remote Sensing framework for data access and processing
 All Classes Functions Enumerations Pages
Public Member Functions | List of all members
Ilwis::Duration Class Reference
Inheritance diagram for Ilwis::Duration:
Ilwis::Time

Public Member Functions

 Duration (const QString &step="", IlwisTypes tp=itTIME)
 
 Duration (double r, IlwisTypes tp=itTIME)
 
QString toString (bool local, IlwisTypes tp=itTIME) const
 
bool isValid () const
 
double get (TimePart part) const
 
- Public Member Functions inherited from Ilwis::Time
 Time (int year, int month, int day, int hour, int minute, double seconds=0)
 
 Time (int hour, int minute, double seconds=0)
 
 Time (int year, int month=1, int day=1)
 
 Time (const time_t time)
 Time. More...
 
 Time (const QString &isostring)
 
 Time (const char *isostring)
 
 Time (double jd, IlwisTypes m=itDATETIME)
 
 Time (const QDateTime &time)
 
 Time (const QDate &date)
 
 Time (const QTime &tm)
 
 Time (const Time &time)
 
virtual ~Time ()
 
 operator double () const
 
 operator QDateTime () const
 
Timeoperator= (double t)
 
time_t toTime_t () const
 toTime_t More...
 
bool isLeapYear (int year=iUNDEF) const
 
Duration operator- (const Time &time) const
 
Time operator+ (const Duration &duration) const
 
bool operator< (const Time &time) const
 
bool operator> (const Time &time) const
 
bool operator== (const Time &time) const
 
bool operator!= (const Time &time) const
 
void setValue (const QString &isostring)
 
void setYear (int year)
 
void setMonth (int Mnt)
 
void setDay (int dy)
 
void setHour (int hr)
 
void setMinute (int min)
 
void setSecond (double sec)
 
IlwisTypes valueType () const
 
void valueType (IlwisTypes tp)
 

Additional Inherited Members

- Public Types inherited from Ilwis::Time
enum  TimePart {
  tpYEAR, tpMONTH, tpDAYOFMONTH, tpJULIANDAY,
  tpDAYOFTHEWEEK, tpDAYOFTHEYEAR, tpWEEKNUMBER, tpHOUR,
  tpMINUTE, tpSECOND, tpDATE, tpDAYTIME
}
 The TimePart enum.
 
- Static Public Member Functions inherited from Ilwis::Time
static Time now ()
 
- Protected Member Functions inherited from Ilwis::Time
void checkDate (int year, int month, int day)
 
void checkTime (int hour, int minute, double seconds)
 
double gregorianToJulian (int year, int month, int day, int hour, int minutes, double seconds) const
 
void julianToGregorian (int &year, int &month, int &day, int &hour, int &minutes, double &seconds) const
 
int julianyearday (int year, int month, int day) const
 
int tolong (double val) const
 
void parseOrdinalDate (int ordinal, int year, int &month, int &day)
 
void parseYearPart (const QString &yearpart, int &year, int &month, int &day)
 
void parseDayPart (const QString &dayPart, int &hours, int &minutes, double &seconds)
 
void parseIsoString (const QString &isostring, int &year, int &month, int &day, int &hours, int &minutes, double &seconds)
 
- Protected Attributes inherited from Ilwis::Time
double _julianday
 
bool _valid
 
IlwisTypes _valuetype
 

Member Function Documentation

double Duration::get ( TimePart  part) const
virtual

Query for a single field of this Time.
You can query for:

  • tpDATE
  • tpDAYTIME
  • tpYEAR
  • tpMONTH
  • tpDAYOFMONTH
  • tpJULIANDAY
  • tpDAYOFTHEWEEK
  • tpHOUR
  • tpMINUTE
  • tpSECOND will return rUNDEF if this Time object is invalid / the requested fields are not available
Parameters
partThe part of this Time requested (tpX values)
Returns
The value of the requested part

Reimplemented from Ilwis::Time.

bool Duration::isValid ( ) const
virtual

Checks the validity of this time.
A time is invalid when there is no time set, or 1 or more of the inner members have an invalid value (negative value).

Returns
true if this time is valid (the value within this time)

Reimplemented from Ilwis::Time.

QString Duration::toString ( bool  local,
IlwisTypes  tp = itTIME 
) const
virtual

Translates this type to a string format of one of the following types:

  • itDATE
  • itDATETIME
  • itTIME

The typ defaults to the value type of this time

Parameters
local
mode
Returns

Reimplemented from Ilwis::Time.


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