Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

Config.h

00001 /*
00002    Copyright (C) 2002 the Strongroom project
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    @author Ewald Snel
00010 */
00011 
00012 #ifndef __CONFIG_H
00013 #define __CONFIG_H
00014 
00015 #ifdef HAVE_CONFIG_H
00016 #include <config.h>
00017 #endif
00018 
00019 #include <string>
00020 
00021 #include <Error.h>
00022 #include <HashUtils.h>
00023 #include <XMLReader.h>
00024 
00025 
00026 using namespace std;
00027 
00031 class Config
00032 {
00033 public:
00037     Config( string filename );
00038 
00042     ~Config();
00043 
00049     ConfigError get( string key, string &value );
00050 
00057     string getDefault( string key, string defvalue );
00058 
00064     ConfigError set( string key, string value );
00065 
00069     ConfigError load();
00070 
00074     ConfigError save();
00075 
00076 private:
00077     string filename;
00078     hash_map<string,string,_hash_string> keys;
00079 };
00080 
00081 #endif

Generated on Wed Feb 18 13:45:55 2004 for strongroom by doxygen1.2.18