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

Method getMemberNames

external/jsoncpp/jsoncpp.cpp:2600–2622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2598#endif
2599
2600Value::Members Value::getMemberNames() const {
2601 JSON_ASSERT_MESSAGE(
2602 type_ == nullValue || type_ == objectValue,
2603 "in Json::Value::getMemberNames(), value must be objectValue");
2604 if (type_ == nullValue)
2605 return Value::Members();
2606 Members members;
2607 members.reserve(value_.map_->size());
2608#ifndef JSON_VALUE_USE_INTERNAL_MAP
2609 ObjectValues::const_iterator it = value_.map_->begin();
2610 ObjectValues::const_iterator itEnd = value_.map_->end();
2611 for (; it != itEnd; ++it)
2612 members.push_back(std::string((*it).first.c_str()));
2613#else
2614 ValueInternalMap::IteratorState it;
2615 ValueInternalMap::IteratorState itEnd;
2616 value_.map_->makeBeginIterator(it);
2617 value_.map_->makeEndIterator(itEnd);
2618 for (; !ValueInternalMap::equals(it, itEnd); ValueInternalMap::increment(it))
2619 members.push_back(std::string(ValueInternalMap::key(it)));
2620#endif
2621 return members;
2622}
2623//
2624//# ifdef JSON_USE_CPPTL
2625// EnumMemberNames

Callers 5

addMethod · 0.80
advanceMethod · 0.80
advanceMethod · 0.80
putMethod · 0.80
writeValueMethod · 0.80

Calls 4

sizeMethod · 0.80
beginMethod · 0.80
c_strMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected