Mercurial > hg > orthanc-stone
comparison Resources/CodeGeneration/template.in.h.j2 @ 873:78f4317eb94b am-dev
fix compil
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 01 Jul 2019 18:18:58 +0200 |
parents | f185cfcb72a0 |
children | 8a0a62189f46 |
comparison
equal
deleted
inserted
replaced
872:733c6db3e5a3 | 873:78f4317eb94b |
---|---|
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 inline Json::Value _StoneSerializeValue(int64_t value) | 52 inline Json::Value _StoneSerializeValue(int64_t value) |
53 { | 53 { |
54 Json::Value result(static_cast<Json::Value::Int64>(value)); | |
55 return result; | |
56 } | |
57 | |
58 inline void _StoneDeserializeValue(uint32_t& destValue, const Json::Value& jsonValue) | |
59 { | |
60 if (!jsonValue.isNull()) | |
61 { | |
62 destValue = jsonValue.asUInt(); | |
63 } | |
64 } | |
65 | |
66 inline Json::Value _StoneSerializeValue(uint32_t value) | |
67 { | |
54 Json::Value result(value); | 68 Json::Value result(value); |
55 return result; | 69 return result; |
56 } | 70 } |
57 | 71 |
58 inline void _StoneDeserializeValue(uint32_t& destValue, const Json::Value& jsonValue) | |
59 { | |
60 if (!jsonValue.isNull()) | |
61 { | |
62 destValue = jsonValue.asUInt(); | |
63 } | |
64 } | |
65 | |
66 inline Json::Value _StoneSerializeValue(uint32_t value) | |
67 { | |
68 Json::Value result(value); | |
69 return result; | |
70 } | |
71 | |
72 inline void _StoneDeserializeValue(uint64_t& destValue, const Json::Value& jsonValue) | 72 inline void _StoneDeserializeValue(uint64_t& destValue, const Json::Value& jsonValue) |
73 { | 73 { |
74 if (!jsonValue.isNull()) | 74 if (!jsonValue.isNull()) |
75 { | 75 { |
76 destValue = jsonValue.asUInt64(); | 76 destValue = jsonValue.asUInt64(); |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 inline Json::Value _StoneSerializeValue(uint64_t value) | 80 inline Json::Value _StoneSerializeValue(uint64_t value) |
81 { | 81 { |
82 Json::Value result(value); | 82 Json::Value result(static_cast<Json::Value::UInt64>(value)); |
83 return result; | 83 return result; |
84 } | 84 } |
85 | 85 |
86 inline void _StoneDeserializeValue(Json::Value& destValue, const Json::Value& jsonValue) | 86 inline void _StoneDeserializeValue(Json::Value& destValue, const Json::Value& jsonValue) |
87 { | 87 { |