annotate OrthancFramework/Sources/SerializationToolbox.h @ 5644:343149762476

fix build with DCMTK <= 3.6.6
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 31 May 2024 18:23:44 +0200
parents f7adfb22e20e
children
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
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5380
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 *
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * 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
10 * 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
11 * 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
12 * the License, or (at your option) any later version.
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * 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
17 * Lesser General Public License for more details.
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 *
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
19 * 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
20 * 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
21 * <http://www.gnu.org/licenses/>.
2656
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
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #pragma once
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
27 #include "DicomFormat/DicomTag.h"
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
28 #include "OrthancFramework.h"
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
29
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <json/value.h>
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 #include <list>
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
32 #include <map>
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 namespace Orthanc
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
36 class ORTHANC_PUBLIC SerializationToolbox
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
38 public:
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
39 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
40 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
41
5255
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
42 static std::string ReadString(const Json::Value& value,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
43 const std::string& field,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
44 const std::string& defaultValue);
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
45
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
46 static int ReadInteger(const Json::Value& value,
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 const std::string& field);
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
49 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
50 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
51 int defaultValue);
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
52
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
53 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
54 const std::string& field);
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
55
4451
f4dbdb2dcba6 new configuration option "MaximumPduLength" to tune the maximum PDU length
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
56 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
57 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
58 unsigned int defaultValue);
f4dbdb2dcba6 new configuration option "MaximumPduLength" to tune the maximum PDU length
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
59
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
60 static bool ReadBoolean(const Json::Value& value,
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
61 const std::string& field);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
62
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
63 static void ReadArrayOfStrings(std::vector<std::string>& target,
5380
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
64 const Json::Value& valueObject,
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
65 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
66
5379
b31c73bc7cb6 Toolbox : more set functions
Alain Mazy <am@osimis.io>
parents: 5255
diff changeset
67 static void ReadArrayOfStrings(std::vector<std::string>& target,
5380
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
68 const Json::Value& valueArray);
5379
b31c73bc7cb6 Toolbox : more set functions
Alain Mazy <am@osimis.io>
parents: 5255
diff changeset
69
3991
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 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
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);
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
73
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 ReadSetOfStrings(std::set<std::string>& target,
5380
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
75 const Json::Value& valueObject,
3991
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);
2662
47d812308d63 serialization of DicomModification
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2656
diff changeset
77
5379
b31c73bc7cb6 Toolbox : more set functions
Alain Mazy <am@osimis.io>
parents: 5255
diff changeset
78 static void ReadSetOfStrings(std::set<std::string>& target,
5380
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
79 const Json::Value& valueArray);
5379
b31c73bc7cb6 Toolbox : more set functions
Alain Mazy <am@osimis.io>
parents: 5255
diff changeset
80
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
81 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
82 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
83 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
84
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
85 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
86 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
87 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
88
4203
4d42408da117 improving const-correctness in ParsedDicomFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
89 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
90 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
91 const std::string& field);
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
92
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
93 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
94 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
95 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
96
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
97 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
98 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
99 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
100
5380
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
101 static void WriteSetOfStrings(Json::Value& targetObject,
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
102 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
103 const std::string& field);
2845
218e2c864d1d serialization of SplitStudyJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2662
diff changeset
104
5380
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
105 static void WriteSetOfStrings(Json::Value& targetArray,
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
106 const std::set<std::string>& values);
97004471a5c5 Toolbox : more set functions (cont)
Alain Mazy <am@osimis.io>
parents: 5379
diff changeset
107
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
108 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
109 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
110 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
111
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
112 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
113 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
114 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
115
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3870
diff changeset
116 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
117 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
118 const std::string& field);
4775
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
119
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
120 static bool ParseInteger32(int32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
121 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
122
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
123 static bool ParseInteger64(int64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
124 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
125
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
126 static bool ParseUnsignedInteger32(uint32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
127 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
128
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
129 static bool ParseUnsignedInteger64(uint64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
130 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
131
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
132 static bool ParseFloat(float& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
133 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
134
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
135 static bool ParseDouble(double& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
136 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
137
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
138 static bool ParseFirstInteger32(int32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
139 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
140
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
141 static bool ParseFirstInteger64(int64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
142 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
143
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
144 static bool ParseFirstUnsignedInteger32(uint32_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
145 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
146
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
147 static bool ParseFirstUnsignedInteger64(uint64_t& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
148 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
149
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
150 static bool ParseFirstFloat(float& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
151 const std::string& value);
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
152
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
153 static bool ParseFirstDouble(double& result,
add0337b928a refactoring parsing of numbers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4451
diff changeset
154 const std::string& value);
4834
bec432ee1094 download of numpy arrays from the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
155
bec432ee1094 download of numpy arrays from the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
156 static bool ParseBoolean(bool& result,
bec432ee1094 download of numpy arrays from the REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4831
diff changeset
157 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
158 };
2656
a6d3e45eeff5 SerializationToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 }