7#ifndef __HDI_CORE_TIME__
8#define __HDI_CORE_TIME__
53 explicit Time(
const int32_t secsSinceMN_);
66 explicit Time(
const double secsSinceMN_);
79 Time(
const std::string& time_);
94 Time(
const int16_t hour_,
const int16_t min_,
const int16_t sec_ = 0,
const int32_t us_ = 0);
267 virtual std::string
format(
const std::string& format_ =
"H:i:s")
const;
388 Time(
const plat::Time&);
391 typedef std::unique_ptr<Time> TimeUP;
392 typedef std::shared_ptr<Time> TimeSP;
393 typedef std::weak_ptr<Time> TimeWP;
Allows for acquisition and manipulation of a date (day of year) and time (of day)
Definition: hdicoreDateTime.h:26
Allows for acquisition and manipulation of a duration of time.
Definition: hdicoreDuration.h:25
Allows for acquisition and manipulation of a time (of day)
Definition: hdicoreTime.h:25
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,...
virtual ~Time()
Destructs a Time object.
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 greater-than operator to determine if one Time object is later in the day than the other.
virtual double secondsSinceMidnight() const
Gets the number of seconds, since midnight, represented by the target.
virtual int16_t second() const
Gets the second of the minute represented by the target.
virtual Time operator-(const Duration &rhs_) const
Overloaded substraction operator to determine the resultant time before the target.
virtual void setHour(const int16_t hour_)
Sets the hour that the target should represent.
virtual void setMicrosecond(const int32_t us_)
Sets the microsecond of the second represented by the target.
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,...
virtual bool operator!=(const Time &rhs_) const
Overloaded inequality operator to determine if two Time objects differ.
virtual int16_t hour() const
Gets the hour represented by the target.
static Time Current(const bool us_=false)
Constructs a Time object from the current system time.
virtual int32_t microsecond() const
Gets the microsecond of the second represented by the target.
virtual int16_t minute() const
Gets the minute of the hour represented by the target.
virtual void setSecondsSinceMidnight(const double secsSinceMN_)
Sets the number of seconds, since midnight, represented by the target.
Time(const double secsSinceMN_)
Constructs a Time object with an offset from midnight in seconds.
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 Time & operator=(const Time &rhs_)
Overloaded assignment operator to copy values from one Time object to another.
virtual Time operator+(const Duration &rhs_) const
Overloaded addition operator to determine the resultant time after the target.
virtual Duration operator-(const Time &rhs_) const
Overloaded subtraction operator to determine the duration between two Time objects.
Time()
Constructs a Time object with a default value (midnight, 0:00)
Time(const std::string &time_)
Constructs a Time object from a string representation of time.
Time(const Time &t_)
Constructs a Time object from another existing Time object.
virtual std::string format(const std::string &format_="H:i:s") const
Formats the target Time object into a string representation.
virtual Time & operator-=(const Duration &rhs_)
Overloaded subtraction-assignment operator to determine and assign the resultant time before the init...
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.
Time(const int32_t secsSinceMN_)
Constructs a Time object with an offset from midnight in seconds.
virtual void setMinute(const int16_t min_)
Sets the minute of the hour represented by the target.
virtual void setSecond(const int16_t sec_)
Sets the second of the minute represented by the target.
virtual Time & operator+=(const Duration &rhs_)
Overloaded addition-assignment operator to determine and assign the resultant time after the initial ...
Header file for handling a duration of time.
hdi::core::Time operator+(const hdi::core::Duration &lhs_, const hdi::core::Time &rhs_)
Adds a duration to a time of day.