00001 #ifndef TABLE_CONFIGURATOR_CLASS 00002 #define TABLE_CONFIGURATOR_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : table_configurator * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2001-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "configurator.h" 00019 #include "data_structure_dll.h" 00020 00021 #include <basis/object_base.h> 00022 00023 // forward. 00024 class table_o_string_tables; 00025 00027 00028 class DATA_STRUCTURE_CLASS_STYLE table_configurator : public configurator 00029 { 00030 public: 00031 table_configurator(treatment_of_defaults behavior = AUTO_STORE); 00033 00037 table_configurator(const table_configurator &to_copy); 00038 00039 virtual ~table_configurator(); 00040 00041 table_configurator &operator =(const table_configurator &to_copy); 00042 00043 IMPLEMENT_CLASS_NAME("table_configurator"); 00044 00045 virtual void sections(string_array &list); 00047 00048 void reset(); // clears out all contents. 00049 00050 virtual bool get(const istring §ion, const istring &entry, 00051 istring &found); 00053 00054 virtual bool put(const istring §ion, const istring &entry, 00055 const istring &to_store); 00057 00058 virtual bool section_exists(const istring §ion); 00060 00061 virtual bool delete_section(const istring §ion); 00063 00064 virtual bool delete_entry(const istring §ion, const istring &entry); 00066 00067 virtual bool get_section(const istring §ion, string_table &info); 00069 00070 virtual bool put_section(const istring §ion, const string_table &info); 00072 00073 private: 00074 table_o_string_tables *_real_table; 00076 }; 00077 00078 #endif 00079
1.5.1