MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / asString

Method asString

src/share/jsoncpp/jsoncpp.cpp:3121–3144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3119}
3120
3121JSONCPP_STRING Value::asString() const {
3122 switch (type_) {
3123 case nullValue:
3124 return "";
3125 case stringValue:
3126 {
3127 if (value_.string_ == 0) return "";
3128 unsigned this_len;
3129 char const* this_str;
3130 decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
3131 return JSONCPP_STRING(this_str, this_len);
3132 }
3133 case booleanValue:
3134 return value_.bool_ ? "true" : "false";
3135 case intValue:
3136 return valueToString(value_.int_);
3137 case uintValue:
3138 return valueToString(value_.uint_);
3139 case realValue:
3140 return valueToString(value_.real_);
3141 default:
3142 JSON_FAIL_MESSAGE("Type is not convertible to string");
3143 }
3144}
3145
3146#ifdef JSON_USE_CPPTL
3147CppTL::ConstString Value::asConstString() const {

Callers 15

onClickedImageMethod · 0.80
onWizBoxResponseMethod · 0.80
checkServerLicenceMethod · 0.80
updateLocalTemplatesMethod · 0.80
JsonValueToTextFunction · 0.80
onlineSearchOnlyMethod · 0.80
fromJsonMethod · 0.80
isAdMethod · 0.80
readObjectMethod · 0.80

Calls 2

decodePrefixedStringFunction · 0.85
valueToStringFunction · 0.85

Tested by

no test coverage detected