[Jahshaka-cvs] openlibraries/test/openpluginlib/enumerate enumerate.cpp, 1.5, 1.6
Status: Beta
Brought to you by:
jahshaka
From: Goncalo N. M. de C. <gl...@us...> - 2007-04-01 16:42:57
|
Update of /cvsroot/openlibraries/openlibraries/test/openpluginlib/enumerate In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5397 Modified Files: enumerate.cpp Log Message: + updated test Index: enumerate.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/test/openpluginlib/enumerate/enumerate.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- enumerate.cpp 13 Sep 2006 13:55:26 -0000 1.5 +++ enumerate.cpp 1 Apr 2007 16:42:53 -0000 1.6 @@ -7,32 +7,27 @@ // unit test to enumerate all available plugins -#include <cassert> #include <iostream> #include <openpluginlib/pl/openpluginlib.hpp> namespace opl = olib::openpluginlib; -int main( int argc, char* argv[ ] ) +int main( ) { - if( argc > 1 ) - { - if( !opl::init( argv[ 1 ] ) ) return 1; - - opl::discovery<> rez0; - rez0.sort( opl::highest_merit_sort( ) ); + opl::init( "" ); - std::cout << "enumerate: number of plugins available " << static_cast<unsigned int>( rez0.size( ) ) << ".\n"; + opl::discovery<> rez0; + rez0.sort( opl::highest_merit_sort( ) ); - opl::discovery<>::const_iterator i = rez0.begin( ); - while( i != rez0.end( ) ) - { - std::wcout << "\tname: " << i->name( ) << L" type: " << i->type( ) << L".\n"; - - ++i; - } + std::cout << "enumerate: number of plugins available " << static_cast<unsigned int>( rez0.size( ) ) << ".\n"; - opl::uninit( ); + opl::discovery<>::const_iterator i = rez0.begin( ); + while( i != rez0.end( ) ) + { + std::wcout << "\tname: " << i->name( ) << L" type: " << i->type( ) << L".\n"; + ++i; } + + opl::uninit( ); } |