1
0

inifile.h 1001 B

12345678910111213141516171819202122232425262728
  1. #ifndef _INIFILE_H
  2. #define _INIFILE_H
  3. #include <bfc/string/StringW.h>
  4. class IniFile
  5. {
  6. public:
  7. IniFile(const wchar_t *_filename);
  8. void setString(const wchar_t *section, const wchar_t *tagname, const wchar_t *val);
  9. wchar_t *getString(const wchar_t *section, const wchar_t *tagname, wchar_t *buf, int buflen, const wchar_t *default_val = L""); // returns buf
  10. StringW getString(const wchar_t *section, const wchar_t *tagname, const wchar_t *default_val=L"");
  11. void setInt(const wchar_t *section, const wchar_t *tagname, int val);
  12. int getInt(const wchar_t *section, const wchar_t *tagname, int default_val = 0);
  13. int getBool(const wchar_t *section, const wchar_t *tagname, int default_val = 0);
  14. void setBool(const wchar_t *section, const wchar_t *tagname, int val);
  15. GUID getGuid(const wchar_t *section, const wchar_t *tagname, GUID default_val = INVALID_GUID);
  16. void setGuid(const wchar_t *section, const wchar_t *tagname, const GUID &val);
  17. private:
  18. StringW filename;
  19. };
  20. #endif