config_watcher.h

Go to the documentation of this file.
00001 #ifndef CONFIG_WATCHER_CLASS
00002 #define CONFIG_WATCHER_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : config_watcher                                                    *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2008-$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 #include <basis/object_base.h>
00021 
00022 // forward.
00023 class configurator;
00024 class string_set;
00025 class table_configurator;
00026 
00028 
00035 class DATA_STRUCTURE_CLASS_STYLE config_watcher
00036 {
00037 public:
00038   config_watcher(configurator &to_watch);
00040 
00042   virtual ~config_watcher();
00043 
00044   IMPLEMENT_CLASS_NAME("config_watcher");
00045 
00046   bool rescan();
00048 
00050   // these lists describe how sections have changed, if at all.
00051   string_set new_sections() const;
00052   string_set deleted_sections() const;
00053   string_set changed_sections() const;
00054 
00055   // methods for comparing changes within sections in the config.
00056   string_set new_items(const istring &section_name);
00057   string_set deleted_items(const istring &section_name);
00058   string_set changed_items(const istring &section_name);
00059 
00060 private:
00061   configurator &_watching;  
00062   table_configurator *_current_config;  
00063   table_configurator *_previous_config;  
00064 };
00065 
00066 #endif
00067 

Generated on Fri Nov 28 04:29:11 2008 for HOOPLE Libraries by  doxygen 1.5.1