area.cpp
/*
  Get a name for the Area in a specific language.  This function is
  callable from a constant context and not modify the state of the instance.

  @param lang
    A three-letter language code in ISO 639-3 format, e.g. cym or eng

  @return
    The name for the area in the given language

  @throws
    std::out_of_range if lang does not correspond to a language of a name stored
    inside the Area instance

  @example
    Area area("W06000023");
    std::string langCode  = "eng";
    std::string langValue = "Powys";
    area.setName(langCode, langValue);
    ...
    auto name = area.getName(langCode);
*/
Get a name for the Area in a specific language.  This function is
callable from a constant context and not modify the state of the instance.
Get a name for the Area in a specific language . This function is callable from a constant context and not modify the state of the instance .
std::string Area::getName(const std::string lang) const{
    std::string lower = BethYw::convertToLower(lang);
    if(names.find(lang) == names.end())
        throw (std::out_of_range("No known lang"));
    return names.find(lang)->second;
}
std :: string Area :: getName ( const std :: string lang ) const { std :: string lower = BethYw :: convertToLower ( lang ) ; if ( names . find ( lang ) == names . end ( ) ) throw ( std :: out_of_range ( " " ) ) ; return names . find ( lang ) -> second ; }
Get a name for the Area in a specific language.
Get a name for the Area in a specific language .