00001 /* 00002 * Copyright (C) 2003-2009 Olivier Boudeville 00003 * 00004 * This file is part of the Ceylan library. 00005 * 00006 * The Ceylan library is free software: you can redistribute it and/or modify 00007 * it under the terms of either the GNU Lesser General Public License or 00008 * the GNU General Public License, as they are published by the Free Software 00009 * Foundation, either version 3 of these Licenses, or (at your option) 00010 * any later version. 00011 * 00012 * The Ceylan library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License and the GNU General Public License 00016 * for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License and the GNU General Public License along with the Ceylan library. 00020 * If not, see <http://www.gnu.org/licenses/>. 00021 * 00022 * Author: Olivier Boudeville (olivier.boudeville@esperide.com) 00023 * 00024 */ 00025 00026 00027 #ifndef CEYLAN_GENERIC_CONTROLLER_H_ 00028 #define CEYLAN_GENERIC_CONTROLLER_H_ 00029 00030 00031 #include "CeylanTextDisplayable.h" // for inheritance 00032 00033 #include <string> 00034 00035 00036 00037 /* 00038 * See the CeylanGenericMVCDefines.h file for detailed design explanations 00039 * about this light-weight generic (template-based) MVC framework. 00040 * 00041 */ 00042 00043 00044 00045 /* 00046 * Here the base controller (BaseController) is defined. 00047 * 00048 * A controller will be asked for information by a model, thus a model has 00049 * to know the actual class of its controller(s), but a controller does not 00050 * have to know specifically which BaseModel child class it is interacting 00051 * will. 00052 * 00053 * Therefore no templated versions of controllers are needed here. 00054 * 00055 */ 00056 00057 00058 00059 namespace Ceylan 00060 { 00061 00062 00063 namespace MVC 00064 { 00065 00066 00067 00078 class CEYLAN_DLL BaseController : public TextDisplayable 00079 { 00080 00081 00082 public: 00083 00084 00085 00090 BaseController() ; 00091 00092 00093 00095 virtual ~BaseController() throw() ; 00096 00097 00098 00110 virtual const std::string toString( 00111 Ceylan::VerbosityLevels level = Ceylan::high ) const ; 00112 00113 00114 00115 00116 private: 00117 00118 00126 BaseController( const BaseController & source ) ; 00127 00128 00136 BaseController & operator = ( const BaseController & source ) ; 00137 00138 00139 00140 } ; 00141 00142 00143 } 00144 00145 00146 } 00147 00148 00149 #endif // CEYLAN_GENERIC_CONTROLLER_H_ 00150