Mercurial > hg > orthanc
comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2205:395522e46b2b
refactoring of the worklist sample using OrthancPluginCppWrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Dec 2016 16:16:25 +0100 |
parents | 1d0838b8e9c5 |
children | 27106f7e3759 |
comparison
equal
deleted
inserted
replaced
2204:0158f2de8cad | 2205:395522e46b2b |
---|---|
170 | 170 |
171 void CreateDicom(const Json::Value& tags, | 171 void CreateDicom(const Json::Value& tags, |
172 OrthancPluginCreateDicomFlags flags); | 172 OrthancPluginCreateDicomFlags flags); |
173 | 173 |
174 void ReadFile(const std::string& path); | 174 void ReadFile(const std::string& path); |
175 | |
176 void GetDicomQuery(const OrthancPluginWorklistQuery* query); | |
175 }; | 177 }; |
176 | 178 |
177 | 179 |
178 class OrthancString : public boost::noncopyable | 180 class OrthancString : public boost::noncopyable |
179 { | 181 { |
180 private: | 182 private: |
181 OrthancPluginContext* context_; | 183 OrthancPluginContext* context_; |
182 char* str_; | 184 char* str_; |
183 | 185 |
186 void Clear(); | |
187 | |
184 public: | 188 public: |
185 OrthancString(OrthancPluginContext* context, | 189 OrthancString(OrthancPluginContext* context) : |
186 char* str); | 190 context_(context), |
191 str_(NULL) | |
192 { | |
193 } | |
187 | 194 |
188 ~OrthancString() | 195 ~OrthancString() |
189 { | 196 { |
190 Clear(); | 197 Clear(); |
191 } | 198 } |
192 | 199 |
193 void Clear(); | 200 void Assign(char* str); |
194 | 201 |
195 const char* GetContent() const | 202 const char* GetContent() const |
196 { | 203 { |
197 return str_; | 204 return str_; |
198 } | 205 } |
199 | 206 |
200 void ToString(std::string& target) const; | 207 void ToString(std::string& target) const; |
201 | 208 |
202 void ToJson(Json::Value& target) const; | 209 void ToJson(Json::Value& target) const; |
210 | |
211 void DicomToJson(const OrthancPlugins::MemoryBuffer& dicom, | |
212 OrthancPluginDicomToJsonFormat format, | |
213 OrthancPluginDicomToJsonFlags flags, | |
214 uint32_t maxStringLength); | |
203 }; | 215 }; |
204 | 216 |
205 | 217 |
206 class OrthancConfiguration : public boost::noncopyable | 218 class OrthancConfiguration : public boost::noncopyable |
207 { | 219 { |