Newer
Older
Campbell, Stuart
committed
/**
* Get a facility
* @param fName Facility name
* @return the facility information object
Campbell, Stuart
committed
* @throws NotFoundException if the facility is not found
*/
const FacilityInfo& ConfigServiceImpl::Facility(const std::string& fName) const
{
std::vector<FacilityInfo*>::const_iterator it = m_facilities.begin();
for (; it != m_facilities.end(); ++it)
Roman Tolchenov
committed
{
Campbell, Stuart
committed
if ((**it).name() == fName)
Roman Tolchenov
committed
{
Campbell, Stuart
committed
return **it;
Roman Tolchenov
committed
}
}
Campbell, Stuart
committed
g_log.error("Facility " + fName + " not found");
throw Exception::NotFoundError("Facilities", fName);
}
/// \cond TEMPLATE
template DLLExport int ConfigServiceImpl::getValue(const std::string&, double&);
template DLLExport int ConfigServiceImpl::getValue(const std::string&, std::string&);
template DLLExport int ConfigServiceImpl::getValue(const std::string&, int&);
/// \endcond TEMPLATE
} // namespace Kernel
} // namespace Mantid