Mercurial > hg > orthanc
diff Core/JobsEngine/IJobUnserializer.h @ 2652:a3f0f61a14ca jobs
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 04 Jun 2018 12:36:24 +0200 |
parents | e1893d31652a |
children | c196d76cb8fa |
line wrap: on
line diff
--- a/Core/JobsEngine/IJobUnserializer.h Mon Jun 04 11:53:12 2018 +0200 +++ b/Core/JobsEngine/IJobUnserializer.h Mon Jun 04 12:36:24 2018 +0200 @@ -37,6 +37,8 @@ #include "Operations/JobOperationValue.h" #include "Operations/IJobOperation.h" +#include <vector> + namespace Orthanc { class IJobUnserializer : public boost::noncopyable @@ -46,8 +48,7 @@ { } - virtual IJob* UnserializeJob(const std::string& jobType, - const Json::Value& value) = 0; + virtual IJob* UnserializeJob(const Json::Value& value) = 0; virtual IJobOperation* UnserializeOperation(const Json::Value& value) = 0; @@ -61,5 +62,20 @@ static unsigned int GetUnsignedInteger(const Json::Value& value, const std::string& name); + + static bool GetBoolean(const Json::Value& value, + const std::string& name); + + static void GetArrayOfStrings(std::vector<std::string>& target, + const Json::Value& value, + const std::string& name); + + static void GetListOfStrings(std::list<std::string>& target, + const Json::Value& value, + const std::string& name); + + static void GetSetOfStrings(std::set<std::string>& target, + const Json::Value& value, + const std::string& name); }; }