]> Creatis software - cpPlugins.git/blob - appli/examples/plugins/example_GuessPlugins.cxx
...
[cpPlugins.git] / appli / examples / plugins / example_GuessPlugins.cxx
1 #include <iostream>
2 #include <cpPlugins/Interface.h>
3
4 int main( int argc, char* argv[] )
5 {
6   // Load interface
7   cpPlugins::Interface interface;
8   interface.GuessAccesiblePlugins( );
9
10   // Show loaded plugins
11   auto plugins = interface.GetPlugins( );
12   for( auto pIt = plugins.begin( ); pIt != plugins.end( ); ++pIt )
13     std::cout << "Plugin: " << *pIt << std::endl;
14   std::cout << std::endl;
15
16   // Show loaded filters
17   auto filters = interface.GetFilters( );
18   for( auto cIt = filters.begin( ); cIt != filters.end( ); ++cIt )
19   {
20     std::cout << "Category: " << cIt->first << std::endl;
21     for( auto nIt = cIt->second.begin( ); nIt != cIt->second.end( ); ++nIt )
22       std::cout
23         << "\tFilter: " << *nIt
24         << std::endl;
25
26   } // rof
27   return( 0 );
28 }
29
30 // eof - $RCSfile$