34 const auto exts = aPlugin.GetFileExtensions();
36 for(
const auto& ext : exts )
38 std::regex ext_reg( ext );
40 if( std::regex_match( aExt, ext_reg ) )
68 "Scalable Vector Graphics",
72 {
"png",
"jpg",
"jpeg",
"bmp",
"gif" },
86 auto plugin = mgr.GetPlugin( c.m_type );
92 for(
const auto& ext : c.m_exts )
95 "Plugin '" << plugin->GetName() <<
"' handles extension: " << ext );
110 for(
const auto& ext : c.m_exts )
112 auto plugin = mgr.GetPluginByExt( wxString( ext ) );
Manage vector graphics importers.
GFX_FILE_T
List of handled file types.
Interface for vector graphics import plugins.
std::vector< std::string > m_exts
The list of extensions we expect this plugin to handle.
GRAPHICS_IMPORT_MGR::GFX_FILE_T m_type
std::string m_name
The name of the plugin.
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_CASE(SelectByType)
Check we can look a plugin up by type and get the right one.
static bool pluginHandlesExt(const GRAPHICS_IMPORT_PLUGIN &aPlugin, const std::string &aExt)
Declares a struct as the Boost test fixture.
static const std::vector< TYPE_TO_EXTS > type_to_ext_cases
BOOST_AUTO_TEST_SUITE_END()