MCPcopy Create free account
hub / github.com/Samsung/UTopia / asUInt64

Method asUInt64

external/jsoncpp/jsoncpp.cpp:3128–3147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3126}
3127
3128Value::UInt64 Value::asUInt64() const {
3129 switch (type()) {
3130 case intValue:
3131 JSON_ASSERT_MESSAGE(isUInt64(), "LargestInt out of UInt64 range");
3132 return UInt64(value_.int_);
3133 case uintValue:
3134 return UInt64(value_.uint_);
3135 case realValue:
3136 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64),
3137 "double out of UInt64 range");
3138 return UInt64(value_.real_);
3139 case nullValue:
3140 return 0;
3141 case booleanValue:
3142 return value_.bool_ ? 1 : 0;
3143 default:
3144 break;
3145 }
3146 JSON_FAIL_MESSAGE("Value is not convertible to UInt64.");
3147}
3148#endif // if defined(JSON_HAS_INT64)
3149
3150LargestInt Value::asLargestInt() const {

Callers 2

fromJsonMethod · 0.80
newCharReaderMethod · 0.80

Calls 1

InRangeFunction · 0.85

Tested by

no test coverage detected