@@ -21,10 +21,12 @@ EitherType::~EitherType() {
21
21
}
22
22
23
23
EitherType::operator bool () const { return value_->boolValue (); }
24
- EitherType::operator uint32_t () const { return value_->unsignedValue (); }
25
- EitherType::operator uint64_t () const { return value_->unsignedlongintValue (); }
26
- EitherType::operator int32_t () const { return value_->intValue (); }
27
- EitherType::operator int64_t () const { return value_->longintValue (); }
24
+ EitherType::operator std::uint32_t () const { return value_->unsignedValue (); }
25
+ EitherType::operator std::uint64_t () const {
26
+ return value_->unsignedlongintValue ();
27
+ }
28
+ EitherType::operator std::int32_t () const { return value_->intValue (); }
29
+ EitherType::operator std::int64_t () const { return value_->longintValue (); }
28
30
EitherType::operator float () const { return value_->floatValue (); }
29
31
EitherType::operator double () const { return value_->doubleValue (); }
30
32
EitherType::operator std::string () const { return value_->stringValue (); }
@@ -40,16 +42,16 @@ void Value::deleteValue() {
40
42
delete (const bool *)value_;
41
43
break ;
42
44
case UNSIGNED:
43
- delete (const uint32_t *)value_;
45
+ delete (const std:: uint32_t *)value_;
44
46
break ;
45
47
case UNSIGNEDLONGINT:
46
- delete (const uint64_t *)value_;
48
+ delete (const std:: uint64_t *)value_;
47
49
break ;
48
50
case INT:
49
- delete (const int32_t *)value_;
51
+ delete (const std:: int32_t *)value_;
50
52
break ;
51
53
case LONGINT:
52
- delete (const int64_t *)value_;
54
+ delete (const std:: int64_t *)value_;
53
55
break ;
54
56
case FLOAT:
55
57
delete (const float *)value_;
@@ -83,12 +85,13 @@ void Value::deleteValue() {
83
85
Value::~Value () { deleteValue (); }
84
86
85
87
Value::Value (const bool &value) : type_(BOOL), value_(new bool (value)) {}
86
- Value::Value (const uint32_t &value)
87
- : type_(UNSIGNED), value_(new uint32_t (value)) {}
88
- Value::Value (const uint64_t &value)
89
- : type_(UNSIGNEDLONGINT), value_(new uint64_t (value)) {}
90
- Value::Value (const int32_t &value) : type_(INT), value_(new int32_t (value)) {}
91
- Value::Value (const int64_t &value)
88
+ Value::Value (const std::uint32_t &value)
89
+ : type_(UNSIGNED), value_(new std::uint32_t (value)) {}
90
+ Value::Value (const std::uint64_t &value)
91
+ : type_(UNSIGNEDLONGINT), value_(new std::uint64_t (value)) {}
92
+ Value::Value (const std::int32_t &value)
93
+ : type_(INT), value_(new std::int32_t (value)) {}
94
+ Value::Value (const std::int64_t &value)
92
95
: type_(LONGINT), value_(new int64_t (value)) {}
93
96
Value::Value (const float &value) : type_(FLOAT), value_(new float (value)) {}
94
97
Value::Value (const double &value) : type_(DOUBLE), value_(new double (value)) {}
@@ -206,25 +209,25 @@ bool Value::boolValue() const {
206
209
throw ExceptionAbstract (ExceptionAbstract::TOOLS, " value is not an bool" );
207
210
}
208
211
209
- uint32_t Value::unsignedValue () const {
210
- if (type_ == UNSIGNED) return *((const uint32_t *)value_);
212
+ std:: uint32_t Value::unsignedValue () const {
213
+ if (type_ == UNSIGNED) return *((const std:: uint32_t *)value_);
211
214
throw ExceptionAbstract (ExceptionAbstract::TOOLS,
212
215
" value is not an unsigned int" );
213
216
}
214
217
215
- uint64_t Value::unsignedlongintValue () const {
216
- if (type_ == UNSIGNEDLONGINT) return *((const uint64_t *)value_);
218
+ std:: uint64_t Value::unsignedlongintValue () const {
219
+ if (type_ == UNSIGNEDLONGINT) return *((const std:: uint64_t *)value_);
217
220
throw ExceptionAbstract (ExceptionAbstract::TOOLS,
218
221
" value is not an unsigned long int" );
219
222
}
220
223
221
- int64_t Value::longintValue () const {
222
- if (type_ == LONGINT) return *((const int64_t *)value_);
224
+ std:: int64_t Value::longintValue () const {
225
+ if (type_ == LONGINT) return *((const std:: int64_t *)value_);
223
226
throw ExceptionAbstract (ExceptionAbstract::TOOLS, " value is not an long int" );
224
227
}
225
228
226
- int32_t Value::intValue () const {
227
- if (type_ == INT) return *((const int32_t *)value_);
229
+ std:: int32_t Value::intValue () const {
230
+ if (type_ == INT) return *((const std:: int32_t *)value_);
228
231
throw ExceptionAbstract (ExceptionAbstract::TOOLS, " value is not an int" );
229
232
}
230
233
@@ -356,13 +359,13 @@ std::ostream &operator<<(std::ostream &os, const Value &value) {
356
359
template <>
357
360
const Value::Type ValueHelper<bool >::TypeID = Value::BOOL;
358
361
template <>
359
- const Value::Type ValueHelper<uint32_t >::TypeID = Value::UNSIGNED;
362
+ const Value::Type ValueHelper<std:: uint32_t >::TypeID = Value::UNSIGNED;
360
363
template <>
361
- const Value::Type ValueHelper<uint64_t >::TypeID = Value::UNSIGNEDLONGINT;
364
+ const Value::Type ValueHelper<std:: uint64_t >::TypeID = Value::UNSIGNEDLONGINT;
362
365
template <>
363
- const Value::Type ValueHelper<int32_t >::TypeID = Value::INT;
366
+ const Value::Type ValueHelper<std:: int32_t >::TypeID = Value::INT;
364
367
template <>
365
- const Value::Type ValueHelper<int64_t >::TypeID = Value::LONGINT;
368
+ const Value::Type ValueHelper<std:: int64_t >::TypeID = Value::LONGINT;
366
369
template <>
367
370
const Value::Type ValueHelper<float >::TypeID = Value::FLOAT;
368
371
template <>
0 commit comments