2 #include <cpPlugins/Interface.h>
4 int main( int argc, char* argv[] )
8 std::cerr << "Usage: " << argv[ 0 ] << " plugins_library" << std::endl;
14 cpPlugins::Interface* interface = NULL;
17 interface = new cpPlugins::Interface( );
18 interface->LoadPluginFile( argv[ 1 ] );
20 catch( std::exception& err )
22 if( interface != NULL )
32 // Show loaded plugins
33 auto plugins = interface->GetPlugins( );
34 for( auto pIt = plugins.begin( ); pIt != plugins.end( ); ++pIt )
35 std::cout << "Plugin: " << *pIt << std::endl;
36 std::cout << std::endl;
38 // Show loaded filters
39 auto filters = interface->GetFilters( );
40 for( auto cIt = filters.begin( ); cIt != filters.end( ); ++cIt )
42 std::cout << "Category: " << cIt->first << std::endl;
43 for( auto nIt = cIt->second.begin( ); nIt != cIt->second.end( ); ++nIt )
45 << "\tFilter: " << *nIt
50 // Free all and finish