Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Allows for acquisition and manipulation of a time (of day) More...
#include <hdicoreTime.h>
Public Member Functions | |
Time () | |
Constructs a Time object with a default value (midnight, 0:00) | |
Time (const Time &t_) | |
Constructs a Time object from another existing Time object. | |
Time (const int32_t secsSinceMN_) | |
Constructs a Time object with an offset from midnight in seconds. | |
Time (const double secsSinceMN_) | |
Constructs a Time object with an offset from midnight in seconds. | |
Time (const std::string &time_) | |
Constructs a Time object from a string representation of time. | |
Time (const int16_t hour_, const int16_t min_, const int16_t sec_=0, const int32_t us_=0) | |
Constructs a Time object from a given hour, minute, second, and microsecond. | |
virtual | ~Time () |
Destructs a Time object. | |
virtual Time & | operator= (const Time &rhs_) |
Overloaded assignment operator to copy values from one Time object to another. | |
virtual bool | operator== (const Time &rhs_) const |
Overloaded equality operator to determine if two Time objects are equal. | |
virtual bool | operator!= (const Time &rhs_) const |
Overloaded inequality operator to determine if two Time objects differ. | |
virtual bool | operator< (const Time &rhs_) const |
Overloaded less-than operator to determine if one Time object is earlier in the day than the other. | |
virtual bool | operator<= (const Time &rhs_) const |
Overloaded less-than-or-equal operator to determine if one Time object is earlier in the day than, or equal to, the other. | |
virtual bool | operator> (const Time &rhs_) const |
Overloaded greater-than operator to determine if one Time object is later in the day than the other. | |
virtual bool | operator>= (const Time &rhs_) const |
Overloaded greater-than-or-equal operator to determine if one Time object is later in the day than, or equal to, the other. | |
virtual Duration | operator- (const Time &rhs_) const |
Overloaded subtraction operator to determine the duration between two Time objects. | |
virtual Time | operator- (const Duration &rhs_) const |
Overloaded substraction operator to determine the resultant time before the target. | |
virtual Time & | operator-= (const Duration &rhs_) |
Overloaded subtraction-assignment operator to determine and assign the resultant time before the initial target. | |
virtual Time | operator+ (const Duration &rhs_) const |
Overloaded addition operator to determine the resultant time after the target. | |
virtual Time & | operator+= (const Duration &rhs_) |
Overloaded addition-assignment operator to determine and assign the resultant time after the initial target. | |
virtual std::string | format (const std::string &format_="H:i:s") const |
Formats the target Time object into a string representation. | |
virtual int16_t | hour () const |
Gets the hour represented by the target. | |
virtual void | setHour (const int16_t hour_) |
Sets the hour that the target should represent. | |
virtual int16_t | minute () const |
Gets the minute of the hour represented by the target. | |
virtual void | setMinute (const int16_t min_) |
Sets the minute of the hour represented by the target. | |
virtual int16_t | second () const |
Gets the second of the minute represented by the target. | |
virtual void | setSecond (const int16_t sec_) |
Sets the second of the minute represented by the target. | |
virtual int32_t | microsecond () const |
Gets the microsecond of the second represented by the target. | |
virtual void | setMicrosecond (const int32_t us_) |
Sets the microsecond of the second represented by the target. | |
virtual double | secondsSinceMidnight () const |
Gets the number of seconds, since midnight, represented by the target. | |
virtual void | setSecondsSinceMidnight (const double secsSinceMN_) |
Sets the number of seconds, since midnight, represented by the target. | |
Static Public Member Functions | |
static Time | Current (const bool us_=false) |
Constructs a Time object from the current system time. | |
Friends | |
class | DateTime |
Allows for acquisition and manipulation of a time (of day)
hdi::core::Time::Time | ( | ) |
Constructs a Time object with a default value (midnight, 0:00)
hdi::core::Time::Time | ( | const Time & | t_ | ) |
|
explicit |
Constructs a Time object with an offset from midnight in seconds.
secsSinceMN_ | Number of seconds since midnight, in the range [0,86400] |
|
explicit |
Constructs a Time object with an offset from midnight in seconds.
secsSinceMN_ | Number of seconds since midnight, in the range [0.0,86400.0] |
hdi::core::Time::Time | ( | const std::string & | time_ | ) |
Constructs a Time object from a string representation of time.
time_ | String representation of a time of day, in 24-hour format |
hdi::core::Time::Time | ( | const int16_t | hour_, |
const int16_t | min_, | ||
const int16_t | sec_ = 0 , |
||
const int32_t | us_ = 0 |
||
) |
Constructs a Time object from a given hour, minute, second, and microsecond.
hour_ | Hour of the day, in the range [0,23] |
min_ | Minute of the given hour, in the range [0,59] |
sec_ | Second of the given minute, in the range [0,59] |
us_ | Microsecond of the given second, in the range [0,999999] |
|
virtual |
Destructs a Time object.
|
static |
|
virtual |
Formats the target Time object into a string representation.
format_ | Input string representing the format for the output string |
|
virtual |
Gets the hour represented by the target.
|
virtual |
Gets the microsecond of the second represented by the target.
|
virtual |
Gets the minute of the hour represented by the target.
|
virtual |
Overloaded addition operator to determine the resultant time after the target.
rhs_ | Righthand side of the operator, Duration object to add to the lefthand side |
Overloaded addition-assignment operator to determine and assign the resultant time after the initial target.
rhs_ | Righthand side of the operator, Duration object to add to the lefthand side |
Overloaded substraction operator to determine the resultant time before the target.
rhs_ | Righthand side of the operator, Duration object to substract from the lefthand side |
Overloaded subtraction-assignment operator to determine and assign the resultant time before the initial target.
rhs_ | Righthand side of the operator, Duration object to substract from the lefthand side |
|
virtual |
Overloaded less-than operator to determine if one Time object is earlier in the day than the other.
rhs_ | Righthand side of the operator; Time object that might be later in the day than the target (i.e. lefthand side) |
|
virtual |
Overloaded less-than-or-equal operator to determine if one Time object is earlier in the day than, or equal to, the other.
rhs_ | Righthand side of the operator; Time object that might be later in the day than, or equal to, the target (i.e. lefthand side) |
|
virtual |
|
virtual |
Overloaded greater-than operator to determine if one Time object is later in the day than the other.
rhs_ | Righthand side of the operator; Time object that might be earlier in the day than the target (i.e. lefthand side) |
|
virtual |
Overloaded greater-than-or-equal operator to determine if one Time object is later in the day than, or equal to, the other.
rhs_ | Righthand side of the operator; Time object that might be earlier in the day than, or equal to, the target (i.e. lefthand side) |
|
virtual |
Gets the second of the minute represented by the target.
|
virtual |
Gets the number of seconds, since midnight, represented by the target.
|
virtual |
Sets the hour that the target should represent.
hour_ | Hour of day, in 24-hour format, in range [0,23] |
|
virtual |
Sets the microsecond of the second represented by the target.
us_ | Microsecond of the second, in range [0,999999] |
|
virtual |
Sets the minute of the hour represented by the target.
min_ | Minute of the hour, in range [0,59] |
|
virtual |
Sets the second of the minute represented by the target.
sec_ | Second of the minute, in range [0,59] |
|
virtual |
Sets the number of seconds, since midnight, represented by the target.
secsSinceMN_ | Seconds since midnight, in range [0.0,86400.0] |