23 #ifndef NDN_CONFIG_FILE_HPP
24 #define NDN_CONFIG_FILE_HPP
43 class Error :
public std::exception {
45 Error(
const std::string& errorMessage)
throw()
46 : errorMessage_(errorMessage)
50 virtual ~
Error()
throw();
53 Msg()
const {
return errorMessage_; }
56 what()
const throw() {
return errorMessage_.c_str(); }
59 const std::string errorMessage_;
69 get(
const std::string& key,
const std::string& defaultValue)
const
71 std::map<std::string, std::string>::const_iterator found = config_.find(key);
72 if (found != config_.end())
89 const std::map<std::string, std::string>&
112 std::map<std::string, std::string> config_;
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
const std::string & getPath() const
Get the path of the configuration file.
Definition: config-file.hpp:83
Definition: config-file.hpp:43
const std::map< std::string, std::string > & getParsedConfiguration() const
Get the configuration key/value pairs.
Definition: config-file.hpp:90
A ConfigFile locates, opens, and parses a library configuration file, and holds the values for the ap...
Definition: config-file.hpp:36
ConfigFile()
Locate, open, and parse a library configuration file.
Definition: config-file.cpp:33