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) IT_THROW_DECL((Exception))
 Constructor.
 DateTime (const char *value) IT_THROW_DECL((Exception))
 Constructor.
 DateTime (const String &value) IT_THROW_DECL((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) IT_THROW_DECL((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) IT_THROW_DECL((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) IT_THROW_DECL((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) IT_THROW_DECL((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) 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 date 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 second corresponding to the date this instance represents.
void setSecond (short wSecond) IT_THROW_DECL((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) 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 DateTime &rhs) const
 Equality operator.
bool operator!= (const DateTime &rhs) const
 Inequality operator.

Static Public Member Functions

DateTime &operator+=(const
Duration 
current () IT_THROW_DECL((Exception))&rhs) IT_THROW_DECL((IT_Bus DateTime &static operator-=(const Duration &rhs) IT_THROW_DECL((IT_Bus DateTime
 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 
)

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  ) 

Constructor.

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

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

Constructor.

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


Member Function Documentation

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

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

Parameters:
String representation of the date.

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.

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.

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.

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.

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.

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::getUTCTimeZoneOffset ( short &  hour_offset,
short &  minute_offset 
) const

Obtain the UTC time zone offset values.

The values are returned through the method arguments.

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.

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.

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

Inequality operator.

Compares two dates.

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

Equality operator.

Compares two dates.

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

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

Parameters:
short representing the day.

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

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

Parameters:
short representing the hour.

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

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

Parameters:
short representing the milliseconds.

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

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

Parameters:
short representing the minut.

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

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

Parameters:
short representing the month.

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

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

Parameters:
short representing the second.

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

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::setYear ( short  wYear  ) 

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

Parameters:
short representing the year.

String IT_Bus::DateTime::to_string (  )  const

Returns a string representation of the date.

Returns:
String representation of the date.


Generated on Thu Sep 7 11:39:51 2006 for Artix by  doxygen 1.4.7