Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

View.h

Go to the documentation of this file.
00001 /* 00002 * Copyright 2000 Murray Cumming 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public 00015 * License along with this library; if not, write to the Free 00016 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef BAKERY_VIEW_H 00020 #define BAKERY_VIEW_H 00021 00022 #include "ViewBase.h" 00023 #include "../Document/Document.h" 00024 00025 namespace Bakery 00026 { 00027 00031 template< class T_Document > 00032 class View : public ViewBase 00033 { 00034 public: 00035 View() 00036 { 00037 m_pDocument = 0; 00038 } 00039 00040 virtual ~View() 00041 { 00042 } 00043 00044 //typedef typename T_Document type_document; 00045 00046 virtual T_Document* get_document() 00047 { 00048 return m_pDocument; 00049 } 00050 00051 virtual const T_Document* get_document() const 00052 { 00053 return m_pDocument; 00054 } 00055 00056 virtual void set_document(T_Document* pDocument) 00057 { 00058 m_pDocument = pDocument; 00059 } 00060 00062 virtual void set_modified(bool val = true) 00063 { 00064 if(m_pDocument) 00065 m_pDocument->set_modified(val); 00066 } 00067 00068 protected: 00069 T_Document* m_pDocument; 00070 }; 00071 00072 } //namespace 00073 00074 #endif

Generated on Fri Aug 13 08:56:32 2004 for bakery by doxygen 1.3.7