BaseField::Ptr Registry::create(const io::Node& node) const { Map::const_iterator it = mMap.find(node.getName()); if(it == mMap.end()) { throw KeyError(node.getName() + ": not a registered field type"); } return it->second(node); }
bool dispatch (Request& req) { Map::const_iterator const iter (m_map.find (req.method)); if (iter == m_map.end()) return false; iter->second (req); return true; }