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

Properties.hh

Go to the documentation of this file.
00001 /*
00002  * Properties.hh
00003  *
00004  * Copyright 2002, Log4cpp Project. All rights reserved.
00005  *
00006  * See the COPYING file for the terms of usage and distribution.
00007  */
00008 
00009 #ifndef _LOG4CPP_PROPERTIES_HH
00010 #define _LOG4CPP_PROPERTIES_HH
00011 
00012 #include "PortabilityImpl.hh"
00013 #include <string>
00014 #include <iostream>
00015 #include <map>
00016 
00017 namespace log4cpp {
00018     
00019     class Properties : public std::map<std::string, std::string> {
00020         public:
00021         Properties();
00022         virtual ~Properties();
00023 
00024         virtual void load(std::istream& in);
00025         virtual void save(std::ostream& out);
00026 
00027         virtual int getInt(const std::string& property, int defaultValue);
00028         virtual bool getBool(const std::string& property, bool defaultValue);
00029         virtual std::string getString(const std::string& property,
00030                                       const char* defaultValue);
00031 
00032         protected:
00033         virtual void _substituteVariables(std::string& value);
00034     };
00035 }
00036 
00037 #endif // _LOG4CPP_PROPERTIES_HH
00038 

Generated on Mon Oct 28 23:41:43 2002 for log4cpp by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002