X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=appli%2Fexamples%2Fexample_LoadPlugins.cxx;h=e46a5db137487004897407233402a412596aa6b4;hb=e9fba2cf4f290e7dbdd195086025737863c538cd;hp=4bc43d041b427914bbcc00ed2ac73b593316a357;hpb=cb833d2fface96e020fe91584d2206860a8174ee;p=cpPlugins.git diff --git a/appli/examples/example_LoadPlugins.cxx b/appli/examples/example_LoadPlugins.cxx index 4bc43d0..e46a5db 100644 --- a/appli/examples/example_LoadPlugins.cxx +++ b/appli/examples/example_LoadPlugins.cxx @@ -18,16 +18,19 @@ int main( int argc, char* argv[] ) typedef TInterface::TClasses TClasses; TInterface plugins; - plugins.Load( plugins_file ); + if( !plugins.Load( plugins_file ) ) + { + std::cerr << "Error loading plugins file." << std::endl; + return( 1 ); + } // fi + std::cout << "---------------------------------------------" << std::endl; std::cout << "Loaded classes:" << std::endl; TClasses::const_iterator cIt = plugins.GetClasses( ).begin( ); - TClasses::const_iterator end_cIt = plugins.GetClasses( ).end( ); - for( ; cIt != end_cIt; ++cIt ) + for( ; cIt != plugins.GetClasses( ).end( ); ++cIt ) std::cout << " := " << cIt->first << std::endl; std::cout << "---------------------------------------------" << std::endl; - return( 0 ); }