42 std::copy_if( all_types.begin(), all_types.end(), std::back_inserter(
m_importableTypes ),
45 return !alg::contains( aBlacklist, arg );
52 std::unique_ptr<GRAPHICS_IMPORT_PLUGIN> ret;
56 case DXF: ret = std::make_unique<DXF_IMPORT_PLUGIN>();
break;
58 case SVG: ret = std::make_unique<SVG_IMPORT_PLUGIN>();
break;
60 default:
throw std::runtime_error(
"Unhandled graphics format" );
break;
68 const wxString& aExtension )
const
73 auto fileExtensions = plugin->GetFileExtensions();
GFX_FILE_T
< List of handled file types.
std::unique_ptr< GRAPHICS_IMPORT_PLUGIN > GetPluginByExt(const wxString &aExtension) const
Returns a plugin instance for a specific file type.
std::vector< GFX_FILE_T > TYPE_LIST
TYPE_LIST GetImportableFileTypes() const
Returns a plugin that handles a specific file extension.
GRAPHICS_IMPORT_MGR(const TYPE_LIST &aBlacklist)
Construct an import plugin manager, with a specified list of filetypes that are not permitted (can be...
std::unique_ptr< GRAPHICS_IMPORT_PLUGIN > GetPlugin(GFX_FILE_T aType) const
TYPE_LIST m_importableTypes
bool compareFileExtensions(const std::string &aExtension, const std::vector< std::string > &aReference, bool aCaseSensitive)
Compare the given extension against the reference extensions to see if it matches any of the referenc...
MODEL3D_FORMAT_TYPE fileType(const char *aFileName)