| 314 | }; |
| 315 | |
| 316 | bool launchCommand(const std::pair<std::string, std::string>& command) |
| 317 | { |
| 318 | const auto& func_it = valid_seq_commands.find(command.first); |
| 319 | if (func_it != valid_seq_commands.end()) { |
| 320 | (func_it->second)(command.second); |
| 321 | } else { |
| 322 | std::cerr << "\t[Error] invalid command \"" << command.first << "\"" << std::endl; |
| 323 | return false; |
| 324 | } |
| 325 | return true; |
| 326 | } |
| 327 | |
| 328 | /****** Utility functions ******/ |
| 329 | inline bool file_exists(const std::string& name); |