00001 /* libzzinet 00002 * 00003 * This program is distributed under the GNU General Public License, version 2. 00004 * A copy of this license is included with this source. 00005 * 00006 * Copyright 2004-2006, Toni Thomsson <toni@tonjac.org> 00007 */ 00008 00009 #ifndef zz_thread_safe_config_h 00010 #define zz_thread_safe_config_h 00011 00012 #include <zz_string.h> 00013 #include <zz_win_threadmutex.h> 00014 #include <map> 00015 00016 typedef map<CzzString, CzzString > CzzBlock; 00017 00023 class ZZ_API CzzThreadSafeConfig 00024 { 00025 public: 00026 00027 //* Construction 00028 CzzThreadSafeConfig( const CzzString& name ); 00029 virtual ~CzzThreadSafeConfig(); 00030 00031 CzzString getEntry( const CzzString& block, const CzzString& entry ); 00032 void setEntry( const CzzString& block, const CzzString& entry, const CzzString& value ); 00033 00034 protected: 00035 private: 00036 00037 CzzString m_File; 00038 map<CzzString, CzzBlock* > m_BlockList; 00039 static CzzWinThreadMutex m_Mutex; 00040 }; 00041 00042 #endif // zz_thread_safe_config_h
1.4.6-NO