HCSetup( )
- Constructor
~HCSetup( )
- Destructor
int Open( const char* szFileName )
- open setup file.
- Parameters:
- szFileName - [in] setup file name
- Returns:
- if success, return 0.
otherwise return -1.
int GetString( const char* pszSection, const char* pszKey, char* pszValue, int iSize )
- finds string for key that specify in section that user of setting file specifies.
If value string for key is bigger than SETUP_VALUE_MAX_SIZE in setup file, can act irrelevantly.
- Parameters:
- szSection - [in] section string
szKey - [in] key string
szValue - [out] variable for value string
iSize - [in] size of szValue
- Returns:
- if success, return 0.
otherwise return -1.
int GetStringList( const char* szSection, const char* szKey, char*** pppszValueList, int* piCount )
- finds string list for key that specify in section that user of setting file specifies.
If value string for key is bigger than SETUP_VALUE_MAX_SIZE in setup file, can act irrelevantly.
- Parameters:
- szSection - [in] section string
szKey - [in] key string
pszValueList - [out] variable for saving string list
piCount - [out] count of string of pszValueList
- Returns:
- if success, return 0.
otherwise return -1.
int GetInt( const char* szSection, const char* szKey, int* piValue )
- finds integer for key that specify in section that user of setting file specifies.
If value string for key is bigger than SETUP_VALUE_MAX_SIZE in setup file, can act irrelevantly.
- Parameters:
- szSection - [in] section string
szKey - [in] key string
piValue - [out] variable for saving value
- Returns:
- if success, return 0.
otherwise return -1.
int GetInt( const char* szSection, const char* szKey, int* piValue, int iDefaultValue )
- finds integer for key that specify in section that user of setting file specifies.
If value string for key is bigger than SETUP_VALUE_MAX_SIZE in setup file, can act irrelevantly.
- Parameters:
- szSection - [in] section string
szKey - [in] key string
piValue - [out] variable for saving value
iDefaultValue - [in] default value if there is not value
- Returns:
- if success, return 0.
otherwise return -1.
int Close( )
- close setup file.
- Returns:
- if success, return 0.
int IsSeparator( char cInput )
- examine charactor whether is seperator
- Parameters:
- cInput - charactor for check
- Returns:
- if it is seperator, return 0.
otherwise return -1.
int DeleteStringList( char*** pppszValueList, int iCount )
- delete string list.
- Parameters:
- pszValueList - [in] string list
piCount - [in] count of string of string list
- Returns:
- return 0.