]> Creatis software - cpPlugins.git/blobdiff - appli/examples/plugins/GuessPlugins.cxx
Cast image filter added. ROI filter modified.
[cpPlugins.git] / appli / examples / plugins / GuessPlugins.cxx
index 6704b9b400189c3fcb4291c4aa976f5fc8d208a5..4a745eb837e74bbe9028ef94c5bd8f7fafd727ff 100644 (file)
@@ -1,25 +1,28 @@
-#include <iostream>
+
 #include <cpPlugins/Interface/Plugins.h>
 
 int main( int argc, char* argv[] )
 {
-  // Create interface and load library
-  typedef cpPlugins::Interface::Plugins TPlugins;
-  TPlugins::Pointer interface = TPlugins::New( );
+  // Useful types
+  typedef cpPlugins::Interface::Plugins _TPlugins;
+
+  // Load an interface to the plugins system
+  _TPlugins::Pointer plugins = _TPlugins::New( );
+
+  // Guess reachable plugins
   try
   {
-    interface->LoadEnvironments( );
-    interface->GuessPlugins( );
+    plugins->GuessPlugins( );
   }
   catch( std::exception& err )
   {
-    std::cerr << "Error caught: " << err.what( ) << std::endl;
+    std::cerr << "Error: " << err.what( ) << std::endl;
     return( 1 );
 
   } // yrt
 
-  // Show data and finish
-  interface->Print( std::cout );
+  // Show plugins and exit
+  plugins->Print( std::cout );
   return( 0 );
 }