00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GXLIB_GXPROPERTIES_H
00019 #define GXLIB_GXPROPERTIES_H
00020
00021 #include "../gx.h"
00030 class gxProperties
00031 {
00032 public:
00033 gxProperties();
00034 virtual ~gxProperties();
00035
00036 typedef std::list<std::string> keys_t;
00037
00041 void clear();
00042
00047 bool containsKey( const char * key );
00048
00052 std::string get( const char * key, const char * defaultValue = "" );
00056 std::string get( const std::string & key, const char * defaultValue = "" );
00057
00058
00062 keys_t keys();
00063
00064
00068 void put( const char * key, const char * value );
00069
00074 void put( const char * key, long value );
00075
00079 void put( const std::string & key, const char * value );
00080
00084 void put( const std::string & key, long value );
00085
00089 int size();
00090 private:
00091
00092 typedef std::map<std::string,std::string> properties_t;
00093 properties_t m_properties;
00094
00095 gxProperties( const gxProperties & rhs);
00096 gxProperties & operator=( const gxProperties & rhs);
00097 };
00098 #endif