示例#1
0
ucstring CConfiguration::getValue(const string &varName, const ucstring &defaultValue)
{
	if (m_ConfigFile.exists(varName)) return ucstring::makeFromUtf8(m_ConfigFile.getVar(varName).asString());
	CConfigFile::CVar varToCopy;
	varToCopy.forceAsString(defaultValue.toUtf8());
	m_ConfigFile.insertVar(varName, varToCopy);
	return defaultValue;
}
示例#2
0
string CConfiguration::getValue(const string &varName, const string &defaultValue)
{
	if (ConfigFile.exists(varName)) return ConfigFile.getVar(varName).asString();
	CConfigFile::CVar varToCopy;
	varToCopy.forceAsString(defaultValue);
	ConfigFile.insertVar(varName, varToCopy);
	return defaultValue;
}