Mercurial > hg > orthanc-client
diff CppClient/ThreadedCommandProcessor.cpp @ 6:c584c25a74fd
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jun 2015 10:22:49 +0200 |
parents | 798076adf9e9 |
children | e59bf2554e59 |
line wrap: on
line diff
--- a/CppClient/ThreadedCommandProcessor.cpp Tue Jun 02 10:11:34 2015 +0200 +++ b/CppClient/ThreadedCommandProcessor.cpp Tue Jun 02 10:22:49 2015 +0200 @@ -34,7 +34,7 @@ #include "../Orthanc/Core/OrthancException.h" -namespace Orthanc +namespace OrthancClient { static const int32_t TIMEOUT = 10; @@ -43,7 +43,7 @@ { while (!that->done_) { - std::auto_ptr<IDynamicObject> command(that->queue_.Dequeue(TIMEOUT)); + std::auto_ptr<Orthanc::IDynamicObject> command(that->queue_.Dequeue(TIMEOUT)); if (command.get() != NULL) { @@ -63,7 +63,7 @@ } else { - success = dynamic_cast<ICommand&>(*command).Execute(); + success = dynamic_cast<Orthanc::ICommand&>(*command).Execute(); } } else @@ -71,7 +71,7 @@ // A command has already failed. Skip the execution of this command. } } - catch (OrthancException) + catch (Orthanc::OrthancException&) { } @@ -117,7 +117,7 @@ { if (numThreads < 1) { - throw OrthancException(ErrorCode_ParameterOutOfRange); + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } listener_ = NULL; @@ -156,11 +156,11 @@ } - void ThreadedCommandProcessor::Post(ICommand* command) + void ThreadedCommandProcessor::Post(Orthanc::ICommand* command) { if (command == NULL) { - throw OrthancException(ErrorCode_ParameterOutOfRange); + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } boost::mutex::scoped_lock lock(mutex_);