Ejemplo n.º 1
0
IniSection * IniParser::getSection (const char *section, bool verbose)
{
	std::string name (section);
	for (IniParser::iterator iter = begin (); iter != end (); iter++)
	{
		IniSection *sect = *iter;
		if (sect->isSection (name))
			return sect;
	}
	if (verbose && find (missingSections.begin (), missingSections.end (), name) == missingSections.end ())
	{
		logStream (MESSAGE_ERROR) << "cannot find section '" << section << "'." << sendLog;
		missingSections.push_back (name);
	}
	return NULL;
}