Observer< T >(3)

NAME
Observer< T > - Observer Design Pattern, Observer part.

SYNOPSIS

Inherits BaseObserver.

  Public Member Functions
Observer (const T *owner)
T * getOwner () const

Detailed Description

  template<typename T>
class Katabatic::Observer< T >" Observer Design Pattern, Observer part. First, a warning about names: although this class is named Observer, it is intended to be an attribute nested inside the whole object which is indeed, the true Observer. This nesting object is called, most of the time the owner in the following. But sometimes, for simplification it may also be called the Observer.

Observer Implementation Notes

To retrieve the owner from the Observer attribute, we uses the offset from the attribute in the owner. This offset is computed once and for all the first time the template constructor is called.

Constructor & Destructor Documentation

  Observer (const T * owner) [inline]
The owner of the oberver is needed to compute, on the first creation only, the offset of the Observer attribute inside the owner complete object.

Member Function Documentation

  T * getOwner () const [inline]
Returns: The owner of the observer.

Author

Generated automatically by Doxygen for Katabatic - Routing Toolbox from the source code.