OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimDate.h>
Public Member Functions | |
ossimLocalTm (time_t t=0) | |
ossimLocalTm (tm const &t) | |
ossimLocalTm (const ossimLocalTm &t) | |
ossimLocalTm & | operator= (tm const &t) |
ossimLocalTm & | operator= (const ossimLocalTm &t) |
operator time_t (void) const | |
int | isValid (void) const |
void | now () |
int | compare (ossimLocalTm const &t) const |
int | compare (std::time_t const tt) const |
std::ostream & | print (std::ostream &os, int df=datefmt, int tf=timefmt) const |
std::ostream & | printTime (std::ostream &os, int f=timefmt) const |
std::ostream & | printDate (std::ostream &os, int f=datefmt) const |
std::ostream & | dump (std::ostream &os) const |
method to dump all the data members. More... | |
int | getYear () const |
int | getShortYear () const |
int | getMonth () const |
int | getDay () const |
double | getJulian () const |
double | getModifiedJulian () const |
ossimLocalTm & | setDay (int day) |
ossimLocalTm & | setMonth (int month) |
ossimLocalTm & | setYear (int year) |
ossimLocalTm & | setDateFromJulian (double jd) |
ossimLocalTm & | setDateFromModifiedJulian (double mjd) |
void | setFractionalDay (double fractionalDay) |
int | getHour () const |
int | getMin () const |
int | getSec () const |
double | getFractionalSecond () const |
ossimLocalTm & | setHour (int h) |
ossimLocalTm & | setMin (int m) |
ossimLocalTm & | setSec (int s) |
ossimLocalTm & | setFloatSec (double s) |
ossimLocalTm & | setFractionalSecond (double fractS) |
time_t | getTicks () const |
getTicks() will call getEpoc. More... | |
time_t | getEpoc () const |
void | addSeconds (ossim_float64 n) |
void | addMinutes (ossim_float64 n) |
void | addHours (ossim_float64 n) |
void | addDays (ossim_float64 n) |
ossim_float64 | deltaInSeconds (const ossimLocalTm &d) const |
ossim_float64 | deltaInMinutes (const ossimLocalTm &d) const |
ossim_float64 | delatInHours (const ossimLocalTm &d) const |
ossim_float64 | deltaInDays (const ossimLocalTm &d) const |
ossimLocalTm | convertToGmt () const |
void | setTimeNoAdjustmentGivenEpoc (time_t ticks) |
Will not adjust for timezone. More... | |
void | setTimeGivenEpoc (time_t ticks) |
Will adjust for timezone. More... | |
bool | setIso8601 (const std::string &timeString, bool shiftToGmtOffsetZero=false) |
ossimRefPtr< ossimXmlNode > | saveXml () const |
bool | loadXml (ossimRefPtr< ossimXmlNode > dateNode) |
Static Public Member Functions | |
static void | extractHmsFromFractionalDay (double fractionalDay, int &h, int &m, int &s, double &fractionalSecond) |
Static Public Attributes | |
static char | timech = ':' |
static char | datech = '/' |
static int | datefmt = ossimLocalTm::ossimLocalTmFormatFull |
static int | timefmt = ossimLocalTm::ossimTimeFormatInternational |
Protected Member Functions | |
void | tSfx (std::ostream &os, int fmt, char ch) const |
void | pHour (std::ostream &os, int fmt) const |
void | pMins (std::ostream &os, int fmt) const |
void | pSecs (std::ostream &os, int fmt) const |
void | dSfx (std::ostream &os, int fmt) const |
void | pDate (std::ostream &os, int fmt) const |
void | pMonth (std::ostream &os, int fmt) const |
void | pYear (std::ostream &os, int fmt) const |
void | setTimezoneOffsetFromGmt () |
Protected Attributes | |
double | theFractionalSecond |
int | m_timezoneOffset |
Static Protected Attributes | |
static std::mutex | m_mutex |
Friends | |
OSSIM_DLL std::ostream & | operator<< (std::ostream &out, const ossimLocalTm &src) |
OSSIM_DLL int | operator== (const ossimLocalTm &t1, const ossimLocalTm &src) |
OSSIM_DLL int | operator!= (const ossimLocalTm &t1, const ossimLocalTm &src) |
OSSIM_DLL int | operator< (const ossimLocalTm &t1, const ossimLocalTm &src) |
OSSIM_DLL int | operator<= (const ossimLocalTm &t1, const ossimLocalTm &src) |
OSSIM_DLL int | operator> (const ossimLocalTm &t1, const ossimLocalTm &src) |
OSSIM_DLL int | operator>= (const ossimLocalTm &t1, const ossimLocalTm &src) |
Definition at line 19 of file ossimDate.h.
Definition at line 50 of file ossimDate.h.
Definition at line 86 of file ossimDate.h.
ossimLocalTm::ossimLocalTm | ( | time_t | t = 0 | ) |
ossimLocalTm::ossimLocalTm | ( | tm const & | t | ) |
ossimLocalTm::ossimLocalTm | ( | const ossimLocalTm & | t | ) |
void ossimLocalTm::addDays | ( | ossim_float64 | n | ) |
Definition at line 652 of file ossimDate.cpp.
References getJulian(), n, and setDateFromJulian().
void ossimLocalTm::addHours | ( | ossim_float64 | n | ) |
Definition at line 647 of file ossimDate.cpp.
References getJulian(), n, and setDateFromJulian().
void ossimLocalTm::addMinutes | ( | ossim_float64 | n | ) |
Definition at line 642 of file ossimDate.cpp.
References getJulian(), n, and setDateFromJulian().
void ossimLocalTm::addSeconds | ( | ossim_float64 | n | ) |
Definition at line 636 of file ossimDate.cpp.
References getJulian(), n, and setDateFromJulian().
int ossimLocalTm::compare | ( | ossimLocalTm const & | t | ) | const |
Definition at line 104 of file ossimDate.cpp.
Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
int ossimLocalTm::compare | ( | std::time_t const | tt | ) | const |
ossimLocalTm ossimLocalTm::convertToGmt | ( | ) | const |
Definition at line 677 of file ossimDate.cpp.
References m_mutex, and m_timezoneOffset.
Referenced by ossimNitfFileHeaderV2_X::formatDate().
ossim_float64 ossimLocalTm::delatInHours | ( | const ossimLocalTm & | d | ) | const |
ossim_float64 ossimLocalTm::deltaInDays | ( | const ossimLocalTm & | d | ) | const |
ossim_float64 ossimLocalTm::deltaInMinutes | ( | const ossimLocalTm & | d | ) | const |
ossim_float64 ossimLocalTm::deltaInSeconds | ( | const ossimLocalTm & | d | ) | const |
|
protected |
Definition at line 139 of file ossimDate.cpp.
References datech, ossimLocalTmFormatSepChar, and ossimLocalTmFormatSepSpace.
Referenced by pDate(), pMonth(), and pYear().
std::ostream & ossimLocalTm::dump | ( | std::ostream & | os | ) | const |
method to dump all the data members.
This is the tm struct + the theFractionalSecond from this class.
os | Stream to dump to. |
Definition at line 318 of file ossimDate.cpp.
References theFractionalSecond.
|
static |
int ossimLocalTm::getDay | ( | ) | const |
returns the day 1-31
Definition at line 453 of file ossimDate.cpp.
Referenced by ossimNitfFileHeaderV2_X::formatDate(), getJulian(), ossimplugins::ossim::iso8601TimeStringToCivilDate(), saveXml(), and ossimDateProperty::valueToString().
time_t ossimLocalTm::getEpoc | ( | ) | const |
Definition at line 629 of file ossimDate.cpp.
Referenced by getTicks().
double ossimLocalTm::getFractionalSecond | ( | ) | const |
Definition at line 585 of file ossimDate.cpp.
References theFractionalSecond.
Referenced by ossimplugins::ossim::iso8601TimeStringToCivilDate(), and saveXml().
int ossimLocalTm::getHour | ( | ) | const |
Definition at line 570 of file ossimDate.cpp.
Referenced by ossimNitfFileHeaderV2_X::formatDate(), getJulian(), saveXml(), and ossimDateProperty::valueToString().
double ossimLocalTm::getJulian | ( | ) | const |
Definition at line 458 of file ossimDate.cpp.
References getDay(), getHour(), getMin(), getMonth(), getSec(), getYear(), and theFractionalSecond.
Referenced by addDays(), addHours(), addMinutes(), addSeconds(), delatInHours(), deltaInDays(), deltaInMinutes(), deltaInSeconds(), ossimFfL7::getJulianDay(), and getModifiedJulian().
int ossimLocalTm::getMin | ( | ) | const |
Definition at line 575 of file ossimDate.cpp.
Referenced by ossimNitfFileHeaderV2_X::formatDate(), getJulian(), saveXml(), and ossimDateProperty::valueToString().
double ossimLocalTm::getModifiedJulian | ( | ) | const |
int ossimLocalTm::getMonth | ( | ) | const |
This is one based i.e. values are returned between 1-12
Definition at line 448 of file ossimDate.cpp.
Referenced by ossimNitfFileHeaderV2_X::formatDate(), getJulian(), ossimplugins::ossim::iso8601TimeStringToCivilDate(), saveXml(), and ossimDateProperty::valueToString().
int ossimLocalTm::getSec | ( | ) | const |
Definition at line 580 of file ossimDate.cpp.
Referenced by ossimNitfFileHeaderV2_X::formatDate(), getJulian(), saveXml(), and ossimDateProperty::valueToString().
int ossimLocalTm::getShortYear | ( | ) | const |
time_t ossimLocalTm::getTicks | ( | ) | const |
getTicks() will call getEpoc.
This is te number of microseconds passed since (00:00:00 UTC, January 1, 1970)
Definition at line 624 of file ossimDate.cpp.
References getEpoc().
Referenced by ossimFilename::setTimes().
int ossimLocalTm::getYear | ( | ) | const |
Definition at line 433 of file ossimDate.cpp.
Referenced by ossimNitfFileHeaderV2_X::formatDate(), getJulian(), getShortYear(), ossimplugins::ossim::iso8601TimeStringToCivilDate(), saveXml(), and ossimDateProperty::valueToString().
int ossimLocalTm::isValid | ( | void | ) | const |
Definition at line 120 of file ossimDate.cpp.
bool ossimLocalTm::loadXml | ( | ossimRefPtr< ossimXmlNode > | dateNode | ) |
Definition at line 1033 of file ossimDate.cpp.
References ossimXmlNode::findFirstNode(), ossimXmlNode::getText(), setDateFromJulian(), setDateFromModifiedJulian(), setDay(), setFractionalSecond(), setHour(), setMin(), setMonth(), setSec(), setYear(), ossimString::toDouble(), ossimString::toInt32(), and ossimRefPtr< T >::valid().
void ossimLocalTm::now | ( | ) |
Definition at line 133 of file ossimDate.cpp.
Referenced by setIso8601().
ossimLocalTm::operator time_t | ( | void | ) | const |
Definition at line 115 of file ossimDate.cpp.
ossimLocalTm & ossimLocalTm::operator= | ( | tm const & | t | ) |
Definition at line 91 of file ossimDate.cpp.
ossimLocalTm & ossimLocalTm::operator= | ( | const ossimLocalTm & | t | ) |
|
protected |
Definition at line 214 of file ossimDate.cpp.
References dSfx(), ossimLocalTmFormatDay, ossimLocalTmFormatMonFirst, ossimLocalTmFormatPadDay, ossimLocalTmFormatSepChar, ossimLocalTmFormatSepSpace, ossimLocalTmFormatYearFirst, and ossimLocalTmFormatZeroDay.
Referenced by printDate().
|
protected |
Definition at line 355 of file ossimDate.cpp.
References ossimTimeFormat24hour, ossimTimeFormatAmPm, ossimTimeFormatHour, ossimTimeFormatMins, ossimTimeFormatPadHour, ossimTimeFormatSepAbbrev, ossimTimeFormatZeroHour, and tSfx().
Referenced by printTime().
|
protected |
Definition at line 376 of file ossimDate.cpp.
References min, ossimTimeFormatHour, ossimTimeFormatMins, ossimTimeFormatPadMins, ossimTimeFormatSecs, ossimTimeFormatSepAbbrev, ossimTimeFormatZeroMins, and tSfx().
Referenced by printTime().
|
protected |
Definition at line 175 of file ossimDate.cpp.
References dSfx(), ossimLocalTmFormatDay, ossimLocalTmFormatMonFirst, ossimLocalTmFormatMonText, ossimLocalTmFormatMonth, ossimLocalTmFormatPadMon, ossimLocalTmFormatSepChar, ossimLocalTmFormatSepSpace, ossimLocalTmFormatYear, ossimLocalTmFormatYearFirst, ossimLocalTmFormatZeroMon, and x.
Referenced by printDate().
Definition at line 265 of file ossimDate.cpp.
References printDate(), and printTime().
Referenced by operator<<().
std::ostream & ossimLocalTm::printDate | ( | std::ostream & | os, |
int | f = datefmt |
||
) | const |
Definition at line 279 of file ossimDate.cpp.
References ossimLocalTmFormatDayOfWeek, ossimLocalTmFormatDMY, ossimLocalTmFormatMonFirst, ossimLocalTmFormatPadDay, ossimLocalTmFormatSepSpace, ossimLocalTmFormatYearFirst, pDate(), pMonth(), pYear(), and x.
Referenced by print(), and ossimDate::print().
std::ostream & ossimLocalTm::printTime | ( | std::ostream & | os, |
int | f = timefmt |
||
) | const |
Definition at line 418 of file ossimDate.cpp.
References ossimTimeFormatAmPm, pHour(), pMins(), and pSecs().
Referenced by print(), and ossimTime::print().
|
protected |
Definition at line 396 of file ossimDate.cpp.
References ossimTimeFormatAmPm, ossimTimeFormatHour, ossimTimeFormatMins, ossimTimeFormatPadSecs, ossimTimeFormatSecs, ossimTimeFormatSepAbbrev, ossimTimeFormatSepChar, ossimTimeFormatSepSpace, ossimTimeFormatZeroSecs, and tSfx().
Referenced by printTime().
|
protected |
Definition at line 147 of file ossimDate.cpp.
References dSfx(), ossimLocalTmFormatPadYear, ossimLocalTmFormatSepChar, ossimLocalTmFormatSepSpace, ossimLocalTmFormatYear, ossimLocalTmFormatYearFirst, ossimLocalTmFormatYearShort, and ossimLocalTmFormatZeroYear.
Referenced by printDate().
ossimRefPtr< ossimXmlNode > ossimLocalTm::saveXml | ( | ) | const |
Definition at line 1016 of file ossimDate.cpp.
References ossimXmlNode::addAttribute(), ossimXmlNode::addChildNode(), ossimRefPtr< T >::get(), getDay(), getFractionalSecond(), getHour(), getMin(), getMonth(), getSec(), getYear(), ossimXmlNode::setTag(), and ossimString::toString().
ossimLocalTm & ossimLocalTm::setDateFromJulian | ( | double | jd | ) |
Definition at line 504 of file ossimDate.cpp.
References n, setDay(), setFractionalDay(), setMonth(), and setYear().
Referenced by addDays(), addHours(), addMinutes(), addSeconds(), loadXml(), and setDateFromModifiedJulian().
ossimLocalTm & ossimLocalTm::setDateFromModifiedJulian | ( | double | mjd | ) |
Definition at line 533 of file ossimDate.cpp.
References setDateFromJulian().
Referenced by loadXml().
ossimLocalTm & ossimLocalTm::setDay | ( | int | day | ) |
Definition at line 476 of file ossimDate.cpp.
Referenced by loadXml(), ossimDate::ossimDate(), setDateFromJulian(), and ossimDateProperty::setValue().
ossimLocalTm & ossimLocalTm::setFloatSec | ( | double | s | ) |
Definition at line 611 of file ossimDate.cpp.
References setFractionalSecond().
void ossimLocalTm::setFractionalDay | ( | double | fractionalDay | ) |
Definition at line 540 of file ossimDate.cpp.
References extractHmsFromFractionalDay(), setFractionalSecond(), setHour(), setMin(), and setSec().
Referenced by setDateFromJulian().
ossimLocalTm & ossimLocalTm::setFractionalSecond | ( | double | fractS | ) |
Definition at line 617 of file ossimDate.cpp.
References theFractionalSecond.
Referenced by loadXml(), ossimDate::ossimDate(), setFloatSec(), and setFractionalDay().
ossimLocalTm & ossimLocalTm::setHour | ( | int | h | ) |
Definition at line 590 of file ossimDate.cpp.
Referenced by loadXml(), ossimDate::ossimDate(), setFractionalDay(), and ossimDateProperty::setValue().
bool ossimLocalTm::setIso8601 | ( | const std::string & | timeString, |
bool | shiftToGmtOffsetZero = false |
||
) |
Definition at line 789 of file ossimDate.cpp.
References now().
Referenced by ossimplugins::ossim::iso8601TimeStringToCivilDate().
ossimLocalTm & ossimLocalTm::setMin | ( | int | m | ) |
Definition at line 597 of file ossimDate.cpp.
Referenced by loadXml(), ossimDate::ossimDate(), setFractionalDay(), and ossimDateProperty::setValue().
ossimLocalTm & ossimLocalTm::setMonth | ( | int | month | ) |
The month is a number bewteen 1 and 12. We will shift it to the internal representation
Definition at line 483 of file ossimDate.cpp.
Referenced by loadXml(), ossimDate::ossimDate(), setDateFromJulian(), and ossimDateProperty::setValue().
ossimLocalTm & ossimLocalTm::setSec | ( | int | s | ) |
Definition at line 604 of file ossimDate.cpp.
Referenced by loadXml(), ossimDate::ossimDate(), setFractionalDay(), and ossimDateProperty::setValue().
void ossimLocalTm::setTimeGivenEpoc | ( | time_t | ticks | ) |
Will adjust for timezone.
The passed in value is based on seconds.
Definition at line 722 of file ossimDate.cpp.
References m_mutex.
void ossimLocalTm::setTimeNoAdjustmentGivenEpoc | ( | time_t | ticks | ) |
Will not adjust for timezone.
The passed in value is based on seconds.
Definition at line 716 of file ossimDate.cpp.
References m_mutex.
|
protected |
Definition at line 230 of file ossimDate.cpp.
References m_mutex, and m_timezoneOffset.
Referenced by ossimLocalTm().
ossimLocalTm & ossimLocalTm::setYear | ( | int | year | ) |
Definition at line 490 of file ossimDate.cpp.
Referenced by loadXml(), ossimDate::ossimDate(), setDateFromJulian(), and ossimDateProperty::setValue().
|
protected |
Definition at line 345 of file ossimDate.cpp.
References ossimTimeFormatSepAbbrev, ossimTimeFormatSepChar, ossimTimeFormatSepSpace, and timech.
Referenced by pHour(), pMins(), and pSecs().
|
friend |
Definition at line 35 of file ossimDate.cpp.
|
friend |
Definition at line 40 of file ossimDate.cpp.
|
friend |
Definition at line 25 of file ossimDate.cpp.
|
friend |
Definition at line 45 of file ossimDate.cpp.
|
friend |
Definition at line 30 of file ossimDate.cpp.
|
friend |
Definition at line 50 of file ossimDate.cpp.
|
friend |
Definition at line 55 of file ossimDate.cpp.
|
static |
Definition at line 120 of file ossimDate.h.
Referenced by dSfx().
|
static |
Definition at line 121 of file ossimDate.h.
|
staticprotected |
Definition at line 235 of file ossimDate.h.
Referenced by convertToGmt(), setTimeGivenEpoc(), setTimeNoAdjustmentGivenEpoc(), and setTimezoneOffsetFromGmt().
|
mutableprotected |
Definition at line 237 of file ossimDate.h.
Referenced by convertToGmt(), and setTimezoneOffsetFromGmt().
|
protected |
Definition at line 236 of file ossimDate.h.
Referenced by dump(), getFractionalSecond(), getJulian(), operator=(), and setFractionalSecond().
|
static |
Definition at line 119 of file ossimDate.h.
Referenced by tSfx().
|
static |
Definition at line 122 of file ossimDate.h.