1
0

config.h 659 B

123456789101112131415161718192021
  1. #ifndef _C_CONFIG_H_
  2. #define _C_CONFIG_H_
  3. class C_Config
  4. {
  5. public:
  6. C_Config(wchar_t *ini,wchar_t *section=L"ml_pmp", C_Config * globalWrite=NULL);
  7. ~C_Config();
  8. void WriteInt(wchar_t *name, int value, wchar_t *section=NULL);
  9. wchar_t *WriteString(wchar_t *name, wchar_t *string, wchar_t *section=NULL);
  10. int ReadInt(wchar_t *name, int defvalue, wchar_t *section=NULL);
  11. wchar_t *ReadString(wchar_t *name, wchar_t *defvalue, wchar_t *section=NULL);
  12. wchar_t *GetIniFile(){return m_inifile;}
  13. private:
  14. wchar_t m_strbuf[8192];
  15. wchar_t *m_inifile;
  16. wchar_t *m_section;
  17. C_Config * globalWrite;
  18. };
  19. #endif//_C_CONFIG_H_