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