Value‐semantic type representing the time of day to microsecond resolution.
Synopsis
Declared in <bdlt_time.h>
class Time;
Description
This class implements a value‐semantic type that represents the time of day to a resolution of one microsecond. Each object of this (almost) simply constrained attribute class always represents a valid time value to a resolution of one microsecond. The valid range for times is 00:00:00.000000 through 23:59:59.999999, except that 24:00:00.000000 represents the default‐constructed value. The value 24:00:00.000000 behaves, in most cases, as if it were the value 00:00:00.000000; however, for all relational comparison operators, 24:00:00.000000 is not a valid argument and, therefore, would result in undefined behavior. Each add operation on a Time object returns the (signed) number of times that the 23:59:59.999999 ‐ 00:00:00.000000 boundary was crossed while performing the operation. Attempting to construct a Time with any attribute outside its valid range (or with an hour attribute value of 24 and any other attribute non‐zero) has undefined behavior.
Member Functions
Name |
Description |
|
Constructors |
Assign to this time object the value of the specified |
|
Increase this time by |
|
Increase this time by |
|
Increase this time by |
|
Increase this time by |
|
Increase this time by |
|
Increase this time by |
|
Add the specified signed time fields; return midnight‐boundary crossings. |
|
Assign to this object the value read from the specified input stream. |
|
Write this object to the specified output stream using BDEX. |
|
Load the time‐of‐day attributes of this object into the given addresses. |
|
Return the value of the |
|
Return the value of the |
|
Return the value of the |
|
Return the value of the |
|
Add to this time object the value of the specified |
|
Subtract from this time object the value of the specified |
|
Write this time to the specified output stream in a human‐readable form. |
|
Write a textual representation of this time into |
|
Return the value of the |
|
Set the hour attribute of this time object. |
|
Set the hour attribute if it is in range; otherwise do nothing. |
|
Set the microsecond attribute of this time object. |
|
Set the microsecond attribute if it is in range; otherwise do nothing. |
|
Set the millisecond attribute of this time object. |
|
Set the millisecond attribute if it is in range; otherwise do nothing. |
|
Set the minute attribute of this time object. |
|
Set the minute attribute if it is in range; otherwise do nothing. |
|
Set the second attribute of this time object. |
|
Set the second attribute if it is in range; otherwise do nothing. |
|
Set this time from the specified time‐of‐day fields. |
|
Set this time from fields if they form a valid value; otherwise do nothing. |
|
Format this time to the specified output |
|
Set this time from fields if they form a valid value; otherwise do nothing. |
Static Member Functions
Name |
Description |
Return |
|
|
|
Return the most current BDEX streaming version number supported by this class. |
Friends
Name |
Description |
Invoke the specified |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return a |
Non-Member Functions
Name |
Description |
Return a |
|
Return a |
|
Return a |
|
Return |
Created with MrDocs