xst_cwstring& CCfgFile::GetValue(xst_cwstring& strKey, xst_cwstring& strSection, xst_cwstring& strDefault)
	{
		CSection* pSec = _GetSection( strSection );
		if( pSec == xst_null )
		{
			return strDefault;
		}

		return pSec->GetValue( strKey, strDefault );
	}
예제 #2
0
string INIFile::GetValueString(const string section, const string key)
{
  CSection* pSection = GetSection(section);
  string val;

  if ( pSection )
  {
    val = pSection->GetValue(key);
  }

  return val;
}
예제 #3
0
short INIFile::GetValueShort(const string section, const string key)
{
  CSection* pSection = GetSection(section);
  short sRet = 0;
  string val;

  if ( pSection )
  {
    val = pSection->GetValue(key);
    sRet = (short)atoi(val.c_str());
  }

  return sRet;
}