The IBPP::Time class represents a time value. It is not an interface class, with automatic smart pointer management like for instance the Database class. It is a plain classical C++ class. Use it to interact easily with TIME (SQL) columns in your databases.
See the file ibpp.h for an up-to-date definition.
A Time is internally made of a simple integer, representing the ten-thousands of seconds elapsed since midnight (00h00m00s0000). Being made only of an integer as its data part, the class Time is a light object which you can use without fear of bulky data structures.
Resets the time to midnight (0).
Sets the time to 'now' (local time).
Sets the time according to the individual components. The ten-thousandths of second are optional and default to 0 for ease of use.
Sets the time based on an integer value, as the one internally stored in the time object itself. See the int GetTime() method too.
Gets a time in its basic components hours, minutes, seconds.
Gets a time in its basic components hours, minutes, seconds and ten-thousandths of a second.
Returns the internal integer representing the time value. Usefull for some time arithmetic.
Return the hour, minute, second, subsecond value of the Time. Subseconds are actually ten-thousandths of seconds.
The default constructructor builds an empty time (midnight), same as if Clear() was called on an existing time.
Similarly to the SetTime(int) method, this form of the constructor builds a time out of the internal representation of another one.
Similarly to the SetTime(int, int, int, int = 0) method, this form of the constructor builds a time our of its basic components (hour, minute, second and optionally ten-thousandths of a second).
Ordinary copy constructor. To make the Time a good citizen of your code.
To assign a time from another one.
To assign a time from the time portion of a Timestamp object.
To compare two Times for equality.
To compare if one Time is strictly 'lower' (the time is before) the other.