comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2206:27106f7e3759

more refactoring of the worklist sample
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Dec 2016 16:29:34 +0100
parents 395522e46b2b
children c02f6ec404d8
comparison
equal deleted inserted replaced
2205:395522e46b2b 2206:27106f7e3759
172 OrthancPluginCreateDicomFlags flags); 172 OrthancPluginCreateDicomFlags flags);
173 173
174 void ReadFile(const std::string& path); 174 void ReadFile(const std::string& path);
175 175
176 void GetDicomQuery(const OrthancPluginWorklistQuery* query); 176 void GetDicomQuery(const OrthancPluginWorklistQuery* query);
177
178 void DicomToJson(Json::Value& target,
179 OrthancPluginDicomToJsonFormat format,
180 OrthancPluginDicomToJsonFlags flags,
181 uint32_t maxStringLength);
177 }; 182 };
178 183
179 184
180 class OrthancString : public boost::noncopyable 185 class OrthancString : public boost::noncopyable
181 { 186 {
195 ~OrthancString() 200 ~OrthancString()
196 { 201 {
197 Clear(); 202 Clear();
198 } 203 }
199 204
205 // This transfers ownership, warning: The string must have been
206 // allocated by the Orthanc core
200 void Assign(char* str); 207 void Assign(char* str);
201 208
202 const char* GetContent() const 209 const char* GetContent() const
203 { 210 {
204 return str_; 211 return str_;
205 } 212 }
206 213
207 void ToString(std::string& target) const; 214 void ToString(std::string& target) const;
208 215
209 void ToJson(Json::Value& target) const; 216 void ToJson(Json::Value& target) const;
210
211 void DicomToJson(const OrthancPlugins::MemoryBuffer& dicom,
212 OrthancPluginDicomToJsonFormat format,
213 OrthancPluginDicomToJsonFlags flags,
214 uint32_t maxStringLength);
215 }; 217 };
216 218
217 219
218 class OrthancConfiguration : public boost::noncopyable 220 class OrthancConfiguration : public boost::noncopyable
219 { 221 {