Mercurial > hg > orthanc
changeset 1178:c71d25e6a63c db-changes
improvement
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 24 Sep 2014 17:40:29 +0200 |
parents | 5b2d8c280ac2 |
children | cbd1f05b4ef2 |
files | Plugins/Engine/OrthancPlugins.cpp |
diffstat | 1 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp Wed Sep 24 17:37:44 2014 +0200 +++ b/Plugins/Engine/OrthancPlugins.cpp Wed Sep 24 17:40:29 2014 +0200 @@ -375,18 +375,25 @@ ResourceType resourceType, const std::string& publicId) { + OrthancPluginChangeType c; + OrthancPluginResourceType r; + + try + { + c = Convert(changeType); + r = Convert(resourceType); + } + catch (OrthancException&) + { + // This change type or resource type is not supported by the plugin SDK + return; + } + for (PImpl::OnChangeCallbacks::const_iterator callback = pimpl_->onChangeCallbacks_.begin(); callback != pimpl_->onChangeCallbacks_.end(); ++callback) { - try - { - (*callback) (Convert(changeType), Convert(resourceType), publicId.c_str()); - } - catch (OrthancException&) - { - // This change type or resource type is not supported by the plugin SDK - } + (*callback) (c, r, publicId.c_str()); } }