2 #include <cpPlugins/Interface.h>
4 int main( int argc, char* argv[] )
9 std::cerr << "Usage: " << argv[ 0 ] << " library_file" << std::endl;
13 std::string library_file = argv[ 1 ];
15 // Create interface and load library
16 cpPlugins::Interface interface;
19 interface.LoadEnvironment( );
20 interface.LoadFile( library_file );
22 catch( std::exception& err )
24 std::cerr << "Error caught: " << err.what( ) << std::endl;
30 std::cout << "----- PATHS -----" << std::endl;
31 auto paths = interface.GetPaths( );
32 for( auto paIt = paths.begin( ); paIt != paths.end( ); ++paIt )
33 std::cout << *paIt << std::endl;
34 std::cout << std::endl << "----- PLUGINS -----" << std::endl;
35 auto plugins = interface.GetPlugins( );
36 for( auto plIt = plugins.begin( ); plIt != plugins.end( ); ++plIt )
37 std::cout << *plIt << std::endl;
38 std::cout << std::endl << "----- FILTERS -----" << std::endl;
39 auto categories = interface.GetCategories( );
40 for( auto cIt = categories.begin( ); cIt != categories.end( ); ++cIt )
42 std::cout << "\t** Category: " << *cIt << " **" << std::endl;
43 auto filters = interface.GetFilters( *cIt );
44 for( auto fIt = filters.begin( ); fIt != filters.end( ); ++fIt )
45 std::cout << "\t\tFilter: " << *fIt << std::endl;