#include <observer.h>
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 |
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.
| observer::BasicChangeContext< T >::BasicChangeContext | ( | boost::shared_ptr< T > | origVal | ) | throw () [inline] |
Constructor with original value.
| origVal | Original value used for originalValue initialization. |
| virtual observer::BasicChangeContext< T >::~BasicChangeContext | ( | ) | throw () [inline, virtual] |
Destructor. Just to mark all destructors in subtypes as virtual.
| virtual boost::shared_ptr<T> observer::BasicChangeContext< T >::getOriginalValue | ( | ) | const throw () [inline, virtual] |
Returns original value.
| ChangeContextType observer::BasicChangeContext< T >::getType | ( | ) | const throw () [inline, virtual] |
Returns type of context.
Implements observer::IChangeContext< T >.
Reimplemented in observer::ComplexChangeContext< ValueType, ValueIdType >.
boost::shared_ptr<T> observer::BasicChangeContext< T >::originalValue [private] |
Original value.
Referenced by observer::BasicChangeContext< ValueType >::getOriginalValue().