@@ -21,10 +21,12 @@ EitherType::~EitherType() {
2121}
2222
2323EitherType::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 (); }
2830EitherType::operator float () const { return value_->floatValue (); }
2931EitherType::operator double () const { return value_->doubleValue (); }
3032EitherType::operator std::string () const { return value_->stringValue (); }
@@ -40,16 +42,16 @@ void Value::deleteValue() {
4042 delete (const bool *)value_;
4143 break ;
4244 case UNSIGNED:
43- delete (const uint32_t *)value_;
45+ delete (const std:: uint32_t *)value_;
4446 break ;
4547 case UNSIGNEDLONGINT:
46- delete (const uint64_t *)value_;
48+ delete (const std:: uint64_t *)value_;
4749 break ;
4850 case INT:
49- delete (const int32_t *)value_;
51+ delete (const std:: int32_t *)value_;
5052 break ;
5153 case LONGINT:
52- delete (const int64_t *)value_;
54+ delete (const std:: int64_t *)value_;
5355 break ;
5456 case FLOAT:
5557 delete (const float *)value_;
@@ -83,12 +85,13 @@ void Value::deleteValue() {
8385Value::~Value () { deleteValue (); }
8486
8587Value::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)
9295 : type_(LONGINT), value_(new int64_t (value)) {}
9396Value::Value (const float &value) : type_(FLOAT), value_(new float (value)) {}
9497Value::Value (const double &value) : type_(DOUBLE), value_(new double (value)) {}
@@ -206,25 +209,25 @@ bool Value::boolValue() const {
206209 throw ExceptionAbstract (ExceptionAbstract::TOOLS, " value is not an bool" );
207210}
208211
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_);
211214 throw ExceptionAbstract (ExceptionAbstract::TOOLS,
212215 " value is not an unsigned int" );
213216}
214217
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_);
217220 throw ExceptionAbstract (ExceptionAbstract::TOOLS,
218221 " value is not an unsigned long int" );
219222}
220223
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_);
223226 throw ExceptionAbstract (ExceptionAbstract::TOOLS, " value is not an long int" );
224227}
225228
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_);
228231 throw ExceptionAbstract (ExceptionAbstract::TOOLS, " value is not an int" );
229232}
230233
@@ -356,13 +359,13 @@ std::ostream &operator<<(std::ostream &os, const Value &value) {
356359template <>
357360const Value::Type ValueHelper<bool >::TypeID = Value::BOOL;
358361template <>
359- const Value::Type ValueHelper<uint32_t >::TypeID = Value::UNSIGNED;
362+ const Value::Type ValueHelper<std:: uint32_t >::TypeID = Value::UNSIGNED;
360363template <>
361- const Value::Type ValueHelper<uint64_t >::TypeID = Value::UNSIGNEDLONGINT;
364+ const Value::Type ValueHelper<std:: uint64_t >::TypeID = Value::UNSIGNEDLONGINT;
362365template <>
363- const Value::Type ValueHelper<int32_t >::TypeID = Value::INT;
366+ const Value::Type ValueHelper<std:: int32_t >::TypeID = Value::INT;
364367template <>
365- const Value::Type ValueHelper<int64_t >::TypeID = Value::LONGINT;
368+ const Value::Type ValueHelper<std:: int64_t >::TypeID = Value::LONGINT;
366369template <>
367370const Value::Type ValueHelper<float >::TypeID = Value::FLOAT;
368371template <>
0 commit comments