00001 #ifndef SECTION_MANAGER_CLASS 00002 #define SECTION_MANAGER_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : section_manager * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2000-$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 "data_structure_dll.h" 00019 00020 // forward. 00021 class configurator; 00022 class string_table; 00023 00025 00034 class DATA_STRUCTURE_CLASS_STYLE section_manager 00035 { 00036 public: 00037 section_manager(configurator &config, const istring &toc_title, 00038 const istring &header_prefix); 00040 00056 ~section_manager(); 00057 00058 bool section_exists(const istring §ion_name); 00060 00061 bool get_section_names(string_array §ions); 00063 00066 bool add_section(const istring §ion_name, const string_table &to_add); 00068 00070 bool replace_section(const istring §ion, const string_table &replacement); 00072 00074 bool zap_section(const istring §ion_name); 00076 00078 bool find_section(const istring §ion_name, string_table &found); 00080 00083 configurator &config() { return _config; } 00085 00089 bool get_toc(string_table &toc); 00091 00092 istring make_section_heading(const istring §ion); 00094 00096 private: 00097 configurator &_config; 00098 istring *_toc_title; 00099 istring *_section_prefix; 00100 00101 section_manager(const section_manager &); 00102 section_manager &operator =(const section_manager &); 00104 }; 00105 00106 #endif 00107
1.5.1