|
Isis 3.0 Object Programmers' Reference |
Home |
#include <iTime.h>
Collaboration diagram for Isis::iTime:

This class parses a date/time string into individual components. The input time string can be in a variety of formats (see the NAIF routine str2et_c). The components and different representation can then be returned using the member functions.
For internal use only.
Definition at line 70 of file iTime.h.
Public Member Functions | |
| iTime () | |
| Constructs an empty iTime object. | |
| iTime (const std::string &time) | |
| Constructs a iTime object and initializes it to the time from the argument. | |
| iTime (const double time) | |
| Constructs a iTime object and initializes it to the time from the argument. | |
| ~iTime () | |
| Destroys the iTime object. | |
| void | operator= (const std::string &time) |
| Changes the value of the iTime object. | |
| void | operator= (const char *time) |
| void | operator= (const double time) |
| bool | operator>= (const iTime &time) |
| Compare two iTime objects for greater than or equal. | |
| bool | operator<= (const iTime &time) |
| Compare two iTime objects for less than or equal. | |
| bool | operator> (const iTime &time) |
| Compare two iTime objects for greater than. | |
| bool | operator< (const iTime &time) |
| Compare two iTime objects for less than. | |
| bool | operator!= (const iTime &time) |
| Compare two iTime objects for inequality. | |
| bool | operator== (const iTime &time) |
| Compare two iTime objects for equality. | |
| std::string | YearString () const |
| Returns the year portion of the time as a string. | |
| int | Year () const |
| Returns the year portion of the time as an int. | |
| std::string | MonthString () const |
| Returns the month portion of the time as a string. | |
| int | Month () const |
| Returns the month portion of the time as an int. | |
| std::string | DayString () const |
| Returns the dat portion of the time as a string. | |
| int | Day () const |
| Returns the day portion of the time as an int. | |
| std::string | HourString () const |
| Returns the hour portion of the time as a string. | |
| int | Hour () const |
| Returns the hour portion of the time as an int. | |
| std::string | MinuteString () const |
| Returns the minute portion of the time as a string. | |
| int | Minute () const |
| Returns the minute portion of the time as an int. | |
| std::string | SecondString () const |
| Returns the second portion of the time as a string. | |
| double | Second () const |
| Returns the second portion of the time as a double. | |
| std::string | DayOfYearString () const |
| Returns the day of year portion of the time as a string. | |
| int | DayOfYear () const |
| Returns the day of year portion of the time as an int. | |
| std::string | EtString () const |
| Returns the ephemeris time (TDB) representation of the time as a string. | |
| double | Et () const |
| Returns the ephemeris time (TDB) representation of the time as a double. | |
| std::string | UTC () const |
| Returns the internally stored time, formatted as a UTC time. | |
Static Public Member Functions | |
| static std::string | CurrentGMT () |
| Returns the current Greenwich Mean iTime The time is based on the system time, so it is only as accurate as the local system clock. | |
| static std::string | CurrentLocalTime () |
| Returns the current local time This time is taken directly from the system clock, so if the system clock is off, this will be, too. | |
Private Member Functions | |
| void | Extract () |
| Uses the Naif routines to convert a double ephemeris reresentation of a date/time to its individual components. | |
| void | LoadLeapSecondKernel () |
| Uses the Naif routines to load the most current leap second kernel. | |
| void | UnloadLeapSecondKernel () |
| Uses the Naif routines to unload the leap second kernel. | |
Private Attributes | |
| Isis::Filename | p_leapSecond |
| The filename used to load the leapsecond kernel. | |
| std::string | p_original |
| The original string passed into the constructor or the operator= member. | |
| int | p_year |
| The year portion of the original string passed into the constructor or the operator= member. | |
| int | p_month |
| The month portion of the original string passed into the constructor or the operator= member. | |
| int | p_day |
| The day portion of the original string passed into the constructor or the operator= member. | |
| int | p_dayOfYear |
| The day of year portion of the original string passed into the constructor or the operator= member. | |
| int | p_hour |
| The hour portion of the original string passed into the constructor or the operator= member. | |
| int | p_minute |
| The minute portion of the original string passed into the constructor or the operator= member. | |
| double | p_second |
| The seconds portion of the original string passed into the constructor or the operator= member. | |
| double | p_et |
| The ephemeris representaion of the original string passed into the constructor or the operator= member. | |
Static Private Attributes | |
| static bool | p_lpInitialized = false |
| Isis::iTime::iTime | ( | ) |
| Isis::iTime::iTime | ( | const std::string & | time | ) |
Constructs a iTime object and initializes it to the time from the argument.
| time | A time string formatted in standard UTC or similar format. Example:"2000/12/31 23:59:01.6789" or "2000-12-31T23:59:01.6789" |
Definition at line 53 of file iTime.cpp.
References Extract(), LoadLeapSecondKernel(), p_et, p_original, and UnloadLeapSecondKernel().
| Isis::iTime::iTime | ( | const double | time | ) |
Constructs a iTime object and initializes it to the time from the argument.
| time | An ephemeris time (ET). |
Definition at line 72 of file iTime.cpp.
References EtString(), Extract(), LoadLeapSecondKernel(), p_et, p_original, and UnloadLeapSecondKernel().
| std::string Isis::iTime::CurrentGMT | ( | ) | [static] |
| std::string Isis::iTime::CurrentLocalTime | ( | ) | [static] |
Returns the current local time This time is taken directly from the system clock, so if the system clock is off, this will be, too.
Definition at line 488 of file iTime.cpp.
Referenced by Isis::ControlMeasure::SetDateTime(), and Isis::ControlNet::Write().
| int Isis::iTime::Day | ( | ) | const |
| int Isis::iTime::DayOfYear | ( | ) | const |
Returns the day of year portion of the time as an int.
Definition at line 336 of file iTime.cpp.
References p_dayOfYear.
| string Isis::iTime::DayOfYearString | ( | ) | const |
Returns the day of year portion of the time as a string.
Definition at line 326 of file iTime.cpp.
References p_dayOfYear.
| string Isis::iTime::DayString | ( | ) | const |
| double Isis::iTime::Et | ( | ) | const |
| string Isis::iTime::EtString | ( | ) | const |
Returns the ephemeris time (TDB) representation of the time as a string.
See the Naif documentation "time.req" for more information.
Definition at line 346 of file iTime.cpp.
References p_et.
Referenced by iTime(), and operator=().
| void Isis::iTime::Extract | ( | ) | [private] |
Uses the Naif routines to convert a double ephemeris reresentation of a date/time to its individual components.
Definition at line 394 of file iTime.cpp.
References p_day, p_dayOfYear, p_et, p_hour, p_minute, p_month, p_second, p_year, Isis::iString::ToDouble(), and Isis::iString::ToInteger().
Referenced by iTime(), and operator=().
| int Isis::iTime::Hour | ( | ) | const |
| string Isis::iTime::HourString | ( | ) | const |
| void Isis::iTime::LoadLeapSecondKernel | ( | ) | [private] |
Uses the Naif routines to load the most current leap second kernel.
Definition at line 438 of file iTime.cpp.
References Isis::Filename::Expanded(), Isis::PvlObject::FindGroup(), Isis::Filename::HighestVersion(), p_leapSecond, p_lpInitialized, and Isis::Preference::Preferences().
Referenced by iTime(), and operator=().
| int Isis::iTime::Minute | ( | ) | const |
| string Isis::iTime::MinuteString | ( | ) | const |
| int Isis::iTime::Month | ( | ) | const |
| string Isis::iTime::MonthString | ( | ) | const |
| bool Isis::iTime::operator!= | ( | const iTime & | time | ) |
| bool Isis::iTime::operator< | ( | const iTime & | time | ) |
| bool Isis::iTime::operator<= | ( | const iTime & | time | ) |
| void Isis::iTime::operator= | ( | const std::string & | time | ) |
Changes the value of the iTime object.
| time | A time string formatted in standard UTC or similar format. Example:"2000/12/31 23:59:01.6789" or "2000-12-31T23:59:01.6789" |
Definition at line 94 of file iTime.cpp.
References Extract(), LoadLeapSecondKernel(), p_et, p_original, and UnloadLeapSecondKernel().
| bool Isis::iTime::operator== | ( | const iTime & | time | ) |
| bool Isis::iTime::operator> | ( | const iTime & | time | ) |
| bool Isis::iTime::operator>= | ( | const iTime & | time | ) |
| double Isis::iTime::Second | ( | ) | const |
| string Isis::iTime::SecondString | ( | ) | const |
| void Isis::iTime::UnloadLeapSecondKernel | ( | ) | [private] |
Uses the Naif routines to unload the leap second kernel.
Definition at line 457 of file iTime.cpp.
Referenced by iTime(), and operator=().
| string Isis::iTime::UTC | ( | ) | const |
Returns the internally stored time, formatted as a UTC time.
Definition at line 366 of file iTime.cpp.
References Day(), DayString(), Hour(), HourString(), Minute(), MinuteString(), Month(), MonthString(), Second(), SecondString(), and YearString().
Referenced by Qisis::AdvancedTrackTool::updateRow().
| int Isis::iTime::Year | ( | ) | const |
| string Isis::iTime::YearString | ( | ) | const |
int Isis::iTime::p_day [private] |
The day portion of the original string passed into the constructor or the operator= member.
Definition at line 84 of file iTime.h.
Referenced by Day(), DayString(), and Extract().
int Isis::iTime::p_dayOfYear [private] |
The day of year portion of the original string passed into the constructor or the operator= member.
Definition at line 86 of file iTime.h.
Referenced by DayOfYear(), DayOfYearString(), and Extract().
double Isis::iTime::p_et [private] |
The ephemeris representaion of the original string passed into the constructor or the operator= member.
Definition at line 94 of file iTime.h.
Referenced by Et(), EtString(), Extract(), iTime(), operator!=(), operator<(), operator<=(), operator=(), operator==(), operator>(), and operator>=().
int Isis::iTime::p_hour [private] |
The hour portion of the original string passed into the constructor or the operator= member.
Definition at line 88 of file iTime.h.
Referenced by Extract(), Hour(), and HourString().
Isis::Filename Isis::iTime::p_leapSecond [private] |
The filename used to load the leapsecond kernel.
Definition at line 72 of file iTime.h.
Referenced by LoadLeapSecondKernel().
int Isis::iTime::p_minute [private] |
The minute portion of the original string passed into the constructor or the operator= member.
Definition at line 90 of file iTime.h.
Referenced by Extract(), Minute(), and MinuteString().
int Isis::iTime::p_month [private] |
The month portion of the original string passed into the constructor or the operator= member.
Definition at line 82 of file iTime.h.
Referenced by Extract(), Month(), and MonthString().
std::string Isis::iTime::p_original [private] |
The original string passed into the constructor or the operator= member.
Or, the string representation of the ephemeris time if the double constructor or operator= was used.
Definition at line 74 of file iTime.h.
Referenced by iTime(), and operator=().
double Isis::iTime::p_second [private] |
The seconds portion of the original string passed into the constructor or the operator= member.
Definition at line 92 of file iTime.h.
Referenced by Extract(), Second(), and SecondString().
int Isis::iTime::p_year [private] |
The year portion of the original string passed into the constructor or the operator= member.
Definition at line 80 of file iTime.h.
Referenced by Extract(), Year(), and YearString().