#include <it_bus/nillable_value_base.h>
Inheritance diagram for IT_Bus::NillableValueBase< T >:
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 AnyType & | copy (const AnyType &other) |
Returns a reference to an AnyType that is a copy of the AnyType parameter. | |
virtual const QName & | get_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) | |
NillableValueBase & | operator= (const NillableValueBase &other) |
Static Public Member Functions | |
static const QName & | get_static_type () |
Private Types | |
typedef NillableValueBase | ThisType |
Private Attributes | |
Boolean | m_is_nil |
T | m_data |
Friends | |
class | IT_Reflect::NillableValueImplT< NillableValueBase< T >, 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.
AnyType | to be copied. |
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().
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.
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().
const T & IT_Bus::NillableValueBase< T >::get | ( | ) | const throw ((NoDataException)) [virtual] |
Returns the value.
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().
T & IT_Bus::NillableValueBase< T >::get | ( | ) | throw ((NoDataException)) [virtual] |
Returns the value.
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.