| 15 | |
| 16 | |
| 17 | int main(int argc, char* argv[]) { |
| 18 | ProgramArgument& arguments = ProgramArgument::Instance(); |
| 19 | |
| 20 | arguments.Parse(argc,argv); |
| 21 | |
| 22 | if (arguments.Help()) { |
| 23 | arguments.ShowHelp(); |
| 24 | return EXIT_SUCCESS; |
| 25 | } |
| 26 | |
| 27 | if (arguments.Version()) { |
| 28 | arguments.ShowVersion(); |
| 29 | return EXIT_SUCCESS; |
| 30 | } |
| 31 | |
| 32 | LogToConsole logger; |
| 33 | |
| 34 | const auto& input_files = arguments.InputFiles(); |
| 35 | const auto& output_dir = arguments.OutputDirectory(); |
| 36 | |
| 37 | CreateFileList creator; |
| 38 | creator.OutputPath(output_dir); |
| 39 | creator.MakeFileList(input_files); |
| 40 | |
| 41 | if (creator.Files().empty()) { |
| 42 | MDF_ERROR() << "There is no MDF files to convert."; |
| 43 | return EXIT_FAILURE; |
| 44 | } |
| 45 | |
| 46 | for (const auto& file : creator.Files()) { |
| 47 | creator.ConvertMdfFile(file); |
| 48 | } |
| 49 | |
| 50 | return EXIT_SUCCESS; |
| 51 | } |
nothing calls this directly
no test coverage detected