IT_Bus::Duration Class Reference

#include <it_bus/duration.h>

Inheritance diagram for IT_Bus::Duration:

IT_Bus::AnySimpleType IT_Bus::AnyType IT_Bus::ImplementationDetails List of all members.

Detailed Description

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

Definition at line 26 of file duration.h.

Public Types

typedef IT_Reflect::ValueRef<
IT_Bus::Duration
IT_ReflectionType

Public Member Functions

 Duration () throw (())
 Default constructor.
 Duration (bool isNegative, Long years, Long months, Long days, Long hours, Long minutes, Long seconds, Long milliseconds) throw ((Exception))
 Constructor.
 Duration (const char *value) throw ((Exception))
 Constructor.
 Duration (const String &value) throw ((Exception))
 Constructor.
 Duration (const Duration &copy) throw (())
 Copy constructor.
virtual ~Duration ()
 Destructor.
virtual AnyTypecopy (const AnyType &rhs)
 Returns a reference to an AnyType that is a copy of the AnyType parameter.
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 QNameget_type () const
 Returns the IT_Bus::QName for the type.
virtual IT_Reflect::Reflectionget_reflection () throw ((IT_Reflect::ReflectException))
 Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
virtual const IT_Reflect::Reflectionget_reflection () const throw ((IT_Reflect::ReflectException))
 Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
String to_string () const throw (())
 Returns a string representation of the duration.
void from_string (const String &str) throw ((Exception))
 Initializes this instance with the duration corresponding to the string argument.
bool is_zero () const throw (())
 Returns whether or not the duration is zero.
bool is_negative () const throw (())
 Returns whether or not the duration is negative.
bool is_years_set () const throw (())
 Returns whether or not the years item in the duration is set.
bool is_months_set () const throw (())
 Returns whether or not the months item in the duration is set.
bool is_days_set () const throw (())
 Returns whether or not the days item in the duration is set.
bool is_hours_set () const throw (())
 Returns whether or not the hours item in the duration is set.
bool is_minutes_set () const throw (())
 Returns whether or not the minutes item in the duration is set.
bool is_seconds_set () const throw (())
 Returns whether or not the seconds item in the duration is set.
bool is_seconds_fraction_set () const throw (())
 Returns whether or not the fractional part of the seconds item in the duration is set.
Long get_years () const throw (())
 Returns the value of the years item in the duration.
Long get_months () const throw (())
 Returns the value of the months item in the duration.
Long get_days () const throw (())
 Returns the value of the days item in the duration.
Long get_hours () const throw (())
 Returns the value of the hours item in the duration.
Long get_minutes () const throw (())
 Returns the value of the minutes item in the duration.
Long get_seconds () const throw (())
 Returns the value of the non-fractional part of the seconds item in the duration.
Long get_seconds_fraction () const throw (())
 Returns the value of the fractional part of the seconds item in the duration as milliseconds.
void reset () throw (())
 Reset the duration to zero.
void set_is_negative (bool is_negative) throw (())
 Sets whether or not the duration is negative.
void set_years (Long years) throw (())
 Set the years item in the duration.
void set_months (Long months) throw (())
 Set the months item in the duration.
void set_days (Long days) throw (())
 Set the days item in the duration.
void set_hours (Long hours) throw (())
 Set the hours item in the duration.
void set_minutes (Long minutes) throw (())
 Set the minutes item in the duration.
void set_seconds (Long seconds, Long milliseconds) throw ((Exception))
 Set the seconds item in the duration.
bool operator== (const Duration &other) const throw (())
 Equality operator.
bool operator!= (const Duration &other) const throw (())
 Inequality operator.
Durationoperator= (const Duration &rhs) throw (())
 Assignment operator.

Private Attributes

DurationImpl * m_impl

Friends

class DateTime
class Date
class Time
class GYearMonth
class GYear
class GMonthDay
class GMonth
class GDay


Constructor & Destructor Documentation

IT_Bus::Duration::Duration ( bool  isNegative,
Long  years,
Long  months,
Long  days,
Long  hours,
Long  minutes,
Long  seconds,
Long  milliseconds 
) throw ((Exception))

Constructor.

The seconds and milliseconds values will be normalized so that milliseconds is less than 1000. A value that is less than zero indicates that the item should not be set.

Parameters:
isNegative is this a negative duration?
years the number of years in the duration
months the number of months in the duration
days the number of days in the duration
hours the number of hours in the duration
minutes the number of minutes in the duration
seconds the number of seconds in the duration
milliseconds the number of milliseconds in the duration
Exceptions:
Exception if the normalization of the seconds and milliseconds would result in an overflow.

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

Constructor.

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

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

Constructor.

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


Member Function Documentation

virtual AnyType& IT_Bus::Duration::copy ( const AnyType rhs  )  [virtual]

Returns a reference to an AnyType that is a copy of the AnyType parameter.

Derived classes override this method, providing an appropriate implementation. In this base class, this method is not supported; an exception is always thrown.

Parameters:
AnyType to be copied.
Returns:
A reference to AnyType.
Exceptions:
IT_Bus::Exception with message "Copy not supported"

Reimplemented from IT_Bus::AnyType.

virtual void IT_Bus::Duration::write_value ( AnySimpleTypeWriter writer  )  const throw ((IT_Bus::SerializationException)) [virtual]

Write the instance value.

Derived classes implement this method.

Implements IT_Bus::AnySimpleType.

virtual void IT_Bus::Duration::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::Duration::get_kind (  )  const [virtual]

Returns the IT_Bus::AnyType::Kind for the type.

Returns:
AnyType::BUILT_IN.

Reimplemented from IT_Bus::AnySimpleType.

virtual const QName& IT_Bus::Duration::get_type (  )  const [virtual]

Returns the IT_Bus::QName for the type.

Derived subclasses implement this method and return their QName.

Returns:
NT_SCHEMA_DURATION.

Implements IT_Bus::AnyType.

virtual IT_Reflect::Reflection* IT_Bus::Duration::get_reflection (  )  throw ((IT_Reflect::ReflectException)) [virtual]

Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.

Returns:
IT_Reflect::Reflection
Exceptions:
IT_Reflect::ReflectException 

Reimplemented from IT_Bus::AnyType.

virtual const IT_Reflect::Reflection* IT_Bus::Duration::get_reflection (  )  const throw ((IT_Reflect::ReflectException)) [virtual]

Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.

Returns:
IT_Reflect::Reflection
Exceptions:
IT_Reflect::ReflectException 

Reimplemented from IT_Bus::AnyType.

String IT_Bus::Duration::to_string (  )  const throw (())

Returns a string representation of the duration.

Returns:
String representation of the duration.

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

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

Parameters:
String representation of the duration.

bool IT_Bus::Duration::is_zero (  )  const throw (())

Returns whether or not the duration is zero.

Returns:
bool whether or not the duration is zero.

bool IT_Bus::Duration::is_negative (  )  const throw (())

Returns whether or not the duration is negative.

Returns:
bool whether or not the duration is negative.

bool IT_Bus::Duration::is_years_set (  )  const throw (())

Returns whether or not the years item in the duration is set.

Returns:
bool whether or not the year item is set.

bool IT_Bus::Duration::is_months_set (  )  const throw (())

Returns whether or not the months item in the duration is set.

Returns:
bool whether or not the month item is set.

bool IT_Bus::Duration::is_days_set (  )  const throw (())

Returns whether or not the days item in the duration is set.

Returns:
bool whether or not the day item is set.

bool IT_Bus::Duration::is_hours_set (  )  const throw (())

Returns whether or not the hours item in the duration is set.

Returns:
bool whether or not the hour item is set.

bool IT_Bus::Duration::is_minutes_set (  )  const throw (())

Returns whether or not the minutes item in the duration is set.

Returns:
bool whether or not the minute item is set.

bool IT_Bus::Duration::is_seconds_set (  )  const throw (())

Returns whether or not the seconds item in the duration is set.

Returns:
bool whether or not the second item is set.

bool IT_Bus::Duration::is_seconds_fraction_set (  )  const throw (())

Returns whether or not the fractional part of the seconds item in the duration is set.

Returns:
bool whether or not the milliseconds item is set.

Long IT_Bus::Duration::get_years (  )  const throw (())

Returns the value of the years item in the duration.

Returns:
IT_Bus::Long value representing the number of years.

Long IT_Bus::Duration::get_months (  )  const throw (())

Returns the value of the months item in the duration.

Returns:
IT_Bus::Long value representing the number of months.

Long IT_Bus::Duration::get_days (  )  const throw (())

Returns the value of the days item in the duration.

Returns:
IT_Bus::Long value representing the number of days.

Long IT_Bus::Duration::get_hours (  )  const throw (())

Returns the value of the hours item in the duration.

Returns:
IT_Bus::Long value representing the number of hours.

Long IT_Bus::Duration::get_minutes (  )  const throw (())

Returns the value of the minutes item in the duration.

Returns:
IT_Bus::Long value representing the number of minutes.

Long IT_Bus::Duration::get_seconds (  )  const throw (())

Returns the value of the non-fractional part of the seconds item in the duration.

Returns:
IT_Bus::Long value representing the number of seconds.

Long IT_Bus::Duration::get_seconds_fraction (  )  const throw (())

Returns the value of the fractional part of the seconds item in the duration as milliseconds.

Returns:
IT_Bus::Long value representing the number of milliseconds.

void IT_Bus::Duration::set_is_negative ( bool  is_negative  )  throw (())

Sets whether or not the duration is negative.

Parameters:
bool whether or not the duration is negative.

void IT_Bus::Duration::set_years ( Long  years  )  throw (())

Set the years item in the duration.

A value that is less than zero unsets the item.

Parameters:
IT_Bus::Long representing the number of years.

void IT_Bus::Duration::set_months ( Long  months  )  throw (())

Set the months item in the duration.

A value that is less than zero unsets the item.

Parameters:
IT_Bus::Long representing the number of months.

void IT_Bus::Duration::set_days ( Long  days  )  throw (())

Set the days item in the duration.

A value that is less than zero unsets the item.

Parameters:
IT_Bus::Long representing the number of days.

void IT_Bus::Duration::set_hours ( Long  hours  )  throw (())

Set the hours item in the duration.

A value that is less than zero unsets the item.

Parameters:
IT_Bus::Long representing the number of hours.

void IT_Bus::Duration::set_minutes ( Long  minutes  )  throw (())

Set the minutes item in the duration.

A value that is less than zero unsets the item.

Parameters:
IT_Bus::Long representing the number of minutes.

void IT_Bus::Duration::set_seconds ( Long  seconds,
Long  milliseconds 
) throw ((Exception))

Set the seconds item in the duration.

The fractional part of the seconds item is set using milliseconds. A second value that is less than zero unsets the item. A millisecond value that is less than zero indicates that item should not contain a fractional part.

The seconds and milliseconds values will be normalized so that milliseconds is less than 1000.

Parameters:
IT_Bus::Long representing the number of seconds.
IT_Bus::Long representing the number of milliseconds.
Exceptions:
Exception if the normalization of the seconds and milliseconds would result in an overflow.

bool IT_Bus::Duration::operator== ( const Duration other  )  const throw (())

Equality operator.

Compares two durations for equality.

bool IT_Bus::Duration::operator!= ( const Duration other  )  const throw (())

Inequality operator.

Compares two durations for inequality.


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