measure.cpp
/*
  Retrieve a Measure's value for a given year.

  @param key
    The year to find the value for

  @return
    The value stored for the given year

  @throws
    std::out_of_range if year does not exist in Measure with the message
    No value found for year <year>

  @return
    The value

  @example
    std::string codename = "Pop";
    std::string label = "Population";
    Measure measure(codename, label);

    measure.setValue(1999, 12345678.9);
    ...
    auto value = measure.getValue(1999); // returns 12345678.9
*/
Retrieve a Measure's value for a given year.
Retrieve a Measure ' s value for a given year .
double Measure::getValue(unsigned int key){
    if(this->readings.find(key) == this->readings.end())
        throw std::out_of_range("No value found for year " + std::to_string(key));
    return this->readings.find(key)->second;
}
double Measure :: getValue ( unsigned int key ) { if ( this -> readings . find ( key ) == this -> readings . end ( ) ) throw std :: out_of_range ( " " + std :: to_string ( key ) ) ; return this -> readings . find ( key ) -> second ; }
Retrieve a Measure's value for a given year.
Retrieve a Measure ' s value for a given year .