IT_Reflect::ValueRef< T > Class Template Reference

#include <it_bus/reflect/value_ref.h>

Inheritance diagram for IT_Reflect::ValueRef< T >:

IT_Reflect::ValueRefBase< T > IT_Bus::AnySimpleType IT_Reflect::Value< T > IT_Bus::AnyType IT_Reflect::BuiltInType IT_Bus::ImplementationDetails IT_Reflect::SimpleType IT_Reflect::Reflection IT_Bus::RefCountedBase List of all members.

Detailed Description

template<class T>
class IT_Reflect::ValueRef< T >

Template implementation of IT_Reflect::Value that holds a reference to a simple type such as Float, Int, Date etc.

As well as Value this class implements AnySimpleType to support get_reflected calls on simple types that are not class objects.

Definition at line 23 of file value_ref.h.

Public Member Functions

 ValueRef (const T &value) throw (())
 Constructor.
 ValueRef (const T *value) throw (())
 Constructor.
 ~ValueRef () throw (())
 Destructor.
virtual const IT_Bus::AnyTypeget_reflected () const throw (())
 Get the reflected object.
virtual IT_Bus::AnyTypeget_reflected () throw (())
 Get the reflected object.
virtual const IT_Bus::QNameget_type () const
 Returns the IT_Bus::QName for the type.
virtual AnyType::Kind get_kind () const
 Returns the IT_Bus::AnyType::Kind for the type.
virtual IT_Reflect::Reflectionget_reflection () throw (())
 Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
virtual const IT_Reflect::Reflectionget_reflection () const throw (())
 Return an instance of the IT_Reflect::Reflection type that encapsulates this instance.
virtual void read (const IT_Bus::QName &name, IT_Bus::ComplexTypeReader &reader) throw ((IT_Bus::DeserializationException))
 Read the value into the instance.
virtual void write (const IT_Bus::QName &name, IT_Bus::ComplexTypeWriter &writer) const throw ((IT_Bus::SerializationException))
 Write the content of the instance.
virtual void read_value (IT_Bus::AnySimpleTypeReader &reader) throw ((IT_Bus::DeserializationException))
 Read the value into the instance.
virtual void write_value (IT_Bus::AnySimpleTypeWriter &writer) const throw ((IT_Bus::SerializationException))
 Write the instance value.
virtual IT_Bus::AnyTypecopy (const IT_Bus::AnyType &rhs)
 Returns a reference to an AnyType that is a copy of the AnyType parameter.
virtual IT_Bus::AnyTypeclone () const throw ((ReflectException))
 Get a pointer to a clone of this value instance.


Member Function Documentation

template<class T>
const IT_Bus::AnyType & IT_Reflect::ValueRef< T >::get_reflected (  )  const throw (()) [virtual]

Get the reflected object.

Returns:
reference to AnyType containing the reflected object

Implements IT_Reflect::Reflection.

Definition at line 137 of file value_ref.h.

template<class T>
IT_Bus::AnyType & IT_Reflect::ValueRef< T >::get_reflected (  )  throw (()) [virtual]

Get the reflected object.

Returns:
reference to AnyType containing the reflected object

Implements IT_Reflect::Reflection.

Definition at line 144 of file value_ref.h.

template<class T>
const IT_Bus::QName & IT_Reflect::ValueRef< 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.

Definition at line 154 of file value_ref.h.

References IT_Bus::SchemaTypeTraits< T >::type_name().

template<class T>
IT_Bus::AnyType::Kind IT_Reflect::ValueRef< T >::get_kind (  )  const [virtual]

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

Returns:
AnyType::SIMPLE.

Reimplemented from IT_Bus::AnySimpleType.

Definition at line 161 of file value_ref.h.

template<class T>
IT_Reflect::Reflection * IT_Reflect::ValueRef< T >::get_reflection (  )  throw (()) [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.

Definition at line 169 of file value_ref.h.

References IT_Bus::RefCountedBase::_add_ref().

template<class T>
const IT_Reflect::Reflection * IT_Reflect::ValueRef< T >::get_reflection (  )  const throw (()) [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.

Definition at line 177 of file value_ref.h.

References IT_Bus::RefCountedBase::_add_ref().

template<class T>
void IT_Reflect::ValueRef< T >::read_value ( IT_Bus::AnySimpleTypeReader reader  )  throw ((IT_Bus::DeserializationException)) [virtual]

Read the value into the instance.

Derived classes implement this method.

Implements IT_Bus::AnySimpleType.

Definition at line 205 of file value_ref.h.

template<class T>
void IT_Reflect::ValueRef< T >::write_value ( IT_Bus::AnySimpleTypeWriter writer  )  const throw ((IT_Bus::SerializationException)) [virtual]

Write the instance value.

Derived classes implement this method.

Implements IT_Bus::AnySimpleType.

Definition at line 214 of file value_ref.h.

template<class T>
IT_Bus::AnyType & IT_Reflect::ValueRef< T >::copy ( const IT_Bus::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.

Definition at line 223 of file value_ref.h.

References IT_Reflect::ValueRefBase< T >::m_value.

template<class T>
IT_Bus::AnyType * IT_Reflect::ValueRef< T >::clone (  )  const throw ((ReflectException)) [virtual]

Get a pointer to a clone of this value instance.

Caller must delete return value.

Returns:
a pointer to an AnyType

Implements IT_Reflect::Reflection.

Definition at line 237 of file value_ref.h.

References IT_Reflect::ValueRefBase< T >::m_value.


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