MCPcopy Create free account
hub / github.com/Illumina/hap.py / asString

Method asString

external/jsoncpp/jsoncpp.cpp:2101–2118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2099}
2100
2101std::string Value::asString() const {
2102 switch (type_) {
2103 case nullValue:
2104 return "";
2105 case stringValue:
2106 return value_.string_ ? value_.string_ : "";
2107 case booleanValue:
2108 return value_.bool_ ? "true" : "false";
2109 case intValue:
2110 return valueToString(value_.int_);
2111 case uintValue:
2112 return valueToString(value_.uint_);
2113 case realValue:
2114 return valueToString(value_.real_);
2115 default:
2116 JSON_FAIL_MESSAGE("Type is not convertible to string");
2117 }
2118}
2119
2120#ifdef JSON_USE_CPPTL
2121CppTL::ConstString Value::asConstString() const {

Callers 3

getInfoStringMethod · 0.80
putMethod · 0.80
readObjectMethod · 0.80

Calls 1

valueToStringFunction · 0.85

Tested by

no test coverage detected