Mercurial > hg > orthanc
comparison OrthancServer/ServerJobs/OrthancJobUnserializer.cpp @ 2815:925d8dc03a23
unserialization of jobs from plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Sep 2018 16:34:21 +0200 |
parents | a21b244efb37 |
children | 218e2c864d1d |
comparison
equal
deleted
inserted
replaced
2814:7d1d3136f6cf | 2815:925d8dc03a23 |
---|---|
52 namespace Orthanc | 52 namespace Orthanc |
53 { | 53 { |
54 IJob* OrthancJobUnserializer::UnserializeJob(const Json::Value& source) | 54 IJob* OrthancJobUnserializer::UnserializeJob(const Json::Value& source) |
55 { | 55 { |
56 const std::string type = SerializationToolbox::ReadString(source, "Type"); | 56 const std::string type = SerializationToolbox::ReadString(source, "Type"); |
57 | |
58 #if ORTHANC_ENABLE_PLUGINS == 1 | |
59 if (context_.HasPlugins()) | |
60 { | |
61 std::auto_ptr<IJob> job(context_.GetPlugins().UnserializeJob(type, source)); | |
62 if (job.get() != NULL) | |
63 { | |
64 return job.release(); | |
65 } | |
66 } | |
67 #endif | |
57 | 68 |
58 if (type == "DicomModalityStore") | 69 if (type == "DicomModalityStore") |
59 { | 70 { |
60 return new DicomModalityStoreJob(context_, source); | 71 return new DicomModalityStoreJob(context_, source); |
61 } | 72 } |