comparison 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
comparison
equal deleted inserted replaced
2651:1da5a052c777 2652:a3f0f61a14ca
35 35
36 #include "IJob.h" 36 #include "IJob.h"
37 #include "Operations/JobOperationValue.h" 37 #include "Operations/JobOperationValue.h"
38 #include "Operations/IJobOperation.h" 38 #include "Operations/IJobOperation.h"
39 39
40 #include <vector>
41
40 namespace Orthanc 42 namespace Orthanc
41 { 43 {
42 class IJobUnserializer : public boost::noncopyable 44 class IJobUnserializer : public boost::noncopyable
43 { 45 {
44 public: 46 public:
45 virtual ~IJobUnserializer() 47 virtual ~IJobUnserializer()
46 { 48 {
47 } 49 }
48 50
49 virtual IJob* UnserializeJob(const std::string& jobType, 51 virtual IJob* UnserializeJob(const Json::Value& value) = 0;
50 const Json::Value& value) = 0;
51 52
52 virtual IJobOperation* UnserializeOperation(const Json::Value& value) = 0; 53 virtual IJobOperation* UnserializeOperation(const Json::Value& value) = 0;
53 54
54 virtual JobOperationValue* UnserializeValue(const Json::Value& value) = 0; 55 virtual JobOperationValue* UnserializeValue(const Json::Value& value) = 0;
55 56
59 static int GetInteger(const Json::Value& value, 60 static int GetInteger(const Json::Value& value,
60 const std::string& name); 61 const std::string& name);
61 62
62 static unsigned int GetUnsignedInteger(const Json::Value& value, 63 static unsigned int GetUnsignedInteger(const Json::Value& value,
63 const std::string& name); 64 const std::string& name);
65
66 static bool GetBoolean(const Json::Value& value,
67 const std::string& name);
68
69 static void GetArrayOfStrings(std::vector<std::string>& target,
70 const Json::Value& value,
71 const std::string& name);
72
73 static void GetListOfStrings(std::list<std::string>& target,
74 const Json::Value& value,
75 const std::string& name);
76
77 static void GetSetOfStrings(std::set<std::string>& target,
78 const Json::Value& value,
79 const std::string& name);
64 }; 80 };
65 } 81 }