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)
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 IT_THROW_DECL((SerializationException))
 Write the non-nil value.
virtual void read_value (const QName &name, ComplexTypeReader &reader) IT_THROW_DECL((DeserializationException))
 Read a non-nil value.
virtual const T & get () const IT_THROW_DECL((NoDataException))
 Returns the value.
virtual T & get () IT_THROW_DECL((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 T &other)
 NillableValueBase (const T *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>
T & IT_Bus::NillableValueBase< T >::get (  )  [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.

template<class T>
const T & IT_Bus::NillableValueBase< T >::get (  )  const [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::XMLAttributeNillableWriter< T >::write().

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().


Generated on Thu Sep 7 11:40:02 2006 for Artix by  doxygen 1.4.7