/** Copyright 2003 Cyril Picard This file is part of the GEDCOMViewer tool (developed within the Genealogy Free Software Tools project). The GEDCOMViewer tool is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GEDCOMViewer tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the GEDCOMViewer tool ; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **/ #ifndef _BAKERYEXTRAS_VIEWTARGETFACTORY_HH_ #define _BAKERYEXTRAS_VIEWTARGETFACTORY_HH_ #include "bakery/bakery.h" #include "BakeryExtras/View_Target.hh" namespace BakeryExtras { template < class T_Document, class T_KeyType > class View_TargetFactory { public: View_TargetFactory(void) : _default_target(0) { }; virtual ~View_TargetFactory(void) { }; virtual View_Target < T_Document, T_KeyType > * getTarget(Bakery::View * const) = 0; virtual Bakery::View < T_Document > * getNewView(void) = 0; virtual View_Target < T_Document, T_KeyType > * getDefaultTarget(void) { return _default_target; }; virtual void setDefaultTarget( View_Target < T_Document, T_KeyType > * default_target) { _default_target = default_target; }; private: View_Target < T_Document, T_KeyType > * _default_target; }; }; #endif