MCPcopy Create free account
hub / github.com/cinder/Cinder / getMemberNames

Method getMemberNames

src/jsoncpp/jsoncpp.cpp:2570–2592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2568#endif
2569
2570Value::Members Value::getMemberNames() const {
2571 JSON_ASSERT_MESSAGE(
2572 type_ == nullValue || type_ == objectValue,
2573 "in Json::Value::getMemberNames(), value must be objectValue");
2574 if (type_ == nullValue)
2575 return Value::Members();
2576 Members members;
2577 members.reserve(value_.map_->size());
2578#ifndef JSON_VALUE_USE_INTERNAL_MAP
2579 ObjectValues::const_iterator it = value_.map_->begin();
2580 ObjectValues::const_iterator itEnd = value_.map_->end();
2581 for (; it != itEnd; ++it)
2582 members.push_back(std::string((*it).first.c_str()));
2583#else
2584 ValueInternalMap::IteratorState it;
2585 ValueInternalMap::IteratorState itEnd;
2586 value_.map_->makeBeginIterator(it);
2587 value_.map_->makeEndIterator(itEnd);
2588 for (; !ValueInternalMap::equals(it, itEnd); ValueInternalMap::increment(it))
2589 members.push_back(std::string(ValueInternalMap::key(it)));
2590#endif
2591 return members;
2592}
2593//
2594//# ifdef JSON_USE_CPPTL
2595// EnumMemberNames

Callers 2

writeValueMethod · 0.80
initMethod · 0.80

Calls 9

stringFunction · 0.85
keyClass · 0.85
incrementFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected