#include <tntdb/time.h>
Public Member Functions | |
| Time () | |
| Initializes the Time-object with empty values. | |
| Time (unsigned short hour_, unsigned short minute_, unsigned short second_, unsigned short millis_=0) | |
| unsigned short | getHour () const |
| Returns the hour-part of the Time. | |
| unsigned short | getMinute () const |
| Returns the minute-part of the Time. | |
| unsigned short | getSecond () const |
| Returns the second-part of the Time. | |
| unsigned short | getMillis () const |
| Returns the millisecond-part of the Time. | |
| bool | isNull () const |
| void | set (unsigned short hour_, unsigned short minute_, unsigned short second_, unsigned short millis_=0) |
| std::string | getIso () const |
| Returns the time in ISO-format (hh:mm:ss.hhh). | |
| bool | operator== (const Time &dt) const |
| bool | operator!= (const Time &dt) const |
| bool | operator< (const Time &dt) const |
| bool | operator> (const Time &dt) const |
| bool | operator<= (const Time &dt) const |
| bool | operator>= (const Time &dt) const |
Static Public Member Functions | |
| static Time | fromIso (const std::string &s) |
| Time | ( | unsigned short | hour_, | |
| unsigned short | minute_, | |||
| unsigned short | second_, | |||
| unsigned short | millis_ = 0 | |||
| ) |
Initializes the Time-object with the given values. No range-checks are done.
| void set | ( | unsigned short | hour_, | |
| unsigned short | minute_, | |||
| unsigned short | second_, | |||
| unsigned short | millis_ = 0 | |||
| ) |
Sets the time. No range-checks are done.
| static Time fromIso | ( | const std::string & | s | ) | [static] |
Interprets the passed string as a time-string in ISO-format (hh:mm:ss.hhh) and returns a Time-object. When the string is not in ISO-format, a exception of type tntdb::TypeError is thrown.