Files
2026-05-20 03:08:08 +09:00

37 lines
991 B
C++

#ifndef CONFIG__H_
#define CONFIG__H_
#ifdef _WIN32
#pragma once
#endif
class HIniFile;
class HConfig : public HObject
{
public:
HConfig();
~HConfig();
virtual bool OpenConfig(const char * pszPathName);
virtual void CloseConfig();
virtual inline const char * GetConfigPathName() { return m_strConfigFile; }
virtual HString ReadString(const char * pszSetionName, const char * pszKeyName, const char * pszDefault);
virtual bool WriteString(const char * pszSetionName, const char * pszKeyName, const char * pszString);
virtual int ReadNumber(const char * pszSetionName, const char * pszKeyName, int nDefault);
virtual bool WriteNumber(const char * pszSetionName, const char * pszKeyName, int nNumber);
virtual bool ReadBoolean(const char * pszSetionName, const char * pszKeyName, bool bDefault);
virtual bool WriteBoolean(const char * pszSetionName, const char * pszKeyName, bool bValue);
private:
HString m_strConfigFile;
HIniFile * m_pIniFile;
};
#endif // CONFIG__H_