#ifndef _BAKERYEXTRAS_VIEWNAVIGATOR_HH_ #define _BAKERYEXTRAS_VIEWNAVIGATOR_HH_ #include "bakery/bakery.h" #include "BakeryExtras/View_Target.hh" namespace BakeryExtras { template< class T_Document, class T_KeyType > class View_Navigator : virtual public Bakery::View { public: View_Navigator() : _target(0) { } virtual ~View_Navigator() { } void setTarget(View_Target < T_Document, T_KeyType > * target) { _target = target; return; } virtual void Navigate(T_KeyType const & key) { if (_target != 0) { _target->Goto(key); } } protected: private: View_Target < T_Document, T_KeyType > * _target; }; }; #endif