RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
Represents an duration of time (e.g. 5 hours, 43 minutes, and 21 seconds) as opposed to a point in time. More...
#include <DateTime.hpp>
Public Member Functions | |
TimeDuration (int64_t in_hours=0, int64_t in_minutes=0, int64_t in_seconds=0, int64_t in_microseconds=0) | |
Constructor. More... | |
TimeDuration (const TimeDuration &in_other) | |
Copy constructor. More... | |
TimeDuration (TimeDuration &&in_other) noexcept | |
Move constructor. More... | |
~TimeDuration ()=default | |
Destructor. | |
TimeDuration & | operator= (const TimeDuration &in_other) |
Assignment operator. More... | |
TimeDuration & | operator= (TimeDuration &&in_other) noexcept |
Move operator. More... | |
bool | operator== (const TimeDuration &in_other) const |
Equality comparison operator. More... | |
bool | operator!= (const TimeDuration &in_other) const |
Inequality comparison operator. More... | |
bool | operator< (const TimeDuration &in_other) const |
Less-than comparison operator. More... | |
bool | operator<= (const TimeDuration &in_other) const |
Less-than-equal comparison operator. More... | |
bool | operator> (const TimeDuration &in_other) const |
Greater-than comparison operator. More... | |
bool | operator>= (const TimeDuration &in_other) const |
Greater-than-equal comparison operator. More... | |
bool | isInfinity () const |
Checks whether this TimeDuration represents "any amount of time". More... | |
int64_t | getHours () const |
Gets the number of hours in this TimeDuration. More... | |
int64_t | getMinutes () const |
Gets the number of minutes in this TimeDuration. More... | |
int64_t | getSeconds () const |
Gets the number of seconds in this TimeDuration. More... | |
int64_t | getMicroseconds () const |
Gets the number of days in this TimeDuration. More... | |
Static Public Member Functions | |
static TimeDuration | Infinity () |
Constructs a TimeDuration which represents "any amount of time". Use with caution. More... | |
static TimeDuration | Hours (int64_t in_hours) |
Constructs an TimeDuration which represents the specified number of hours. More... | |
static TimeDuration | Minutes (int64_t in_minutes) |
Constructs an TimeDuration which represents the specified number of minutes. More... | |
static TimeDuration | Seconds (int64_t in_seconds) |
Constructs an TimeDuration which represents the specified number of seconds. More... | |
static TimeDuration | Microseconds (int64_t in_microseconds) |
Constructs an TimeDuration which represents the specified number of microseconds. More... | |
Friends | |
class | DateTime |
Represents an duration of time (e.g. 5 hours, 43 minutes, and 21 seconds) as opposed to a point in time.
|
explicit |
Constructor.
in_hours | The number of hours in this TimeDuration. |
in_minutes | The number of minutes in this TimeDuration. |
in_seconds | The number of seconds in this TimeDuration. |
in_microseconds | The number of microseconds in this TimeDuration. |
rstudio::launcher_plugins::system::TimeDuration::TimeDuration | ( | const TimeDuration & | in_other | ) |
Copy constructor.
in_other | The TimeDuration to copy into this TimeDuration. |
|
noexcept |
Move constructor.
in_other | The TimeDuration to move into this TimeDuration. |
int64_t rstudio::launcher_plugins::system::TimeDuration::getHours | ( | ) | const |
Gets the number of hours in this TimeDuration.
int64_t rstudio::launcher_plugins::system::TimeDuration::getMicroseconds | ( | ) | const |
Gets the number of days in this TimeDuration.
int64_t rstudio::launcher_plugins::system::TimeDuration::getMinutes | ( | ) | const |
Gets the number of minutes in this TimeDuration.
int64_t rstudio::launcher_plugins::system::TimeDuration::getSeconds | ( | ) | const |
Gets the number of seconds in this TimeDuration.
|
static |
Constructs an TimeDuration which represents the specified number of hours.
in_hours | The number of hours which should be represented by the TimeDuration. |
|
static |
Constructs a TimeDuration which represents "any amount of time". Use with caution.
bool rstudio::launcher_plugins::system::TimeDuration::isInfinity | ( | ) | const |
Checks whether this TimeDuration represents "any amount of time".
|
static |
Constructs an TimeDuration which represents the specified number of microseconds.
in_microseconds | The number of microseconds which should be represented by the TimeDuration. |
|
static |
Constructs an TimeDuration which represents the specified number of minutes.
in_minutes | The number of minutes which should be represented by the TimeDuration. |
bool rstudio::launcher_plugins::system::TimeDuration::operator!= | ( | const TimeDuration & | in_other | ) | const |
Inequality comparison operator.
in_other | The TimeDuration to compare against. |
bool rstudio::launcher_plugins::system::TimeDuration::operator< | ( | const TimeDuration & | in_other | ) | const |
Less-than comparison operator.
in_other | The TimeDuration to compare against. |
bool rstudio::launcher_plugins::system::TimeDuration::operator<= | ( | const TimeDuration & | in_other | ) | const |
Less-than-equal comparison operator.
in_other | The TimeDuration to compare against. |
TimeDuration& rstudio::launcher_plugins::system::TimeDuration::operator= | ( | const TimeDuration & | in_other | ) |
Assignment operator.
in_other | The TimeDuration to copy into this TimeDuration. |
|
noexcept |
Move operator.
in_other | The TimeDuration to move into this TimeDuration. |
bool rstudio::launcher_plugins::system::TimeDuration::operator== | ( | const TimeDuration & | in_other | ) | const |
Equality comparison operator.
in_other | The TimeDuration to compare against. |
bool rstudio::launcher_plugins::system::TimeDuration::operator> | ( | const TimeDuration & | in_other | ) | const |
Greater-than comparison operator.
in_other | The TimeDuration to compare against. |
bool rstudio::launcher_plugins::system::TimeDuration::operator>= | ( | const TimeDuration & | in_other | ) | const |
Greater-than-equal comparison operator.
in_other | The TimeDuration to compare against. |
|
static |
Constructs an TimeDuration which represents the specified number of seconds.
in_seconds | The number of seconds which should be represented by the TimeDuration. |