+#include <iostream>
+#include <cpPlugins/Interface/Loader.h>
+#include <cpPlugins/OS/FileSystem.h>
+#include <cpPlugins/Interface/Workspace.h>
int main( int argc, char* argv[] )
{
- return( 0 );
+ if( argc < 2 )
+ {
+ std::cerr
+ << "Usage: " << argv[ 0 ] << " workspace"
+ << std::endl;
+ return( 1 );
+
+ } // fi
+
+ // Get plugins loader
+ cpPlugins::Interface::Loader loader;
+ loader.GuessEnvironment( cpPlugins::OS::FileSystem::CanonicalPath( "." ) );
+
+ int ret = 0;
+ try
+ {
+ // Prepare workspace
+ cpPlugins::Interface::Workspace::Pointer workspace =
+ cpPlugins::Interface::Workspace::New( );
+ workspace->Load( argv[ 1 ] );
+
+ // Execute workspace
+ workspace->PrintExecutionOn( );
+ workspace->Update( );
+ }
+ catch( std::exception& err )
+ {
+ std::cerr << "Error caught: " << err.what( ) << std::endl;
+ ret = 1;
+
+ } // yrt
+
+ // Close connection to loaded plugins file and finish execution
+ loader.UnRegisterAll( );
+ return( ret );
}
// eof - $RCSfile$