IT_Bus::NillableValueBase< T > Class Template Reference

#include <it_bus/nillable_value_base.h>

Inheritance diagram for IT_Bus::NillableValueBase< T >:

IT_Bus::Nillable IT_Bus::AnyType IT_Bus::ImplementationDetails IT_Bus::BooleanNillable IT_Bus::ByteNillable IT_Bus::DecimalNillable IT_Bus::DoubleNillable IT_Bus::FloatNillable IT_Bus::IntNillable IT_Bus::LongNillable IT_Bus::NillableValue< T > IT_Bus::ShortNillable IT_Bus::UByteNillable IT_Bus::UIntNillable IT_Bus::ULongNillable IT_Bus::UShortNillable List of all members.

Detailed Description

template<class T>
class IT_Bus::NillableValueBase< T >

Nillable template implementation that keeps the data object in a member variable.

Note: This template can only be used for types that have a working copy constructor and assignment operator.

See header file for complete method details.

Definition at line 33 of file nillable_value_base.h.

Public Types

typedef T ValueType
typedef IT_Reflect::NillableValueImplT<
NillableValueBase< T >, T > 
IT_ReflectionType

Public Member Functions

virtual ~NillableValueBase ()
virtual AnyTypecopy (const AnyType &other)
 Returns a reference to an AnyType that is a copy of the AnyType parameter.
virtual const QNameget_type () const
 Returns the IT_Bus::QName for the type.
virtual Boolean is_nil () const
 True if the element is nil.
virtual void set_nil ()
 Set the element to be nil.
virtual void write_value (const QName &name, ComplexTypeWriter &writer) const throw ((SerializationException))
 Write the non-nil value.
virtual void read_value (const QName &name, ComplexTypeReader &reader) throw ((DeserializationException))
 Read a non-nil value.
virtual const T & get () const throw ((NoDataException))
 Returns the value.
virtual T & get () throw ((NoDataException))
 Returns the value.
virtual void set (const T &data)
 Set the data value, makes is_nil() false.
virtual void set (const T *data)
 Set the data value, checks the pointer.
virtual void reset ()
 Reset to nil, makes is_nil() true.
 NillableValueBase ()
 NillableValueBase (const NillableValueBase &other)
 NillableValueBase (const T &other)
 NillableValueBase (const T *other)
NillableValueBaseoperator= (const NillableValueBase &other)

Static Public Member Functions

static const QNameget_static_type ()

Private Types

typedef NillableValueBase ThisType

Private Attributes

Boolean m_is_nil
m_data

Friends

class IT_Reflect::NillableValueImplT< NillableValueBase< T >, T >


Member Function Documentation

template<class T>
AnyType & IT_Bus::NillableValueBase< T >::copy ( const AnyType other  )  [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.

Reimplemented in IT_Bus::AnyHolderNillable, IT_Bus::BooleanNillable, IT_Bus::LongNillable, IT_Bus::ULongNillable, IT_Bus::UIntNillable, IT_Bus::IntNillable, IT_Bus::ShortNillable, IT_Bus::UShortNillable, IT_Bus::StringNillable, IT_Bus::ByteNillable, IT_Bus::UByteNillable, IT_Bus::FloatNillable, IT_Bus::DoubleNillable, IT_Bus::DecimalNillable, IT_Bus::IntegerNillable, IT_Bus::PositiveIntegerNillable, IT_Bus::NonPositiveIntegerNillable, IT_Bus::NegativeIntegerNillable, IT_Bus::NonNegativeIntegerNillable, IT_Bus::QNameNillable, IT_Bus::DateTimeNillable, IT_Bus::DateNillable, IT_Bus::TimeNillable, IT_Bus::GYearNillable, IT_Bus::GYearMonthNillable, IT_Bus::GMonthNillable, IT_Bus::GMonthDayNillable, IT_Bus::GDayNillable, IT_Bus::DurationNillable, IT_Bus::AnyURINillable, IT_Bus::NormalizedStringNillable, IT_Bus::TokenNillable, IT_Bus::LanguageNillable, IT_Bus::NameNillable, IT_Bus::NCNameNillable, IT_Bus::NMTokenNillable, IT_Bus::NMTokensNillable, IT_Bus::IDNillable, IT_Bus::Base64Nillable, IT_Bus::HexNillable, and IT_Bus::NillableValue< T >.

Definition at line 207 of file nillable_value_base.h.

References IT_Reflect::Copier< T >::copy(), IT_Bus::NillableValueBase< T >::is_nil(), and IT_Bus::NillableValueBase< T >::set_nil().

template<class T>
const QName & IT_Bus::NillableValueBase< T >::get_type (  )  const [virtual]

Returns the IT_Bus::QName for the type.

Derived subclasses implement this method and return their QName.

Returns:
IT_Bus::QName.

Implements IT_Bus::AnyType.

Reimplemented in IT_Bus::AnyHolderNillable, IT_Bus::BooleanNillable, IT_Bus::LongNillable, IT_Bus::ULongNillable, IT_Bus::UIntNillable, IT_Bus::IntNillable, IT_Bus::ShortNillable, IT_Bus::UShortNillable, IT_Bus::StringNillable, IT_Bus::ByteNillable, IT_Bus::UByteNillable, IT_Bus::FloatNillable, IT_Bus::DoubleNillable, IT_Bus::DecimalNillable, IT_Bus::IntegerNillable, IT_Bus::PositiveIntegerNillable, IT_Bus::NonPositiveIntegerNillable, IT_Bus::NegativeIntegerNillable, IT_Bus::NonNegativeIntegerNillable, IT_Bus::QNameNillable, IT_Bus::DateTimeNillable, IT_Bus::DateNillable, IT_Bus::TimeNillable, IT_Bus::GYearNillable, IT_Bus::GYearMonthNillable, IT_Bus::GMonthNillable, IT_Bus::GMonthDayNillable, IT_Bus::GDayNillable, IT_Bus::DurationNillable, IT_Bus::AnyURINillable, IT_Bus::NormalizedStringNillable, IT_Bus::TokenNillable, IT_Bus::LanguageNillable, IT_Bus::NameNillable, IT_Bus::NCNameNillable, IT_Bus::NMTokenNillable, IT_Bus::NMTokensNillable, IT_Bus::IDNillable, IT_Bus::Base64Nillable, IT_Bus::HexNillable, and IT_Bus::NillableValue< T >.

Definition at line 319 of file nillable_value_base.h.

References IT_Bus::NillableValueBase< T >::get_static_type().

template<class T>
const T & IT_Bus::NillableValueBase< T >::get (  )  const throw ((NoDataException)) [virtual]

Returns the value.

Exceptions:
NoDataException if called when is_nil() is true.

Definition at line 274 of file nillable_value_base.h.

References IT_Bus::NillableValueBase< T >::is_nil(), and IT_Bus::NillableValueBase< T >::m_data.

Referenced by IT_Bus::NillableValue< T >::get_reflection(), IT_Bus::NillableValueBase< T >::operator=(), and IT_Bus::XMLAttributeNillableWriter< T >::write().

template<class T>
T & IT_Bus::NillableValueBase< T >::get (  )  throw ((NoDataException)) [virtual]

Returns the value.

Exceptions:
NoDataException if called when is_nil() is true.

Definition at line 263 of file nillable_value_base.h.

References IT_Bus::NillableValueBase< T >::is_nil(), and IT_Bus::NillableValueBase< T >::m_data.


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