inline Event::type_t
CommandMap::to_type_t (std::string tp)
{
	StringTypeMap::iterator result = _str_type_map.find(tp);

	if (result == _str_type_map.end()) {
		return Event::type_cmd_hit; // arbitrary
	}

	return (*result).second;
}
 _Type* find(std::string const& key) const
 {
     _Type * result = NULL;
     if (_instance == NULL) return result;
     if (!_mutex) _mutex = new FastMutex();
     FastMutex::ScopedLock _(*_mutex);
     if (_instance == NULL) return result;
     typename StringTypeMap::const_iterator iter= _instance->find(key);
     if (iter != _instance->end())
         result = iter->second;
     return result;
 }