コード例 #1
0
void CIniFileBase::GetVectorOfSections( SectionList & sections)
{
	sections.clear();

	CGuard Guard(m_CS);
	if (!m_File.IsOpen())
	{
		return; 
	}

	{
		stdstr_f DoesNotExist(_T("DoesNotExist%d%d%d"),rand(),rand(),rand());
		MoveToSectionNameData(DoesNotExist.c_str(),false);
	}

	for (FILELOC::const_iterator iter = m_SectionsPos.begin(); iter != m_SectionsPos.end(); iter++)
	{
		sections.push_back(iter->first);
	}
}
コード例 #2
0
void devEthernet::checkExistance() {
	if ( ! exists() ) throw DoesNotExist("Interface " + getIfaceName() +	" does not exist.");
}