observer::BasicChangeContext< T > Class Template Reference

#include <observer.h>

Inheritance diagram for observer::BasicChangeContext< T >:
observer::IChangeContext< T >

List of all members.

Public Member Functions

 BasicChangeContext (boost::shared_ptr< T > origVal) throw ()
virtual ~BasicChangeContext () throw ()
ChangeContextType getType () const throw ()
virtual boost::shared_ptr< T > getOriginalValue () const throw ()

Private Attributes

boost::shared_ptr< T > originalValue

Detailed Description

template<typename T>
class observer::BasicChangeContext< T >

Basic change context template class.

Simplest subclass from IChangeContext. It holds previous value of changed one. This value is wrapped by smart pointer to keep clear instancion policy.
Exception NOTE: No method throws an exception.


Constructor & Destructor Documentation

template<typename T>
observer::BasicChangeContext< T >::BasicChangeContext ( boost::shared_ptr< T >  origVal  )  throw () [inline]

Constructor with original value.

Parameters:
origVal Original value used for originalValue initialization.
template<typename T>
virtual observer::BasicChangeContext< T >::~BasicChangeContext (  )  throw () [inline, virtual]

Destructor. Just to mark all destructors in subtypes as virtual.


Member Function Documentation

template<typename T>
virtual boost::shared_ptr<T> observer::BasicChangeContext< T >::getOriginalValue (  )  const throw () [inline, virtual]

Returns original value.

Returns:
Orignal value wrapped by smart pointer.
template<typename T>
ChangeContextType observer::BasicChangeContext< T >::getType (  )  const throw () [inline, virtual]

Returns type of context.

Returns:
BasicChangeContextType value.

Implements observer::IChangeContext< T >.

Reimplemented in observer::ComplexChangeContext< ValueType, ValueIdType >.


Member Data Documentation

template<typename T>
boost::shared_ptr<T> observer::BasicChangeContext< T >::originalValue [private]

The documentation for this class was generated from the following file: