X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestCommand.cxx;h=642d5c0c72bfac99f9118029648620f2ea3c010e;hb=721d134c6e594b9a23bf1ce002ed87bfbc1576a7;hp=50d8f71abafea0e420e952bfde65ef8b80f36f4b;hpb=f20b06421e1aafe503f25f93be917859e8c3f8e5;p=gdcm.git diff --git a/Testing/TestCommand.cxx b/Testing/TestCommand.cxx index 50d8f71a..642d5c0c 100644 --- a/Testing/TestCommand.cxx +++ b/Testing/TestCommand.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestCommand.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 17:28:58 $ - Version: $Revision: 1.3 $ + Date: $Date: 2007/05/23 14:18:06 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -22,7 +22,7 @@ #include #include -class CommandTest : public gdcm::Command +class CommandTest : public GDCM_NAME_SPACE::Command { gdcmTypeMacro(CommandTest); gdcmNewMacro(CommandTest); @@ -46,7 +46,7 @@ private: }; static bool fctExecuted = false; -void CallbackTest(gdcm::CallbackCommand *cmd) +void CallbackTest(GDCM_NAME_SPACE::CallbackCommand *cmd) { std::cout << "Test class command... for " << typeid(cmd->GetObject()).name() @@ -56,35 +56,35 @@ void CallbackTest(gdcm::CallbackCommand *cmd) fctExecuted = true; } -int TestCommand(int argc, char *argv[]) +int TestCommand(int , char *[]) { int error=0; - gdcm::CallbackCommand *cbk = gdcm::CallbackCommand::New(); + GDCM_NAME_SPACE::CallbackCommand *cbk = GDCM_NAME_SPACE::CallbackCommand::New(); cbk->SetCallback(CallbackTest); - gdcm::CommandManager::SetCommand(NULL,1,cbk); + GDCM_NAME_SPACE::CommandManager::SetCommand(NULL,1,cbk); cbk->Delete(); CommandTest *cmd = CommandTest::New(); - gdcm::CommandManager::SetCommand(NULL,2,cmd); + GDCM_NAME_SPACE::CommandManager::SetCommand(NULL,2,cmd); cmd->Delete(); std::cout << "Test on callback function execution\n"; - gdcm::CommandManager::ExecuteCommand(NULL,1,"Test on callback function"); + GDCM_NAME_SPACE::CommandManager::ExecuteCommand(NULL,1,"Test on callback function"); if(!fctExecuted) std::cout<<"... Failed\n"; error+=!fctExecuted; std::cout << std::endl; std::cout << "Test on command class execution\n"; - gdcm::CommandManager::ExecuteCommand(NULL,2,"Test on command class"); + GDCM_NAME_SPACE::CommandManager::ExecuteCommand(NULL,2,"Test on command class"); if(!cmd->IsExecuted()) std::cout<<"... Failed\n"; error+=!cmd->IsExecuted(); std::cout << std::endl; std::cout << "Test on unset command execution\n"; - gdcm::CommandManager::ExecuteCommand(NULL,3,"Test on callback function"); + GDCM_NAME_SPACE::CommandManager::ExecuteCommand(NULL,3,"Test on callback function"); std::cout << std::endl; return error;