value_t normalize_value(const std::string& s) const { std::map<std::string, value_t>::const_iterator it = values.find(s); if(it == values.end()) { return value_default; } else { return it->second; } }
// Handle request for the pair. // Throws an exception if pair is not found. std::string handle_request_for_pair( const msg_request_by_key & what ) { auto r = m_values.find( what.m_key ); if( r == m_values.end() ) throw key_not_found_exception( "key is not found in the storage: " + what.m_key ); return r->second; }