measure.cpp
/*
  Add a particular year's value to the Measure object. If a value already
  exists for the year, replace it.

  @param key
    The year to insert a value at

  @param value
    The value for the given year

  @return
    void

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

    measure.setValue(1999, 12345678.9);
*/
Add a particular year's value to the Measure object. If a value already
exists for the year, replace it.
Add a particular year ' s value to the Measure object . If a value already exists for the year replace it .
void Measure::setValue(unsigned int key, double value){
    if(this->readings.find(key) != this->readings.end())
        this->readings.find(key)->second = value;
    this->readings.insert(std::pair<unsigned int, double>(key,value));
}
void Measure :: setValue ( unsigned int key , double value ) { if ( this -> readings . find ( key ) != this -> readings . end ( ) ) this -> readings . find ( key ) -> second = value ; this -> readings . insert ( std :: pair < unsigned int , double > ( key , value ) ) ; }
Add a particular year's value to the Measure object.
Add a particular year ' s value to the Measure object .