comparison Core/Toolbox.h @ 2513:97a74f0eac7a

loading DICOM dictionaries in sandboxed environments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Mar 2018 18:02:07 +0200
parents 4dcafa8d6633
children 0196d07a900f
comparison
equal deleted inserted replaced
2512:4dcafa8d6633 2513:97a74f0eac7a
77 { 77 {
78 }; 78 };
79 79
80 namespace Toolbox 80 namespace Toolbox
81 { 81 {
82 class LinesIterator
83 {
84 private:
85 const std::string& content_;
86 size_t lineStart_;
87 size_t lineEnd_;
88
89 void FindEndOfLine();
90
91 public:
92 LinesIterator(const std::string& content);
93
94 bool GetLine(std::string& target) const;
95
96 void Next();
97 };
98
99
82 void ToUpperCase(std::string& s); // Inplace version 100 void ToUpperCase(std::string& s); // Inplace version
83 101
84 void ToLowerCase(std::string& s); // Inplace version 102 void ToLowerCase(std::string& s); // Inplace version
85 103
86 void ToUpperCase(std::string& result, 104 void ToUpperCase(std::string& result,
216 #endif 234 #endif
217 235
218 std::string GenerateUuid(); 236 std::string GenerateUuid();
219 } 237 }
220 } 238 }
239
240
241
242
243 /**
244 * The plain C, opaque data structure "OrthancLinesIterator" is a thin
245 * wrapper around Orthanc::Toolbox::LinesIterator, and is only used by
246 * "../Resources/WebAssembly/dcdict.cc", in order to avoid code
247 * duplication
248 **/
249
250 struct OrthancLinesIterator;
251
252 OrthancLinesIterator* OrthancLinesIterator_Create(const std::string& content);
253
254 bool OrthancLinesIterator_GetLine(std::string& target,
255 const OrthancLinesIterator* iterator);
256
257 void OrthancLinesIterator_Next(OrthancLinesIterator* iterator);
258
259 void OrthancLinesIterator_Free(OrthancLinesIterator* iterator);