#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) throw ((Exception)) | |
Constructor. | |
Time (const char *value) throw ((Exception)) | |
Constructor. | |
Time (const String &value) throw ((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 void | write_value (AnySimpleTypeWriter &writer) const throw ((IT_Bus::SerializationException)) |
Write the instance value. | |
virtual void | read_value (AnySimpleTypeReader &reader) throw ((IT_Bus::DeserializationException)) |
Read the value into the instance. | |
virtual AnyType::Kind | get_kind () const |
Returns the IT_Bus::AnyType::Kind for the type. | |
virtual const QName & | get_type () const |
Returns the IT_Bus::AnyType::Kind for the type. | |
virtual IT_Reflect::Reflection * | get_reflection () throw ((IT_Reflect::ReflectException)) |
Return an instance of the IT_Reflect::Reflection type that encapsulates this instance. | |
virtual const IT_Reflect::Reflection * | get_reflection () const throw ((IT_Reflect::ReflectException)) |
Return an instance of the IT_Reflect::Reflection type that encapsulates this instance. | |
String | to_string () const |
Returns a string representation of the time. | |
void | from_string (const String &str) throw ((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) throw ((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) throw ((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) throw ((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) throw ((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) throw ((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. | |
Time & | operator+= (const Duration &rhs) throw ((IT_Bus::Exception)) |
Duration addition with assignment operator. | |
Time & | operator-= (const Duration &rhs) throw ((IT_Bus::Exception)) |
Duration subtraction with assignment operator. | |
Private Attributes | |
TimeImpl * | m_impl |
IT_Bus::Time::Time | ( | short | wHour = 0 , |
|
short | wMinute = 0 , |
|||
short | wSecond = 0 , |
|||
short | wMilliseconds = 0 | |||
) | throw ((Exception)) |
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 | ) | throw ((Exception)) |
Return a reference to a copy of the Time value provided as the argument.
Reimplemented from IT_Bus::AnyType.
virtual void IT_Bus::Time::write_value | ( | AnySimpleTypeWriter & | writer | ) | const throw ((IT_Bus::SerializationException)) [virtual] |
virtual void IT_Bus::Time::read_value | ( | AnySimpleTypeReader & | reader | ) | throw ((IT_Bus::DeserializationException)) [virtual] |
Read the value into the instance.
Derived classes implement this method.
Implements IT_Bus::AnySimpleType.
virtual AnyType::Kind IT_Bus::Time::get_kind | ( | ) | const [virtual] |
Returns the IT_Bus::AnyType::Kind for the type.
Reimplemented from IT_Bus::AnySimpleType.
virtual const QName& IT_Bus::Time::get_type | ( | ) | const [virtual] |
virtual IT_Reflect::Reflection* IT_Bus::Time::get_reflection | ( | ) | throw ((IT_Reflect::ReflectException)) [virtual] |
Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
IT_Reflect::ReflectException |
Reimplemented from IT_Bus::AnyType.
virtual const IT_Reflect::Reflection* IT_Bus::Time::get_reflection | ( | ) | const throw ((IT_Reflect::ReflectException)) [virtual] |
Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
IT_Reflect::ReflectException |
Reimplemented from IT_Bus::AnyType.
String IT_Bus::Time::to_string | ( | ) | const |
Initializes this instance with the time corresponding to the string argument.
String | representation of the time. |
short IT_Bus::Time::getHour | ( | ) | const |
Returns a numeric value for the hour corresponding to the time this instance represents.
void IT_Bus::Time::setHour | ( | short | wHour | ) | throw ((Exception)) |
Sets the value for the hour to the numeric value supplied as an argument.
short | representing the time. |
short IT_Bus::Time::getMinute | ( | ) | const |
Returns a numeric value for the minute corresponding to the time this instance represents.
void IT_Bus::Time::setMinute | ( | short | wMinute | ) | throw ((Exception)) |
Sets the value for the minute to the numeric value supplied as an argument.
short | representing the minute. |
short IT_Bus::Time::getSecond | ( | ) | const |
Returns a numeric value for the seconds corresponding to the time this instance represents.
void IT_Bus::Time::setSecond | ( | short | wSecond | ) | throw ((Exception)) |
Sets the value for the seconds to the numeric value supplied as an argument.
short | representing the seconds. |
short IT_Bus::Time::getMilliseconds | ( | ) | const |
Returns a numeric value for the milliseconds corresponding to the time this instance represents.
void IT_Bus::Time::setMilliseconds | ( | short | wMilliseconds | ) | throw ((Exception)) |
Sets the value for the milliseconds to the numeric value supplied as an argument.
short | representing the milliseconds. |
bool IT_Bus::Time::haveUTCTimeZoneOffset | ( | ) | const |
Returns a bool indicating whether the instance has the UTC time zone offset set.
void IT_Bus::Time::setUTCTimeZoneOffset | ( | short | hour_offset, | |
short | minute_offset | |||
) | throw ((Exception)) |
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. |
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::operator== | ( | const Time & | other | ) | const |
Equality operator.
Compares two times.
bool IT_Bus::Time::operator!= | ( | const Time & | other | ) | const |
Inequality operator.
Compares two times.