FileConfig.h 612 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _FILECONFIG_H
  2. #define _FILECONFIG_H
  3. #include "File.h"
  4. namespace tzc {
  5. class DECLDLL FileConfig
  6. {
  7. public:
  8. FileConfig(const std::string & filePath, TZ_BOOL readonly = TRUE);
  9. ~FileConfig();
  10. TZ_INT Initialize();
  11. // seek to begin of the file befor searching for @key
  12. TZ_INT GetValue(const std::string & key, std::string & value);
  13. TZ_INT GetValueContinous(const std::string & key, std::string & value);
  14. TZ_INT SetValue(const std::string & key, const std::string & value);
  15. private:
  16. TZ_BOOL m_readonly;
  17. File * m_file;
  18. };
  19. } // end of namespace tzc
  20. #endif /*-----#ifndef _FILECONFIG_H-----*/