00001 /* Configuring modules. 00002 * 00003 * PegSoft modules subsystem library (c) 2005 PegSoft 00004 * Contact us at pegsoft@pegsoft.net 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License version 2 as 00008 * published by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this software (the COPYING file); if not, write to the 00017 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 00018 * USA. 00019 * 00020 */ 00021 00027 #ifndef MODULES_CONF_H 00028 #define MODULES_CONF_H 00029 00030 /*************************************************************************/ 00031 00032 #include <string> 00033 00034 #include <conf/directives.h> 00035 00036 /*************************************************************************/ 00037 00038 namespace modules 00039 { 00040 00041 /*************************************************************************/ 00042 00044 00045 class ConfModule : public conf::ConfBlock 00046 { 00047 public: 00048 /* Data */ 00049 conf::ConfString mname; 00050 conf::ConfString config; 00051 00052 /* Functions */ 00053 explicit ConfModule(std::string const &name, bool reloadable = true); 00054 protected: 00055 virtual bool add(conf::Conf &conf, conf::Conf &new_conf); 00056 }; 00057 00058 /*************************************************************************/ 00059 00060 class ConfModuleA : public conf::ConfArray<ConfModule, std::vector<ConfModule> > 00061 { 00062 public: 00063 ConfModuleA(); 00064 }; 00065 00066 /*************************************************************************/ 00067 00069 00070 class LoadModule : public conf::ConfStrCharA 00071 { 00072 public: 00073 LoadModule(); 00074 }; 00075 00076 /*************************************************************************/ 00077 00078 } /* namespace modules */ 00079 00080 /*************************************************************************/ 00081 00082 #endif /* MODULES_CONF_H */