areas.cpp
/*
  Add a particular Area to the Areas object.

  If an Area already exists with the same local authority code,  it will be
  be overwrite. All data contained within the existing Area with those in the new
  Area (i.e. they should be combined, but the new Area's data should take
  precedence, e.g. replace a name with the same language identifier).

  @param localAuthorityCode
    The local authority code of the Area

  @param area
    The Area object that will contain the Measure objects

  @return
    void

  @example
    Areas data = Areas();
    std::string localAuthorityCode = "W06000023";
    Area area(localAuthorityCode);
    data.setArea(localAuthorityCode, area);
*/
Add a particular Area to the Areas object.
If an Area already exists with the same local authority code,  it will be
be overwrite. All data contained within the existing Area with those in the new
Area .
Add a particular Area to the Areas object . If an Area already exists with the same local authority code it will be be overwrite . All data contained within the existing Area with those in the new Area .
void Areas::setArea(std::string localAuthorityCode, Area area) {
    if(areas.find(localAuthorityCode) == areas.end()){
        areas.insert(std::pair<std::string, Area>(localAuthorityCode, area));
    }else{
        area.merge(areas.at(localAuthorityCode));
        areas.at(localAuthorityCode) = area;
    }
}
void Areas :: setArea ( std :: string localAuthorityCode , Area area ) { if ( areas . find ( localAuthorityCode ) == areas . end ( ) ) { areas . insert ( std :: pair < std :: string , Area > ( localAuthorityCode , area ) ) ; } else { area . merge ( areas . at ( localAuthorityCode ) ) ; areas . at ( localAuthorityCode ) = area ; } }
Add a particular Area to the Areas object.
Add a particular Area to the Areas object .