2 #include <cpPlugins/Interface/Plugins.h>
3 #include <cpPlugins/Interface/Workspace.h>
5 int main( int argc, char* argv[] )
11 << "Usage: " << argv[ 0 ]
12 << " workspace [parameters]" << std::endl;
17 // Create interface and load library
18 cpPlugins::Interface::Plugins::Pointer interface =
19 cpPlugins::Interface::Plugins::New( );
22 interface->AddEnvironments( "." );
23 interface->LoadPaths( "." );
24 interface->LoadEnvironments( );
25 interface->GuessPlugins( );
27 catch( std::exception& err )
29 std::cerr << "Error caught: " << err.what( ) << std::endl;
35 cpPlugins::Interface::Workspace::Pointer workspace =
36 cpPlugins::Interface::Workspace::New( );
39 workspace->Load( argv[ 1 ] );
41 catch( std::exception& err )
44 << "Error loading workspace \"" << argv[ 1 ]
45 << "\": " << err.what( ) << std::endl;
51 workspace->PrintExecutionOn( );
52 workspace->Execute( );