ref <textPart> textPartFactory::create(const mediaType& type)
{
	for (MapType::const_iterator it = m_map.begin() ;
	     it != m_map.end() ; ++it)
	{
		if ((*it).first == type)
			return ((*it).second)();
	}

    // FIX by Elmue: Added usefull information for the user.
    // ("No factory available" is a completely meaningless error message!)
	throw exceptions::no_factory_available("Unknown media type '" + type.generate() + "'.");
}