observer::ScopedChangeContext< T, S > Class Template Reference

#include <observer.h>

Inheritance diagram for observer::ScopedChangeContext< T, S >:
observer::IChangeContext< T >

List of all members.

Public Member Functions

 ScopedChangeContext (boost::shared_ptr< S > s)
boost::shared_ptr< S > getScope () const
ChangeContextType getType () const throw ()

Private Attributes

boost::shared_ptr< S > scope

Detailed Description

template<typename T, typename S>
class observer::ScopedChangeContext< T, S >

Change context with scope information.

Scope information are specified as template parameter and describes scope of the change. Template T parameter specifies value holder.
Scope can be rather complex information but principally it should contain information which can be used to cathegorize value given in notify method as newValue parameter (e. g. Maximum number of value for progress calculation and newValue contains current state).


Constructor & Destructor Documentation

template<typename T , typename S >
observer::ScopedChangeContext< T, S >::ScopedChangeContext ( boost::shared_ptr< S >  s  )  [inline]

Initialize constructor.

Parameters:
s Scope used for initialization.

Initializes scope field.


Member Function Documentation

template<typename T , typename S >
boost::shared_ptr<S> observer::ScopedChangeContext< T, S >::getScope (  )  const [inline]

Returns scope.

Returns:
Scope value wrapped by shared_ptr smart pointer.

References observer::ScopedChangeContext< T, S >::scope.

template<typename T , typename S >
ChangeContextType observer::ScopedChangeContext< T, S >::getType (  )  const throw () [inline, virtual]

Returns context type.

Returns:
Returns ScopedChangeContextType.

Implements observer::IChangeContext< T >.

References observer::ScopedChangeContextType.


Member Data Documentation

template<typename T , typename S >
boost::shared_ptr<S> observer::ScopedChangeContext< T, S >::scope [private]

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