| 8 | |
| 9 | typedef std::function<int(int, char**)> command_func_t; |
| 10 | int ShowHelp( |
| 11 | const std::vector<std::pair<std::string, command_func_t>>& commands) { |
| 12 | std::cout << "GLOMAP -- Global Structure-from-Motion" << std::endl |
| 13 | << std::endl; |
| 14 | |
| 15 | std::cout << "Usage:" << std::endl; |
| 16 | std::cout << " glomap mapper --database_path DATABASE --output_path MODEL" |
| 17 | << std::endl; |
| 18 | std::cout << " glomap mapper_resume --input_path MODEL_INPUT --output_path " |
| 19 | "MODEL_OUTPUT" |
| 20 | << std::endl; |
| 21 | |
| 22 | std::cout << "Available commands:" << std::endl; |
| 23 | std::cout << " help" << std::endl; |
| 24 | for (const auto& command : commands) { |
| 25 | std::cout << " " << command.first << std::endl; |
| 26 | } |
| 27 | std::cout << std::endl; |
| 28 | |
| 29 | return EXIT_SUCCESS; |
| 30 | } |
| 31 | |
| 32 | } // namespace |
| 33 | |