IT_Bus::DateTime Class Reference

#include <it_bus/date_time.h>

List of all members.


Detailed Description

Base class for generated classes derived from xsd:dateTime type definitions within a WSDL or XSD file.

This class is not derived from IT_Bus::AnySimpleType.

Definition at line 28 of file date_time.h.

Public Member Functions

 DateTime ()
 Default constructor.
 DateTime (short wYear, short wMonth, short wDay, short wHour=0, short wMinute=0, short wSecond=0, short wMilliseconds=0) throw ((Exception))
 Constructor.
 DateTime (const char *value) throw ((Exception))
 Constructor.
 DateTime (const String &value) throw ((Exception))
 Constructor.
 DateTime (const DateTime &copy)
 Copy constructor.
 ~DateTime ()
 Destructor.
DateTimeoperator= (const DateTime &rhs)
 Assignment operator.
String to_string () const
 Returns a string representation of the date.
void from_string (const String &str) throw ((Exception))
 Initializes this instance with the date corresponding to the string argument.
short getYear () const
 Returns a numeric value for the year corresponding to the date this instance represents.
void setYear (short wYear) throw ((Exception))
 Sets the value for the year to the numeric value supplied as an argument.
short getMonth () const
 Returns a numeric value for the month corresponding to the date this instance represents.
void setMonth (short wMonth) throw ((Exception))
 Sets the value for the month to the numeric value supplied as an argument.
short getDay () const
 Returns a numeric value for the day corresponding to the date this instance represents.
void setDay (short wDay) throw ((Exception))
 Sets the value for the day to the numeric value supplied as an argument.
short getHour () const
 Returns a numeric value for the hour corresponding to the date 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 date 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 second corresponding to the date this instance represents.
void setSecond (short wSecond) throw ((Exception))
 Sets the value for the second to the numeric value supplied as an argument.
short getMilliseconds () const
 Returns a numeric value for the milliseconds corresponding to the date 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 DateTime &rhs) const
 Equality operator.
bool operator!= (const DateTime &rhs) const
 Inequality operator.
DateTimeoperator+= (const Duration &rhs) throw ((IT_Bus::Exception))
 Duration addition with assignment operator.
DateTimeoperator-= (const Duration &rhs) throw ((IT_Bus::Exception))
 Duration subtraction with assignment operator.

Static Public Member Functions

static DateTime current () throw ((Exception))
 Return a DateTime instance initialized to the current UTC time.

Private Attributes

DateTimeImpl * m_impl

Friends

class TimeConverter


Constructor & Destructor Documentation

IT_Bus::DateTime::DateTime ( short  wYear,
short  wMonth,
short  wDay,
short  wHour = 0,
short  wMinute = 0,
short  wSecond = 0,
short  wMilliseconds = 0 
) throw ((Exception))

Constructor.

Parameters:
wYear the year, including the century
wMonth the month (1-12)
wDay the day of the month
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
Exceptions:
Exception 

IT_Bus::DateTime::DateTime ( const char *  value  )  throw ((Exception))

Constructor.

Parameters:
value string representation of a dateTime instance
Exceptions:
Exception 

IT_Bus::DateTime::DateTime ( const String value  )  throw ((Exception))

Constructor.

Parameters:
value string representation of a dateTime instance
Exceptions:
Exception 


Member Function Documentation

String IT_Bus::DateTime::to_string (  )  const

Returns a string representation of the date.

Returns:
String representation of the date.

void IT_Bus::DateTime::from_string ( const String str  )  throw ((Exception))

Initializes this instance with the date corresponding to the string argument.

Parameters:
String representation of the date.

short IT_Bus::DateTime::getYear (  )  const

Returns a numeric value for the year corresponding to the date this instance represents.

Returns:
short value for the year.

void IT_Bus::DateTime::setYear ( short  wYear  )  throw ((Exception))

Sets the value for the year to the numeric value supplied as an argument.

Parameters:
short representing the year.

short IT_Bus::DateTime::getMonth (  )  const

Returns a numeric value for the month corresponding to the date this instance represents.

Returns:
short value for the month.

void IT_Bus::DateTime::setMonth ( short  wMonth  )  throw ((Exception))

Sets the value for the month to the numeric value supplied as an argument.

Parameters:
short representing the month.

short IT_Bus::DateTime::getDay (  )  const

Returns a numeric value for the day corresponding to the date this instance represents.

Returns:
short value for the day.

void IT_Bus::DateTime::setDay ( short  wDay  )  throw ((Exception))

Sets the value for the day to the numeric value supplied as an argument.

Parameters:
short representing the day.

short IT_Bus::DateTime::getHour (  )  const

Returns a numeric value for the hour corresponding to the date this instance represents.

Returns:
short value for the hour.

void IT_Bus::DateTime::setHour ( short  wHour  )  throw ((Exception))

Sets the value for the hour to the numeric value supplied as an argument.

Parameters:
short representing the hour.

short IT_Bus::DateTime::getMinute (  )  const

Returns a numeric value for the minute corresponding to the date this instance represents.

Returns:
short value for the minute.

void IT_Bus::DateTime::setMinute ( short  wMinute  )  throw ((Exception))

Sets the value for the minute to the numeric value supplied as an argument.

Parameters:
short representing the minut.

short IT_Bus::DateTime::getSecond (  )  const

Returns a numeric value for the second corresponding to the date this instance represents.

Returns:
short value for the second.

void IT_Bus::DateTime::setSecond ( short  wSecond  )  throw ((Exception))

Sets the value for the second to the numeric value supplied as an argument.

Parameters:
short representing the second.

short IT_Bus::DateTime::getMilliseconds (  )  const

Returns a numeric value for the milliseconds corresponding to the date this instance represents.

Returns:
short value for the milliseconds.

void IT_Bus::DateTime::setMilliseconds ( short  wMilliseconds  )  throw ((Exception))

Sets the value for the milliseconds to the numeric value supplied as an argument.

Parameters:
short representing the milliseconds.

bool IT_Bus::DateTime::haveUTCTimeZoneOffset (  )  const

Returns a bool indicating whether the instance has the UTC time zone offset set.

Returns:
bool indicating whether the offset is set.

void IT_Bus::DateTime::setUTCTimeZoneOffset ( short  hour_offset,
short  minute_offset 
) throw ((Exception))

Set the UTC time zone offset to the values supplied as arguments.

Parameters:
short numeric value for the hour offset.
short numeric value for the minute offset.

void IT_Bus::DateTime::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::DateTime::operator== ( const DateTime rhs  )  const

Equality operator.

Compares two dates.

bool IT_Bus::DateTime::operator!= ( const DateTime rhs  )  const

Inequality operator.

Compares two dates.


Generated on Tue Mar 20 15:28:00 2007 for Artix by  doxygen 1.5.1-p1