#include <it_bus/time.h>
Inheritance diagram for IT_Bus::Time:
Definition at line 27 of file time.h.
Public Types | |
typedef IT_Reflect::ValueRef< IT_Bus::Time > | IT_ReflectionType |
Public Member Functions | |
Time (short wHour=0, short wMinute=0, short wSecond=0, short wMilliseconds=0) IT_THROW_DECL((Exception)) | |
Constructor. | |
Time (const char *value) IT_THROW_DECL((Exception)) | |
Constructor. | |
Time (const String &value) IT_THROW_DECL((Exception)) | |
Constructor. | |
Time (const Time ©) | |
Copy constructor. | |
virtual | ~Time () |
Destructor. | |
virtual AnyType & | copy (const AnyType &rhs) |
Return a reference to a copy of the Time value provided as the argument. | |
virtual const QName & | get_type () const |
Returns the IT_Bus::AnyType::Kind for the type. | |
void | from_string (const String &str) IT_THROW_DECL((Exception)) |
Initializes this instance with the time corresponding to the string argument. | |
short | getHour () const |
Returns a numeric value for the hour corresponding to the time this instance represents. | |
void | setHour (short wHour) IT_THROW_DECL((Exception)) |
Sets the value for the hour to the numeric value supplied as an argument. | |
short | getMinute () const |
Returns a numeric value for the minute corresponding to the time this instance represents. | |
void | setMinute (short wMinute) IT_THROW_DECL((Exception)) |
Sets the value for the minute to the numeric value supplied as an argument. | |
short | getSecond () const |
Returns a numeric value for the seconds corresponding to the time this instance represents. | |
void | setSecond (short wSecond) IT_THROW_DECL((Exception)) |
Sets the value for the seconds to the numeric value supplied as an argument. | |
short | getMilliseconds () const |
Returns a numeric value for the milliseconds corresponding to the time this instance represents. | |
void | setMilliseconds (short wMilliseconds) IT_THROW_DECL((Exception)) |
Sets the value for the milliseconds to the numeric value supplied as an argument. | |
bool | haveUTCTimeZoneOffset () const |
Returns a bool indicating whether the instance has the UTC time zone offset set. | |
void | setLocalTimeZone () |
Set the instance to the local time zone. | |
void | setUTCTimeZoneOffset (short hour_offset, short minute_offset) IT_THROW_DECL((Exception)) |
Set the UTC time zone offset to the values supplied as arguments. | |
void | getUTCTimeZoneOffset (short &hour_offset, short &minute_offset) const |
Obtain the UTC time zone offset values. | |
bool | operator== (const Time &other) const |
Equality operator. | |
bool | operator!= (const Time &other) const |
Inequality operator. | |
Time & | operator= (const Time &rhs) |
Assignment operator. | |
Static Public Member Functions | |
Time &operator+=(const Duration | get_static_type ()&rhs) IT_THROW_DECL((IT_Bus Time &static operator-=(const Duration &rhs) IT_THROW_DECL((IT_Bus const QName & |
Duration subtraction with assignment operator. | |
Public Attributes | |
virtual IT_Reflect::Reflection *virtual get_reflection() IT_THROW_DECL((IT_Reflect const IT_Reflect::Reflection *get_reflection() const IT_THROW_DECL((IT_Reflect Strin | to_string )() const |
Returns a string representation of the time. | |
Private Attributes | |
TimeImpl * | m_impl |
IT_Bus::Time::Time | ( | short | wHour = 0 , |
|
short | wMinute = 0 , |
|||
short | wSecond = 0 , |
|||
short | wMilliseconds = 0 | |||
) |
Constructor.
wHour | the hour (0-23). The default is 0 | |
wMinute | the minute (0-59). The default is 0 | |
wSecond | the second (0-59). The default is 0 | |
wMilliseconds | the millisecond (0-999). The default is 0 |
Exception |
IT_Bus::Time::Time | ( | const char * | value | ) |
IT_Bus::Time::Time | ( | const String & | value | ) |
void IT_Bus::Time::from_string | ( | const String & | str | ) |
Initializes this instance with the time corresponding to the string argument.
String | representation of the time. |
virtual const QName& IT_Bus::Time::get_type | ( | ) | const [virtual] |
short IT_Bus::Time::getHour | ( | ) | const |
Returns a numeric value for the hour corresponding to the time this instance represents.
short IT_Bus::Time::getMilliseconds | ( | ) | const |
Returns a numeric value for the milliseconds corresponding to the time this instance represents.
short IT_Bus::Time::getMinute | ( | ) | const |
Returns a numeric value for the minute corresponding to the time this instance represents.
short IT_Bus::Time::getSecond | ( | ) | const |
Returns a numeric value for the seconds corresponding to the time this instance represents.
void IT_Bus::Time::getUTCTimeZoneOffset | ( | short & | hour_offset, | |
short & | minute_offset | |||
) | const |
Obtain the UTC time zone offset values.
The values are returned through the method arguments.
bool IT_Bus::Time::haveUTCTimeZoneOffset | ( | ) | const |
Returns a bool indicating whether the instance has the UTC time zone offset set.
bool IT_Bus::Time::operator!= | ( | const Time & | other | ) | const |
Inequality operator.
Compares two times.
bool IT_Bus::Time::operator== | ( | const Time & | other | ) | const |
Equality operator.
Compares two times.
void IT_Bus::Time::setHour | ( | short | wHour | ) |
Sets the value for the hour to the numeric value supplied as an argument.
short | representing the time. |
void IT_Bus::Time::setMilliseconds | ( | short | wMilliseconds | ) |
Sets the value for the milliseconds to the numeric value supplied as an argument.
short | representing the milliseconds. |
void IT_Bus::Time::setMinute | ( | short | wMinute | ) |
Sets the value for the minute to the numeric value supplied as an argument.
short | representing the minute. |
void IT_Bus::Time::setSecond | ( | short | wSecond | ) |
Sets the value for the seconds to the numeric value supplied as an argument.
short | representing the seconds. |
void IT_Bus::Time::setUTCTimeZoneOffset | ( | short | hour_offset, | |
short | minute_offset | |||
) |
Set the UTC time zone offset to the values supplied as arguments.
short | numeric value for the hour offset. | |
short | numeric value for the minute offset. |
virtual IT_Reflect::Reflection* virtual get_reflection () IT_THROW_DECL((IT_Reflect const IT_Reflect::Reflection* get_reflection () const IT_THROW_DECL((IT_Reflect Strin IT_Bus::Time::to_string)() const |