annotate OrthancFramework/Sources/SerializationToolbox.h @ 5318:68e15471b408

added ParsedDicomFile::InjectEmptyPixelData()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 23 Jun 2023 18:01:55 +0200
parents f783b99e4738
children b31c73bc7cb6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
5185
0ea402b4d901 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4870
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
0ea402b4d901 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4870
diff changeset
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
9 * modify it under the terms of the GNU Lesser General Public License
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
11 * the License, or (at your option) any later version.
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
16 * Lesser General Public License for more details.
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
19 * License along with this program. If not, see
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
20 * <http://www.gnu.org/licenses/>.
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 **/
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
26 #include "DicomFormat/DicomTag.h"
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
27 #include "OrthancFramework.h"
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
28
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #include <json/value.h>
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <list>
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
31 #include <map>
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 namespace Orthanc
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
35 class ORTHANC_PUBLIC SerializationToolbox
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 {
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
37 public:
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
38 static std::string ReadString(const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
39 const std::string& field);
3870
09798f2b985f added a Timeout argument to every DICOM command + 'TargetAet' not mandatory anymore in /retrieve
Alain Mazy <alain@mazy.be>
parents: 3641
diff changeset
40
5255
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
41 static std::string ReadString(const Json::Value& value,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
42 const std::string& field,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
43 const std::string& defaultValue);
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
44
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
45 static int ReadInteger(const Json::Value& value,
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 const std::string& field);
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
48 static int ReadInteger(const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
49 const std::string& field,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
50 int defaultValue);
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
51
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
52 static unsigned int ReadUnsignedInteger(const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
53 const std::string& field);
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
54
4451
f4dbdb2dcba6 new configuration option "MaximumPduLength" to tune the maximum PDU length
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
55 static unsigned int ReadUnsignedInteger(const Json::Value& value,
f4dbdb2dcba6 new configuration option "MaximumPduLength" to tune the maximum PDU length
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
56 const std::string& field,
f4dbdb2dcba6 new configuration option "MaximumPduLength" to tune the maximum PDU length
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
57 unsigned int defaultValue);
f4dbdb2dcba6 new configuration option "MaximumPduLength" to tune the maximum PDU length
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
58
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
59 static bool ReadBoolean(const Json::Value& value,
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
60 const std::string& field);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
61
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
62 static void ReadArrayOfStrings(std::vector<std::string>& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
63 const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
64 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
65
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
66 static void ReadListOfStrings(std::list<std::string>& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
67 const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
68 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
69
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
70 static void ReadSetOfStrings(std::set<std::string>& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
71 const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
72 const std::string& field);
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
73
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
74 static void ReadSetOfTags(std::set<DicomTag>& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
75 const Json::Value& value,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
76 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
77
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
78 static void ReadMapOfStrings(std::map<std::string, std::string>& target,
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
79 const Json::Value& value,
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
80 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
81
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
82 static void ReadMapOfTags(std::map<DicomTag, std::string>& target,
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
83 const Json::Value& value,
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
84 const std::string& field);
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
85
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
86 static void WriteArrayOfStrings(Json::Value& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
87 const std::vector<std::string>& values,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
88 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
89
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
90 static void WriteListOfStrings(Json::Value& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
91 const std::list<std::string>& values,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
92 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
93
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
94 static void WriteSetOfStrings(Json::Value& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
95 const std::set<std::string>& values,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
96 const std::string& field);
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
97
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
98 static void WriteSetOfTags(Json::Value& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
99 const std::set<DicomTag>& tags,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
100 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
101
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
102 static void WriteMapOfStrings(Json::Value& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
103 const std::map<std::string, std::string>& values,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
104 const std::string& field);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
105
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
106 static void WriteMapOfTags(Json::Value& target,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
107 const std::map<DicomTag, std::string>& values,
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
108 const std::string& field);
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
109
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
110 static bool ParseInteger32(int32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
111 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
112
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
113 static bool ParseInteger64(int64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
114 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
115
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
116 static bool ParseUnsignedInteger32(uint32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
117 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
118
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
119 static bool ParseUnsignedInteger64(uint64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
120 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
121
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
122 static bool ParseFloat(float& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
123 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
124
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
125 static bool ParseDouble(double& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
126 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
127
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
128 static bool ParseFirstInteger32(int32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
129 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
130
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
131 static bool ParseFirstInteger64(int64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
132 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
133
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
134 static bool ParseFirstUnsignedInteger32(uint32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
135 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
136
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
137 static bool ParseFirstUnsignedInteger64(uint64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
138 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
139
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
140 static bool ParseFirstFloat(float& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
141 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
142
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
143 static bool ParseFirstDouble(double& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
144 const std::string& value);
4834
bec432ee1094 download of numpy arrays from the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
145
bec432ee1094 download of numpy arrays from the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
146 static bool ParseBoolean(bool& result,
bec432ee1094 download of numpy arrays from the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
147 const std::string& value);
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
148 };
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 }