X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fexamples%2Fplugins%2Fexample_LoadPluginsFile.cxx;fp=appli%2Fexamples%2Fplugins%2Fexample_LoadPluginsFile.cxx;h=0000000000000000000000000000000000000000;hb=aa77db36cc1d87ba014c982a235239c3c87224f3;hp=52af772a7dc20436eea02295454ae857a35d0e4f;hpb=733108d258a27799df875ceda2d84c3cafea64d3;p=cpPlugins.git diff --git a/appli/examples/plugins/example_LoadPluginsFile.cxx b/appli/examples/plugins/example_LoadPluginsFile.cxx deleted file mode 100644 index 52af772..0000000 --- a/appli/examples/plugins/example_LoadPluginsFile.cxx +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include - -int main( int argc, char* argv[] ) -{ - if( argc < 2 ) - { - std::cerr << "Usage: " << argv[ 0 ] << " plugins_library" << std::endl; - return( 1 ); - - } // fi - - // Load interface - cpPlugins::Interface* interface = NULL; - try - { - interface = new cpPlugins::Interface( ); - interface->LoadPluginFile( argv[ 1 ] ); - } - catch( std::exception& err ) - { - if( interface != NULL ) - delete interface; - std::cerr - << "Error caught: " - << err.what( ) - << std::endl; - return( 1 ); - - } // yrt - - // Show loaded plugins - auto plugins = interface->GetPlugins( ); - for( auto pIt = plugins.begin( ); pIt != plugins.end( ); ++pIt ) - std::cout << "Plugin: " << *pIt << std::endl; - std::cout << std::endl; - - // Show loaded filters - auto filters = interface->GetFilters( ); - for( auto cIt = filters.begin( ); cIt != filters.end( ); ++cIt ) - { - std::cout << "Category: " << cIt->first << std::endl; - for( auto nIt = cIt->second.begin( ); nIt != cIt->second.end( ); ++nIt ) - std::cout - << "\tFilter: " << *nIt - << std::endl; - - } // rof - - // Free all and finish - delete interface; - return( 0 ); -} - -// eof - $RCSfile$