-------------------------------------------------------------------------
| 53 | |
| 54 | //------------------------------------------------------------------------- |
| 55 | boost::optional<OptionsExport> CreateExport( |
| 56 | const std::map<std::wstring, OptionsExportType>& exportTypes, |
| 57 | const ExportData& exportData) |
| 58 | { |
| 59 | auto it = exportTypes.find(exportData.exportType); |
| 60 | |
| 61 | if (it != exportTypes.end()) |
| 62 | { |
| 63 | OptionsExportType type = it->second; |
| 64 | auto exportOutputPath = exportData.argument; |
| 65 | |
| 66 | return OptionsExport{ |
| 67 | type, |
| 68 | std::wstring{exportData.exportType}, |
| 69 | exportOutputPath.empty() |
| 70 | ? std::nullopt |
| 71 | : std::make_optional(exportOutputPath)}; |
| 72 | } |
| 73 | |
| 74 | return boost::none; |
| 75 | } |
| 76 | |
| 77 | //------------------------------------------------------------------------- |
| 78 | bool TryAddExportPlugin(const std::vector<ExportPluginDescription>& |