23 #include "cartographer/common/config.h" 24 #include "glog/logging.h" 30 const std::vector<std::string>& configuration_files_directories)
31 : configuration_files_directories_(configuration_files_directories) {
36 const std::string& basename) {
38 const std::string filename = path +
"/" + basename;
39 std::ifstream stream(filename.c_str());
41 LOG(INFO) <<
"Found '" << filename <<
"' for '" << basename <<
"'.";
45 LOG(FATAL) <<
"File '" << basename <<
"' was not found.";
49 const std::string& basename) {
51 std::ifstream stream(filename.c_str());
52 return std::string((std::istreambuf_iterator<char>(stream)),
53 std::istreambuf_iterator<char>());
ConfigurationFileResolver(const std::vector< std::string > &configuration_files_directories)
std::vector< std::string > configuration_files_directories_
std::string GetFileContentOrDie(const std::string &basename) override
std::string GetFullPathOrDie(const std::string &basename) override