| 114 | } |
| 115 | |
| 116 | int main(int argc, char** argv) { |
| 117 | set_log_level(LiteLogLevel::WARN); |
| 118 | auto&& args = Args::from_argv(argc, argv); |
| 119 | if (args.args_parse_ret) |
| 120 | return -1; |
| 121 | auto map = get_example_function_map(); |
| 122 | auto example = (*map)[args.example_name]; |
| 123 | if (example) { |
| 124 | printf("Begin to run %s example.\n", args.example_name.c_str()); |
| 125 | if (example(args)) { |
| 126 | return 0; |
| 127 | } else { |
| 128 | return -1; |
| 129 | } |
| 130 | } else { |
| 131 | printf("The example of %s is not registed.", args.example_name.c_str()); |
| 132 | return -1; |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}} |
nothing calls this directly
no test coverage detected