示例#1
0
bool FlatConfigFile::GetValue(size_t nIndex, ConfigValue & xValue) const
{
	if(nIndex >= 0 && nIndex < m_xDataArray.size()) {
		xValue.Load(m_xDataArray.at(nIndex).c_str());
		return true;
	}
	return false;
}
示例#2
0
bool ConfigFile::GetValue(const char * strKey, ConfigValue & xValue) const
{
	std::map<std::string, std::string>::iterator it;

	it = m_xDataMap.find(strKey);
	if(it != m_xDataMap.end()) {
		xValue.Load(it->second.c_str());
		return true;
	}
	return false;
}