#include <TimeTag.hpp>
Inheritance diagram for TimeTag:

These time representations must ensure or provide a way for the user to verify their own self-consistency.
Definition at line 41 of file TimeTag.hpp.
Public Types | ||||
| typedef std::map< char, std::string > | IdToValue | |||
| This type maps a character ( from a time format ) to its corresponding value ( from a time string ). | ||||
Public Member Functions | ||||
| virtual | ~TimeTag () throw () | |||
| Virtual Destructor. | ||||
| virtual CommonTime | convertToCommonTime () const =0 throw ( gpstk::InvalidRequest ) | |||
| ||||
| virtual void | convertFromCommonTime (const CommonTime &ct)=0 throw ( gpstk::InvalidRequest ) | |||
| ||||
| virtual std::string | printf (const std::string &fmt) const =0 throw ( gpstk::StringUtils::StringException ) | |||
| This function formats this time to a string. | ||||
| virtual std::string | printError (const std::string &fmt) const =0 throw ( gpstk::StringUtils::StringException ) | |||
| This function works similarly to printf. | ||||
| virtual void | scanf (const std::string &str, const std::string &fmt) throw ( gpstk::InvalidRequest, gpstk::StringUtils::StringException ) | |||
| This function sets this object to the time stored in the given string str. | ||||
| virtual bool | setFromInfo (const IdToValue &info)=0 throw () | |||
| Set this object using the information provided in info. | ||||
| virtual std::string | getPrintChars () const =0 throw () | |||
| Return a string containing the characters that this class understands when printing times. | ||||
| virtual std::string | getDefaultFormat () const =0 throw () | |||
| Return a string containing the default format to use in printing. | ||||
| virtual bool | isValid () const =0 throw () | |||
| Returns true if this object's members are valid, false otherwise. | ||||
| virtual void | reset ()=0 throw () | |||
| Reset this object to the default state. | ||||
| virtual std::string | asString () const throw ( gpstk::StringUtils::StringException ) | |||
| Format this time as a string using a format specified by the inheriting class. | ||||
| virtual | operator CommonTime () const throw (InvalidRequest) | |||
| Hey, it's an implicit casting operator! Basically just a lazy way to get at convertToCommonTime(). | ||||
Static Public Member Functions | ||||
| void | getInfo (const std::string &str, const std::string &fmt, IdToValue &info) throw ( gpstk::StringUtils::StringException ) | |||
| This is the workhorse for the scanf family of functions. | ||||
| std::string | getFormatPrefixInt () | |||
| This returns the regular expression prefix that is used when searching for integer specifiers. | ||||
| std::string | getFormatPrefixFloat () | |||
| This returns the regular expression prefix that is used when searching for float specifiers. | ||||
| std::string | getError () | |||
| This returns the default error string for the TimeTag classes. | ||||
|
|
This type maps a character ( from a time format ) to its corresponding value ( from a time string ).
Definition at line 85 of file TimeTag.hpp. |
|
|
Virtual Destructor.
Definition at line 46 of file TimeTag.hpp. |
|
|
Format this time as a string using a format specified by the inheriting class.
Definition at line 130 of file TimeTag.hpp. |
|
|
Implemented in ANSITime, CivilTime, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. Referenced by Test::toCommonAndBack(). |
|
|
Implemented in ANSITime, CivilTime, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. Referenced by Test::dumpCommonTime(). |
|
|
Return a string containing the default format to use in printing.
Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. Referenced by operator<<(). |
|
|
This returns the default error string for the TimeTag classes.
Definition at line 151 of file TimeTag.hpp. |
|
|
This returns the regular expression prefix that is used when searching for float specifiers.
Definition at line 147 of file TimeTag.hpp. |
|
|
This returns the regular expression prefix that is used when searching for integer specifiers.
Definition at line 142 of file TimeTag.hpp. |
|
||||||||||||||||
|
This is the workhorse for the scanf family of functions. It parses the given string str with the given format fmt in order to extract a time or part of a time from str.
Definition at line 56 of file TimeTag.cpp. References gpstk::StringUtils::asInt(), GPSTK_RETHROW, and gpstk::StringUtils::stripLeading(). |
|
|
Return a string containing the characters that this class understands when printing times.
Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. |
|
|
Returns true if this object's members are valid, false otherwise.
Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. |
|
|
Hey, it's an implicit casting operator! Basically just a lazy way to get at convertToCommonTime().
Definition at line 136 of file TimeTag.hpp. |
|
|
This function works similarly to printf. Instead of filling the format with data, it fills with error messages. Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. |
|
|
This function formats this time to a string. The exceptions thrown would only be due to problems parsing the fmt string. Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. Referenced by operator<<(). |
|
|
Reset this object to the default state.
Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. |
|
||||||||||||
|
This function sets this object to the time stored in the given string str.
Definition at line 32 of file TimeTag.cpp. References GPSTK_RETHROW, and GPSTK_THROW. Referenced by Test::otherTest(). |
|
|
Set this object using the information provided in info.
Implemented in ANSITime, CivilTime, GPSWeek, GPSWeekSecond, GPSWeekZcount, JulianDate, MJD, UnixTime, and YDSTime. |
1.3.9.1