MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / getArrayOfStrings

Method getArrayOfStrings

CesiumUtility/src/JsonValue.cpp:311–326  ·  view source on GitHub ↗

namespace CesiumUtility

Source from the content-addressed store, hash-verified

309
310} // namespace CesiumUtility
311std::vector<std::string> CesiumUtility::JsonValue::getArrayOfStrings(
312 const std::string& defaultString) const {
313 if (!this->isArray())
314 return std::vector<std::string>();
315
316 const JsonValue::Array& array = this->getArray();
317 std::vector<std::string> result(array.size());
318 std::transform(
319 array.begin(),
320 array.end(),
321 result.begin(),
322 [&defaultString](const JsonValue& arrayValue) {
323 return arrayValue.getStringOrDefault(defaultString);
324 });
325 return result;
326}

Callers 2

createTileProviderMethod · 0.80

Calls 4

getStringOrDefaultMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected