2 #include <cpPlugins/Interface.h>
4 int main( int argc, char* argv[] )
9 << "Usage: " << argv[ 0 ] << " plugins_libraries_dir" << std::endl;
15 cpPlugins::Interface* interface = NULL;
18 interface = new cpPlugins::Interface( );
19 interface->LoadPluginDir( argv[ 1 ] );
21 catch( std::exception& err )
23 if( interface != NULL )
33 // Show loaded plugins
34 auto plugins = interface->GetPlugins( );
35 for( auto pIt = plugins.begin( ); pIt != plugins.end( ); ++pIt )
36 std::cout << "Plugin: " << *pIt << std::endl;
37 std::cout << std::endl;
39 // Show loaded filters
40 auto filters = interface->GetFilters( );
41 for( auto cIt = filters.begin( ); cIt != filters.end( ); ++cIt )
43 std::cout << "Category: " << cIt->first << std::endl;
44 for( auto nIt = cIt->second.begin( ); nIt != cIt->second.end( ); ++nIt )
46 << "\tFilter: " << *nIt
51 // Free all and finish