A ConfigFile locates, opens, and parses a library configuration file, and holds the values for the application to get.
More...
#include <config-file.hpp>
|
| ConfigFile () |
| Locate, open, and parse a library configuration file.
|
|
std::string | get (const std::string &key, const std::string &defaultValue) const |
| Get the value for the key, or a default value if not found. More...
|
|
const std::string & | getPath () const |
| Get the path of the configuration file. More...
|
|
const std::map< std::string, std::string > & | getParsedConfiguration () const |
| Get the configuration key/value pairs. More...
|
|
A ConfigFile locates, opens, and parses a library configuration file, and holds the values for the application to get.
std::string ndn::ConfigFile::get |
( |
const std::string & |
key, |
|
|
const std::string & |
defaultValue |
|
) |
| const |
|
inline |
Get the value for the key, or a default value if not found.
- Parameters
-
key | The key to search for. |
defaultValue | The default value if the key is not found. |
- Returns
- The value, or defaultValue if the key is not found.
const std::map<std::string, std::string>& ndn::ConfigFile::getParsedConfiguration |
( |
| ) |
const |
|
inline |
Get the configuration key/value pairs.
- Returns
- A map of key/value pairs.
const std::string& ndn::ConfigFile::getPath |
( |
| ) |
const |
|
inline |
Get the path of the configuration file.
- Returns
- The path or an empty string if not found.
The documentation for this class was generated from the following files: