title: a simple way to read configuration properties
body: <p>I am trying to add few configurable properties to an existing code/project. I found it is really annoyance to have so many steps to do this:</p>
  
  <ol>
  <li>add entry to the configuration file;</li>
  <li>declare a key string in the h file;</li>
  <li>define that key string in the cpp file;</li>
  <li>declare a getXXX method/function in the h file;</li>
  <li>define that getXXX method/function in the cpp file;</li>
  </ol>
  
  <p>In our case, that header file and cpp file are only for properties read from text file and those properties are only needed inside this module. So we may be able to simplify them with less files or less steps. Any idea/suggestion?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>A map is used to hold contents from the text file. </p>
  
  <p>A sample get method likes this:</p>
  
  <pre><code>unsigned int Module1Config::getSleepTime()
  {
      return getPropertyMap().getUnsignedIntProperty(SLEEP_TIME_KEY);
  }
  </code></pre>