// HMRegiConfig.h: interface for the CConfig class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_CONFIG_H__F8E1E3C1_3652_4862_BC5B_B089CDD610CD__INCLUDED_) #define AFX_CONFIG_H__F8E1E3C1_3652_4862_BC5B_B089CDD610CD__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "BasedConfig.h" enum Grouping //!> ÆÄÀÏ °ü¸® ¸ðµâ ±×·ì { FileMap_Mode = 1, ///> STL Map ÀÌ¿ë °ü¸® FileManager_Mode = 2, ///> MFC COblist ÀÌ¿ë °ü¸® Registery_mode = 4, ///> ·¹Áö½ºÆ®¸® °ü¸® Ini_Mode = 5 ///> INI ÆÄÀÏ ÀÌ¿ë °ü¸® }; /*! * \brief * µ¥ÀÌÅÍ °ü¸® Ŭ·¡½º * * µ¥ÀÌÅÍ °ü¸® Ŭ·¡½º·Î¼­ (ÆÄÀÏ °ü¸®, ·¹Áö½ºÆ®¸® °ü¸®¸¦ Áö¿øÇÑ´Ù.) \n\n * ÆÄÀÏ ¸ðµå\n * SetRegiConfig À» ÀÌ¿ëÇÏ¿© ÆÄÀÏ ¿ÀÇ½à ¸Þ¸ð¸®·Î ÆÄÀÏÀÇ ³»¿ëÀ» ÀûÀç ÇÑ´Ù. \n * µ¥ÀÌÅÍ ÀÔ/Ãâ·Â ÈÄ WriteToFile ÇÔ¼ö¸¦ ÅëÇØ¼­ µ¿±âÈ­ Çϰųª ReWriteMode¸¦ ÀÌ¿ëÇÏ¿© ½Ç½Ã°£ µ¿±âÈ­ ÇÒ ¼ö ÀÖ´Ù. */ class AFX_EXT_CLASS CConfig { public: CConfig(); virtual ~CConfig(); BOOL SetLogWriteMode(BOOL bUse,CString strFilePath); //!> ·Î±× ¸ðµå ¼³Á¤ BOOL SetRegiConfig(HKEY hKey, CString strKey, TCHAR* szFilename, Grouping Select = FileMap_Mode); //!> ÆÄÀÏ/·¹Áö½ºÆ®¸® ·Îµå BOOL DeleteAllItem(); //!> Àüü µ¥ÀÌÅÍ »èÁ¦ BOOL DeleteValue(CString strvalue); //!> ¼±Åà µ¥ÀÌÅÍ »èÁ¦ BOOL DeleteValue(CString strvalue, int nIdx); //!> ¼±Åà µ¥ÀÌÅÍ »èÁ¦ // File_Mode ¸¸ Àû¿ë. BOOL WriteToFile(); //!> FIle Mode ÀÏ °æ¿ì ¸Þ¸ð¸®ÀÇ ³»¿ëÀ» ÆÄÀÏ¿¡ ÀúÀåÇÑ´Ù. void SetRewriteMode(BOOL bRewrite); //!> FIle Mode ÀÏ °æ¿ì ½Ç½Ã°£ µ¿±âÈ­ ¸ðµå¸¦ ¼³Á¤ÇÑ´Ù. BOOL GetRewriteMode(); //!> File Mode ÀÏ °æ¿ì ½Ç½Ã°£ µ¿±âÈ­ ¸ðµå ¿©ºÎ¸¦ ¹ÝȯÇÑ´Ù. CString GetFilePath(); //!> File Mode ÀÏ °æ¿ì °ü¸®ÇÏ´Â ÆÄÀÏÀÇ °æ·Î¸¦ ¹ÝȯÇÑ´Ù. ////////////////////////////////////////////////////////////////////////// BOOL SetItemValue(CString strName, CString strvalue); //!> Set strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : CStringÇü BOOL SetItemValue(CString strName, int nValue); //!> Set strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : intÇü BOOL SetItemValue(CString strName, unsigned short sValue); //!> Set strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : unsigned shortÇü BOOL SetItemValue(CString strName, double dValue); //!> Set strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : doubleÇü BOOL SetItemValue(int nIdx, CString strName, CString strvalue); //!> Set nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : CStringÇü BOOL SetItemValue(int nIdx, CString strName, int nValue); //!> Set nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : intÇü BOOL SetItemValue(int nIdx, CString strName, unsigned short sValue); //!> Set nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : unsigned shortÇü BOOL SetItemValue(int nIdx, CString strName, double dValue); //!> Set nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : doubleÇü ////////////////////////////////////////////////////////////////////////// int GetItemValue(CString strName, CString& strValue, CString strDefault = _T("")); //!> Get strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : CStringÇü int GetItemValue(CString strName, int& nValue, int nDefault = 0); //!> Get strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : intÇü int GetItemValue(CString strName, unsigned short &nValue, unsigned short sDefault = 0); //!> Get strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : unsigned shortÇü int GetItemValue(CString strName, double& dValue, double dDefault = 0.0); //!> Get strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : doubleÇü int GetItemValue(int nIdx, CString strName, CString& strValue, CString strDefault = _T("")); //!> Get nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : CStringÇü int GetItemValue(int nIdx, CString strName, int& nValue, int nDefault = 0); //!> Get nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : intÇü int GetItemValue(int nIdx, CString strName, unsigned short &nValue, unsigned short sDefault = 0); //!> Get nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : unsigned shortÇü int GetItemValue(int nIdx, CString strName, double& dValue, double dDefault = 0.0); //!> Get nIdx : ¹è¿­ À妽º, strName : Ç׸ñ±¸ºÐÀÚ Å¸ÀÔ : doubleÇü public: Grouping m_Classification; ///> ÆÄÀÏ/·¹Áö½ºÆ®¸® °ü¸® ŸÀÔ protected: CBasedConfig *m_pConfig; ///> ±âº» °´Ã¼ Æ÷ÀÎÅÍ CString m_strFilePath; ///> ÆÄÀÏ °æ·Î }; #endif // !defined(AFX_CONFIG_H__F8E1E3C1_3652_4862_BC5B_B089CDD610CD__INCLUDED_)