equal
deleted
inserted
replaced
27 #include <relpipe/writer/TypeId.h> |
27 #include <relpipe/writer/TypeId.h> |
28 |
28 |
29 #include <relpipe/cli/CLI.h> |
29 #include <relpipe/cli/CLI.h> |
30 #include <relpipe/cli/RelpipeCLIException.h> |
30 #include <relpipe/cli/RelpipeCLIException.h> |
31 |
31 |
32 #include "FilesystemCommand.h" |
32 #include "PlainFilesystemCommand.h" |
33 #include "ParallelFilesystemCommand.h" |
33 #include "ParallelFilesystemCommand.h" |
34 #include "CLIParser.h" |
34 #include "CLIParser.h" |
35 |
35 |
36 using namespace relpipe::cli; |
36 using namespace relpipe::cli; |
37 using namespace relpipe::writer; |
37 using namespace relpipe::writer; |
46 |
46 |
47 try { |
47 try { |
48 CLIParser cliParser; |
48 CLIParser cliParser; |
49 Configuration configuration = cliParser.parse(cli.arguments()); |
49 Configuration configuration = cliParser.parse(cli.arguments()); |
50 std::unique_ptr<FilesystemCommandBase> command; |
50 std::unique_ptr<FilesystemCommandBase> command; |
51 if (configuration.parallelism == 1) command = std::make_unique<FilesystemCommand>(); |
51 if (configuration.parallelism == 1) command = std::make_unique<PlainFilesystemCommand>(); |
52 else command = std::make_unique<ParallelFilesystemCommand>(); |
52 else command = std::make_unique<ParallelFilesystemCommand>(); |
53 command->process(cin, cout, configuration); |
53 command->process(cin, cout, configuration); |
54 resultCode = CLI::EXIT_CODE_SUCCESS; |
54 resultCode = CLI::EXIT_CODE_SUCCESS; |
55 } catch (RelpipeWriterException e) { |
55 } catch (RelpipeWriterException e) { |
56 fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str()); |
56 fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str()); |