| 79 | } |
| 80 | |
| 81 | std::unique_ptr<Dataset> createDataset(Command::DatasetType datasetType, |
| 82 | const std::vector<std::string> &pathList) |
| 83 | { |
| 84 | switch (datasetType) { |
| 85 | case Command::DatasetType::SimpleBinary: return std::make_unique<SimpleBinaryDataset>(pathList); |
| 86 | case Command::DatasetType::PackedBinary: return std::make_unique<PackedBinaryDataset>(pathList); |
| 87 | default: throw std::invalid_argument("unsupported dataset type"); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | } // namespace |
| 92 |