RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_DATE_TIME_HPP
25 #define LAUNCHER_PLUGINS_DATE_TIME_HPP
32 namespace launcher_plugins {
39 namespace launcher_plugins {
61 int64_t in_minutes = 0,
62 int64_t in_seconds = 0,
63 int64_t in_microseconds = 0);
238 PRIVATE_IMPL(m_impl);
273 DateTime(std::time_t& in_time) noexcept;
439 std::string
toString(
const char* in_format)
const;
449 std::string
toString(
const std::string& in_format)
const;
453 PRIVATE_IMPL(m_impl);
static TimeDuration Infinity()
Constructs a TimeDuration which represents "any amount of time". Use with caution.
bool operator>=(const DateTime &in_other) const
Less than operator.
bool operator!=(const TimeDuration &in_other) const
Inequality comparison operator.
static TimeDuration Minutes(int64_t in_minutes)
Constructs an TimeDuration which represents the specified number of minutes.
int64_t getHours() const
Gets the number of hours in this TimeDuration.
int64_t getSeconds() const
Gets the number of seconds in this TimeDuration.
~TimeDuration()=default
Destructor.
int64_t getMinutes() const
Gets the number of minutes in this TimeDuration.
DateTime & operator+=(const TimeDuration &in_intervalTime)
Adds the given TimeDuration to this DateTime.
bool operator<=(const DateTime &in_other) const
Less than operator.
bool operator>(const TimeDuration &in_other) const
Greater-than comparison operator.
int64_t getMicroseconds() const
Gets the number of days in this TimeDuration.
bool operator>=(const TimeDuration &in_other) const
Greater-than-equal comparison operator.
std::string toString() const
Converts this DateTime to an ISO 8601 time string.
TimeDuration(int64_t in_hours=0, int64_t in_minutes=0, int64_t in_seconds=0, int64_t in_microseconds=0)
Constructor.
bool operator>(const DateTime &in_other) const
Less than operator.
static Error fromString(const std::string &in_timeStr, DateTime &out_dateTime)
Constructs a DateTime by calling FromString and passing the default ISO 8601 string reperesentation....
Class which represents a date and time in UTC.
Definition: DateTime.hpp:244
Class which represents an error.
Definition: Error.hpp:174
DateTime & operator=(const DateTime &in_other)
Assignment operator.
bool operator==(const TimeDuration &in_other) const
Equality comparison operator.
TimeDuration operator-(const DateTime &in_other) const
Subtracts two DateTimes to produce an TimeDuration.
Represents an duration of time (e.g. 5 hours, 43 minutes, and 21 seconds) as opposed to a point in ti...
Definition: DateTime.hpp:48
static TimeDuration Hours(int64_t in_hours)
Constructs an TimeDuration which represents the specified number of hours.
DateTime & operator-=(const TimeDuration &in_intervalTime)
Subtracts the given TimeDuration from this DateTime.
static TimeDuration Seconds(int64_t in_seconds)
Constructs an TimeDuration which represents the specified number of seconds.
DateTime operator+(const TimeDuration &in_intervalTime) const
Adds the given TimeDuration to a copy of this DateTime.
static TimeDuration Microseconds(int64_t in_microseconds)
Constructs an TimeDuration which represents the specified number of microseconds.
TimeDuration & operator=(const TimeDuration &in_other)
Assignment operator.
bool operator==(const DateTime &in_other) const
Equality operator.
bool operator!=(const DateTime &in_other) const
Inequality operator.
bool operator<=(const TimeDuration &in_other) const
Less-than-equal comparison operator.
bool operator<(const TimeDuration &in_other) const
Less-than comparison operator.
bool operator<(const DateTime &in_other) const
Less than operator.
bool isInfinity() const
Checks whether this TimeDuration represents "any amount of time".