activemq-cpp-3.6.0
|
Wrapper class around a time value in milliseconds. More...
#include <src/main/decaf/util/Date.h>
Public Member Functions | |
Date () | |
Default constructor - sets time to the current System time, rounded to the nearest millisecond. | |
Date (long long milliseconds) | |
Constructs the date with a given time value. | |
Date (const Date &source) | |
Copy constructor. | |
Date & | operator= (const Date &value) |
Assigns the value of one Date object to another. | |
virtual | ~Date () |
long long | getTime () const |
Gets the underlying time. | |
void | setTime (long long milliseconds) |
Sets the underlying time. | |
bool | after (const Date &when) const |
Determines whether or not this date falls after the specified time. | |
bool | before (const Date &when) const |
Determines whether or not this date falls before the specified time. | |
std::string | toString () const |
Converts this Date object to a String of the form: | |
virtual int | compareTo (const Date &value) const |
virtual bool | equals (const Date &value) const |
virtual bool | operator== (const Date &value) const |
virtual bool | operator< (const Date &value) const |
![]() | |
virtual | ~Comparable () |
virtual int | compareTo (const Date &value) const =0 |
Compares this object with the specified object for order. | |
virtual bool | equals (const Date &value) const =0 |
virtual bool | operator== (const Date &value) const =0 |
Compares equality between this object and the one passed. | |
virtual bool | operator< (const Date &value) const =0 |
Compares this object to another and returns true if this object is considered to be less than the one passed. |
Wrapper class around a time value in milliseconds.
This class is comparable to Java's java.util.Date class.
decaf::util::Date::Date | ( | ) |
Default constructor - sets time to the current System time, rounded to the nearest millisecond.
decaf::util::Date::Date | ( | long long | milliseconds | ) |
Constructs the date with a given time value.
milliseconds | The time in milliseconds; |
Copy constructor.
source | The Date instance to copy into this one. |
|
virtual |
Determines whether or not this date falls after the specified time.
when | The date to compare |
Determines whether or not this date falls before the specified time.
when | The date to compare |
long long decaf::util::Date::getTime | ( | ) | const |
Gets the underlying time.
void decaf::util::Date::setTime | ( | long long | milliseconds | ) |
Sets the underlying time.
milliseconds | The underlying time value in milliseconds. |
std::string decaf::util::Date::toString | ( | ) | const |
Converts this Date object to a String of the form:
dow mon dd hh:mm:ss zzz yyyy
where: